summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-omap-psp-2.6.32/0027-twl4030-madc-adjust-for-twl4030-twl-api-changes.patch
blob: 068394af4f39435488c29cc855f73ee202a58f51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
From 28d763b088bad47caac75e096bafe42e756b656d Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Mon, 15 Feb 2010 14:20:51 +0100
Subject: [PATCH 27/48] twl4030-madc: adjust for twl4030 -> twl api changes

---
 drivers/mfd/twl4030-madc.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/mfd/twl4030-madc.c b/drivers/mfd/twl4030-madc.c
index 7d83ab8..de6bdcd 100644
--- a/drivers/mfd/twl4030-madc.c
+++ b/drivers/mfd/twl4030-madc.c
@@ -29,7 +29,7 @@
 #include <linux/fs.h>
 #include <linux/platform_device.h>
 #include <linux/miscdevice.h>
-#include <linux/i2c/twl4030.h>
+#include <linux/i2c/twl.h>
 #include <linux/i2c/twl4030-madc.h>
 
 #include <asm/uaccess.h>
@@ -73,7 +73,7 @@ static int twl4030_madc_read(struct twl4030_madc_data *madc, u8 reg)
 	int ret;
 	u8 val;
 
-	ret = twl4030_i2c_read_u8(TWL4030_MODULE_MADC, &val, reg);
+	ret = twl_i2c_read_u8(TWL4030_MODULE_MADC, &val, reg);
 	if (ret) {
 		dev_dbg(madc->dev, "unable to read register 0x%X\n", reg);
 		return ret;
@@ -86,7 +86,7 @@ static void twl4030_madc_write(struct twl4030_madc_data *madc, u8 reg, u8 val)
 {
 	int ret;
 
-	ret = twl4030_i2c_write_u8(TWL4030_MODULE_MADC, val, reg);
+	ret = twl_i2c_write_u8(TWL4030_MODULE_MADC, val, reg);
 	if (ret)
 		dev_err(madc->dev, "unable to write register 0x%X\n", reg);
 }
@@ -342,13 +342,13 @@ static int twl4030_madc_set_current_generator(struct twl4030_madc_data *madc,
 	if (chan > 1)
 		return EINVAL;
 
-	ret = twl4030_i2c_read_u8(TWL4030_MODULE_MAIN_CHARGE,
+	ret = twl_i2c_read_u8(TWL4030_MODULE_MAIN_CHARGE,
 				  &regval, TWL4030_BCI_BCICTL1);
 	if (on)
 		regval |= (chan) ? TWL4030_BCI_ITHEN : TWL4030_BCI_TYPEN;
 	else
 		regval &= (chan) ? ~TWL4030_BCI_ITHEN : ~TWL4030_BCI_TYPEN;
-	ret = twl4030_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE,
+	ret = twl_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE,
 				   regval, TWL4030_BCI_BCICTL1);
 
 	return ret;
@@ -453,21 +453,21 @@ static int __init twl4030_madc_probe(struct platform_device *pdev)
 	twl4030_madc_set_current_generator(madc, 0, 1);
 
 	/* Enable ADCIN3 through 6 */
-	ret = twl4030_i2c_read_u8(TWL4030_MODULE_USB,
+	ret = twl_i2c_read_u8(TWL4030_MODULE_USB,
 				  &regval, TWL4030_USB_CARKIT_ANA_CTRL);
 
 	regval |= TWL4030_USB_SEL_MADC_MCPC;
 
-	ret = twl4030_i2c_write_u8(TWL4030_MODULE_USB,
+	ret = twl_i2c_write_u8(TWL4030_MODULE_USB,
 				regval, TWL4030_USB_CARKIT_ANA_CTRL);
 
 
-	ret = twl4030_i2c_read_u8(TWL4030_MODULE_MAIN_CHARGE,
+	ret = twl_i2c_read_u8(TWL4030_MODULE_MAIN_CHARGE,
 				  &regval, TWL4030_BCI_BCICTL1);
 
 	regval |= TWL4030_BCI_MESBAT;
 
-	ret = twl4030_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE,
+	ret = twl_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE,
 				   regval, TWL4030_BCI_BCICTL1);
 
 	ret = request_irq(platform_get_irq(pdev, 0), twl4030_madc_irq_handler,
-- 
1.6.6.1