aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
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/rtc
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/rtc')
-rw-r--r--drivers/rtc/rtc-twl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
index 93565be12fae..6119712cc8de 100644
--- a/drivers/rtc/rtc-twl.c
+++ b/drivers/rtc/rtc-twl.c
@@ -92,7 +92,7 @@ static int twl4030_rtc_read_u8(u8 *data, u8 reg)
92{ 92{
93 int ret; 93 int ret;
94 94
95 ret = twl4030_i2c_read_u8(TWL4030_MODULE_RTC, data, reg); 95 ret = twl_i2c_read_u8(TWL4030_MODULE_RTC, data, reg);
96 if (ret < 0) 96 if (ret < 0)
97 pr_err("twl4030_rtc: Could not read TWL4030" 97 pr_err("twl4030_rtc: Could not read TWL4030"
98 "register %X - error %d\n", reg, ret); 98 "register %X - error %d\n", reg, ret);
@@ -106,7 +106,7 @@ static int twl4030_rtc_write_u8(u8 data, u8 reg)
106{ 106{
107 int ret; 107 int ret;
108 108
109 ret = twl4030_i2c_write_u8(TWL4030_MODULE_RTC, data, reg); 109 ret = twl_i2c_write_u8(TWL4030_MODULE_RTC, data, reg);
110 if (ret < 0) 110 if (ret < 0)
111 pr_err("twl4030_rtc: Could not write TWL4030" 111 pr_err("twl4030_rtc: Could not write TWL4030"
112 "register %X - error %d\n", reg, ret); 112 "register %X - error %d\n", reg, ret);
@@ -201,7 +201,7 @@ static int twl4030_rtc_read_time(struct device *dev, struct rtc_time *tm)
201 if (ret < 0) 201 if (ret < 0)
202 return ret; 202 return ret;
203 203
204 ret = twl4030_i2c_read(TWL4030_MODULE_RTC, rtc_data, 204 ret = twl_i2c_read(TWL4030_MODULE_RTC, rtc_data,
205 REG_SECONDS_REG, ALL_TIME_REGS); 205 REG_SECONDS_REG, ALL_TIME_REGS);
206 206
207 if (ret < 0) { 207 if (ret < 0) {
@@ -243,7 +243,7 @@ static int twl4030_rtc_set_time(struct device *dev, struct rtc_time *tm)
243 goto out; 243 goto out;
244 244
245 /* update all the time registers in one shot */ 245 /* update all the time registers in one shot */
246 ret = twl4030_i2c_write(TWL4030_MODULE_RTC, rtc_data, 246 ret = twl_i2c_write(TWL4030_MODULE_RTC, rtc_data,
247 REG_SECONDS_REG, ALL_TIME_REGS); 247 REG_SECONDS_REG, ALL_TIME_REGS);
248 if (ret < 0) { 248 if (ret < 0) {
249 dev_err(dev, "rtc_set_time error %d\n", ret); 249 dev_err(dev, "rtc_set_time error %d\n", ret);
@@ -266,7 +266,7 @@ static int twl4030_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm)
266 unsigned char rtc_data[ALL_TIME_REGS + 1]; 266 unsigned char rtc_data[ALL_TIME_REGS + 1];
267 int ret; 267 int ret;
268 268
269 ret = twl4030_i2c_read(TWL4030_MODULE_RTC, rtc_data, 269 ret = twl_i2c_read(TWL4030_MODULE_RTC, rtc_data,
270 REG_ALARM_SECONDS_REG, ALL_TIME_REGS); 270 REG_ALARM_SECONDS_REG, ALL_TIME_REGS);
271 if (ret < 0) { 271 if (ret < 0) {
272 dev_err(dev, "rtc_read_alarm error %d\n", ret); 272 dev_err(dev, "rtc_read_alarm error %d\n", ret);
@@ -305,7 +305,7 @@ static int twl4030_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm)
305 alarm_data[6] = bin2bcd(alm->time.tm_year - 100); 305 alarm_data[6] = bin2bcd(alm->time.tm_year - 100);
306 306
307 /* update all the alarm registers in one shot */ 307 /* update all the alarm registers in one shot */
308 ret = twl4030_i2c_write(TWL4030_MODULE_RTC, alarm_data, 308 ret = twl_i2c_write(TWL4030_MODULE_RTC, alarm_data,
309 REG_ALARM_SECONDS_REG, ALL_TIME_REGS); 309 REG_ALARM_SECONDS_REG, ALL_TIME_REGS);
310 if (ret) { 310 if (ret) {
311 dev_err(dev, "rtc_set_alarm error %d\n", ret); 311 dev_err(dev, "rtc_set_alarm error %d\n", ret);
@@ -363,7 +363,7 @@ static irqreturn_t twl4030_rtc_interrupt(int irq, void *rtc)
363 * risk wrongly clearing status for some other IRQ (losing 363 * risk wrongly clearing status for some other IRQ (losing
364 * the interrupt). Be smarter about handling RTC_UF ... 364 * the interrupt). Be smarter about handling RTC_UF ...
365 */ 365 */
366 res = twl4030_i2c_read_u8(TWL4030_MODULE_INT, 366 res = twl_i2c_read_u8(TWL4030_MODULE_INT,
367 &rd_reg, TWL4030_INT_PWR_ISR1); 367 &rd_reg, TWL4030_INT_PWR_ISR1);
368 if (res) 368 if (res)
369 goto out; 369 goto out;