Merge branch 'reiserfs/kill-bkl' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / arch / arm / mach-bcmring / csp / chipc / chipcHw_str.c
1 /*****************************************************************************
2 * Copyright 2008 Broadcom Corporation.  All rights reserved.
3 *
4 * Unless you and Broadcom execute a separate written software license
5 * agreement governing use of this software, this software is licensed to you
6 * under the terms of the GNU General Public License version 2, available at
7 * http://www.broadcom.com/licenses/GPLv2.php (the "GPL").
8 *
9 * Notwithstanding the above, under no circumstances may you combine this
10 * software in any way with any other Broadcom software provided under a
11 * license other than the GPL, without Broadcom's express prior written
12 * consent.
13 *****************************************************************************/
14 /****************************************************************************/
15 /**
16 *  @file    chipcHw_str.c
17 *
18 *  @brief   Contains strings which are useful to linux and csp
19 *
20 *  @note
21 */
22 /****************************************************************************/
23
24 /* ---- Include Files ---------------------------------------------------- */
25
26 #include <mach/csp/chipcHw_inline.h>
27
28 /* ---- Private Constants and Types --------------------------------------- */
29
30 static const char *gMuxStr[] = {
31         "GPIO",                 /* 0 */
32         "KeyPad",               /* 1 */
33         "I2C-Host",             /* 2 */
34         "SPI",                  /* 3 */
35         "Uart",                 /* 4 */
36         "LED-Mtx-P",            /* 5 */
37         "LED-Mtx-S",            /* 6 */
38         "SDIO-0",               /* 7 */
39         "SDIO-1",               /* 8 */
40         "PCM",                  /* 9 */
41         "I2S",                  /* 10 */
42         "ETM",                  /* 11 */
43         "Debug",                /* 12 */
44         "Misc",                 /* 13 */
45         "0xE",                  /* 14 */
46         "0xF",                  /* 15 */
47 };
48
49 /****************************************************************************/
50 /**
51 *  @brief   Retrieves a string representation of the mux setting for a pin.
52 *
53 *  @return  Pointer to a character string.
54 */
55 /****************************************************************************/
56
57 const char *chipcHw_getGpioPinFunctionStr(int pin)
58 {
59         if ((pin < 0) || (pin >= chipcHw_GPIO_COUNT)) {
60                 return "";
61         }
62
63         return gMuxStr[chipcHw_getGpioPinFunction(pin)];
64 }