From: kfx Date: Sat, 5 Jan 2013 03:43:18 +0000 (+0800) Subject: iomux: api add prefix: iomux_ X-Git-Tag: firefly_0821_release~8007 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=73d5f549ab496842839be3399d27174896d7bb38;p=firefly-linux-kernel-4.4.55.git iomux: api add prefix: iomux_ --- diff --git a/arch/arm/mach-rk30/board-rk3168-ds1006h.c b/arch/arm/mach-rk30/board-rk3168-ds1006h.c index aa3e072c6b3a..bf3ebe5d182c 100644 --- a/arch/arm/mach-rk30/board-rk3168-ds1006h.c +++ b/arch/arm/mach-rk30/board-rk3168-ds1006h.c @@ -167,7 +167,7 @@ static int rk29_backlight_io_deinit(void) gpio_free(BL_EN_PIN); #endif - pwm_gpio = mode_to_gpio(PWM_MODE); + pwm_gpio = iomux_mode_to_gpio(PWM_MODE); gpio_request(pwm_gpio, NULL); gpio_direction_output(pwm_gpio, GPIO_LOW); return ret; @@ -177,7 +177,7 @@ static int rk29_backlight_pwm_suspend(void) { int ret = 0, pwm_gpio; - pwm_gpio = mode_to_gpio(PWM_MODE); + pwm_gpio = iomux_mode_to_gpio(PWM_MODE); if (gpio_request(pwm_gpio, NULL)) { printk("func %s, line %d: request gpio fail\n", __FUNCTION__, __LINE__); return -1; @@ -192,7 +192,7 @@ static int rk29_backlight_pwm_suspend(void) static int rk29_backlight_pwm_resume(void) { - int pwm_gpio = mode_to_gpio(PWM_MODE); + int pwm_gpio = iomux_mode_to_gpio(PWM_MODE); gpio_free(pwm_gpio); iomux_set(PWM_MODE); diff --git a/arch/arm/plat-rk/include/plat/iomux.h b/arch/arm/plat-rk/include/plat/iomux.h index 443b7d853df7..70d8d18380e5 100644 --- a/arch/arm/plat-rk/include/plat/iomux.h +++ b/arch/arm/plat-rk/include/plat/iomux.h @@ -3,10 +3,10 @@ #define INVALID_MODE 0xffffffff -#define get_gpio_mode(m) ((m) & 0x03) +#define iomux_switch_gpio_mode(m) ((m) & 0x03) -int gpio_to_mode(int gpio); -int mode_to_gpio(unsigned int mode); +int iomux_gpio_to_mode(int gpio); +int iomux_mode_to_gpio(unsigned int mode); void iomux_set_gpio_mode(int gpio); void iomux_set(unsigned int mode); void __init iomux_init(void); diff --git a/arch/arm/plat-rk/iomux.c b/arch/arm/plat-rk/iomux.c index 689262952981..00abf07be6c4 100644 --- a/arch/arm/plat-rk/iomux.c +++ b/arch/arm/plat-rk/iomux.c @@ -38,7 +38,7 @@ static inline int mode_is_valid(unsigned int mode) } -int mode_to_gpio(unsigned int mode) +int iomux_mode_to_gpio(unsigned int mode) { struct union_mode m; @@ -50,9 +50,9 @@ int mode_to_gpio(unsigned int mode) m.mode = mode; return PIN_BASE + m.mux.bank * 32 + (m.mux.goff - 0x0A) * 8 + m.mux.off; } -EXPORT_SYMBOL(mode_to_gpio); +EXPORT_SYMBOL(iomux_mode_to_gpio); -int gpio_to_mode(int gpio) +int iomux_gpio_to_mode(int gpio) { unsigned int off; struct union_mode m; @@ -75,7 +75,7 @@ int gpio_to_mode(int gpio) return m.mode; } -EXPORT_SYMBOL(gpio_to_mode); +EXPORT_SYMBOL(iomux_gpio_to_mode); #ifdef GRF_IOMUX_BASE void iomux_set(unsigned int mode) @@ -110,7 +110,7 @@ void iomux_set_gpio_mode(int gpio) { unsigned int mode; - mode = gpio_to_mode(gpio); + mode = iomux_gpio_to_mode(gpio); if(mode_is_valid(mode)) iomux_set(mode); }