Path: blob/master/arch/arm/mach-bcmring/csp/chipc/chipcHw_str.c
10820 views
/*****************************************************************************1* Copyright 2008 Broadcom Corporation. All rights reserved.2*3* Unless you and Broadcom execute a separate written software license4* agreement governing use of this software, this software is licensed to you5* under the terms of the GNU General Public License version 2, available at6* http://www.broadcom.com/licenses/GPLv2.php (the "GPL").7*8* Notwithstanding the above, under no circumstances may you combine this9* software in any way with any other Broadcom software provided under a10* license other than the GPL, without Broadcom's express prior written11* consent.12*****************************************************************************/13/****************************************************************************/14/**15* @file chipcHw_str.c16*17* @brief Contains strings which are useful to linux and csp18*19* @note20*/21/****************************************************************************/2223/* ---- Include Files ---------------------------------------------------- */2425#include <mach/csp/chipcHw_inline.h>2627/* ---- Private Constants and Types --------------------------------------- */2829static const char *gMuxStr[] = {30"GPIO", /* 0 */31"KeyPad", /* 1 */32"I2C-Host", /* 2 */33"SPI", /* 3 */34"Uart", /* 4 */35"LED-Mtx-P", /* 5 */36"LED-Mtx-S", /* 6 */37"SDIO-0", /* 7 */38"SDIO-1", /* 8 */39"PCM", /* 9 */40"I2S", /* 10 */41"ETM", /* 11 */42"Debug", /* 12 */43"Misc", /* 13 */44"0xE", /* 14 */45"0xF", /* 15 */46};4748/****************************************************************************/49/**50* @brief Retrieves a string representation of the mux setting for a pin.51*52* @return Pointer to a character string.53*/54/****************************************************************************/5556const char *chipcHw_getGpioPinFunctionStr(int pin)57{58if ((pin < 0) || (pin >= chipcHw_GPIO_COUNT)) {59return "";60}6162return gMuxStr[chipcHw_getGpioPinFunction(pin)];63}646566