aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorBalaji T K <balajitk@ti.com>2009-12-13 15:23:33 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2009-12-13 15:23:33 -0500
commitfc7b92fca4e546184557f1c53f84ad57c66b7695 (patch)
treef15b37df7d34f525d877d33186b840947aa65b4d /drivers/gpio
parentb07682b6056eb6701f8cb86aa5800e6f2ea7919b (diff)
mfd: Rename all twl4030_i2c*
This patch renames function names like twl4030_i2c_write_u8, twl4030_i2c_read_u8 to twl_i2c_write_u8, twl_i2c_read_u8 and also common variable in twl-core.c Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/twl4030-gpio.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpio/twl4030-gpio.c b/drivers/gpio/twl4030-gpio.c
index a320d7bfe67c..7fe881e2bdfb 100644
--- a/drivers/gpio/twl4030-gpio.c
+++ b/drivers/gpio/twl4030-gpio.c
@@ -80,7 +80,7 @@ static unsigned int gpio_usage_count;
80 */ 80 */
81static inline int gpio_twl4030_write(u8 address, u8 data) 81static inline int gpio_twl4030_write(u8 address, u8 data)
82{ 82{
83 return twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, data, address); 83 return twl_i2c_write_u8(TWL4030_MODULE_GPIO, data, address);
84} 84}
85 85
86/*----------------------------------------------------------------------*/ 86/*----------------------------------------------------------------------*/
@@ -117,7 +117,7 @@ static inline int gpio_twl4030_read(u8 address)
117 u8 data; 117 u8 data;
118 int ret = 0; 118 int ret = 0;
119 119
120 ret = twl4030_i2c_read_u8(TWL4030_MODULE_GPIO, &data, address); 120 ret = twl_i2c_read_u8(TWL4030_MODULE_GPIO, &data, address);
121 return (ret < 0) ? ret : data; 121 return (ret < 0) ? ret : data;
122} 122}
123 123
@@ -142,7 +142,7 @@ static void twl4030_led_set_value(int led, int value)
142 cached_leden &= ~mask; 142 cached_leden &= ~mask;
143 else 143 else
144 cached_leden |= mask; 144 cached_leden |= mask;
145 status = twl4030_i2c_write_u8(TWL4030_MODULE_LED, cached_leden, 145 status = twl_i2c_write_u8(TWL4030_MODULE_LED, cached_leden,
146 TWL4030_LED_LEDEN); 146 TWL4030_LED_LEDEN);
147 mutex_unlock(&gpio_lock); 147 mutex_unlock(&gpio_lock);
148} 148}
@@ -223,23 +223,23 @@ static int twl_request(struct gpio_chip *chip, unsigned offset)
223 } 223 }
224 224
225 /* initialize PWM to always-drive */ 225 /* initialize PWM to always-drive */
226 status = twl4030_i2c_write_u8(module, 0x7f, 226 status = twl_i2c_write_u8(module, 0x7f,
227 TWL4030_PWMx_PWMxOFF); 227 TWL4030_PWMx_PWMxOFF);
228 if (status < 0) 228 if (status < 0)
229 goto done; 229 goto done;
230 status = twl4030_i2c_write_u8(module, 0x7f, 230 status = twl_i2c_write_u8(module, 0x7f,
231 TWL4030_PWMx_PWMxON); 231 TWL4030_PWMx_PWMxON);
232 if (status < 0) 232 if (status < 0)
233 goto done; 233 goto done;
234 234
235 /* init LED to not-driven (high) */ 235 /* init LED to not-driven (high) */
236 module = TWL4030_MODULE_LED; 236 module = TWL4030_MODULE_LED;
237 status = twl4030_i2c_read_u8(module, &cached_leden, 237 status = twl_i2c_read_u8(module, &cached_leden,
238 TWL4030_LED_LEDEN); 238 TWL4030_LED_LEDEN);
239 if (status < 0) 239 if (status < 0)
240 goto done; 240 goto done;
241 cached_leden &= ~ledclr_mask; 241 cached_leden &= ~ledclr_mask;
242 status = twl4030_i2c_write_u8(module, cached_leden, 242 status = twl_i2c_write_u8(module, cached_leden,
243 TWL4030_LED_LEDEN); 243 TWL4030_LED_LEDEN);
244 if (status < 0) 244 if (status < 0)
245 goto done; 245 goto done;
@@ -370,7 +370,7 @@ static int __devinit gpio_twl4030_pulls(u32 ups, u32 downs)
370 message[i] = bit_mask; 370 message[i] = bit_mask;
371 } 371 }
372 372
373 return twl4030_i2c_write(TWL4030_MODULE_GPIO, message, 373 return twl_i2c_write(TWL4030_MODULE_GPIO, message,
374 REG_GPIOPUPDCTR1, 5); 374 REG_GPIOPUPDCTR1, 5);
375} 375}
376 376
@@ -387,7 +387,7 @@ static int __devinit gpio_twl4030_debounce(u32 debounce, u8 mmc_cd)
387 debounce >>= 8; 387 debounce >>= 8;
388 message[3] = (debounce & 0x03); 388 message[3] = (debounce & 0x03);
389 389
390 return twl4030_i2c_write(TWL4030_MODULE_GPIO, message, 390 return twl_i2c_write(TWL4030_MODULE_GPIO, message,
391 REG_GPIO_DEBEN1, 3); 391 REG_GPIO_DEBEN1, 3);
392} 392}
393 393