diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2012-11-19 22:14:48 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-11-21 10:07:53 -0500 |
commit | b9c79323166530a14c1fa8c10337eeaa54e3f98d (patch) | |
tree | 02ec6901e7407d1687a0a0826e9a440ad9fa5ca1 /drivers/mfd/tps65090.c | |
parent | 3863db3e800c64e21e4effcc3de0f72cdb9b0d77 (diff) |
mfd: tps65090: Move register access APIs to header
Since tps65090 register is accessed via regmap, moving
the register access APIs to header and making it as inline.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/tps65090.c')
-rw-r--r-- | drivers/mfd/tps65090.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c index 3cfc9dcbe9d..355a0774945 100644 --- a/drivers/mfd/tps65090.c +++ b/drivers/mfd/tps65090.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/mfd/core.h> | 26 | #include <linux/mfd/core.h> |
27 | #include <linux/mfd/tps65090.h> | 27 | #include <linux/mfd/tps65090.h> |
28 | #include <linux/regmap.h> | ||
29 | #include <linux/err.h> | 28 | #include <linux/err.h> |
30 | 29 | ||
31 | #define NUM_INT_REG 2 | 30 | #define NUM_INT_REG 2 |
@@ -78,39 +77,6 @@ static struct mfd_cell tps65090s[] = { | |||
78 | }, | 77 | }, |
79 | }; | 78 | }; |
80 | 79 | ||
81 | int tps65090_write(struct device *dev, int reg, uint8_t val) | ||
82 | { | ||
83 | struct tps65090 *tps = dev_get_drvdata(dev); | ||
84 | return regmap_write(tps->rmap, reg, val); | ||
85 | } | ||
86 | EXPORT_SYMBOL_GPL(tps65090_write); | ||
87 | |||
88 | int tps65090_read(struct device *dev, int reg, uint8_t *val) | ||
89 | { | ||
90 | struct tps65090 *tps = dev_get_drvdata(dev); | ||
91 | unsigned int temp_val; | ||
92 | int ret; | ||
93 | ret = regmap_read(tps->rmap, reg, &temp_val); | ||
94 | if (!ret) | ||
95 | *val = temp_val; | ||
96 | return ret; | ||
97 | } | ||
98 | EXPORT_SYMBOL_GPL(tps65090_read); | ||
99 | |||
100 | int tps65090_set_bits(struct device *dev, int reg, uint8_t bit_num) | ||
101 | { | ||
102 | struct tps65090 *tps = dev_get_drvdata(dev); | ||
103 | return regmap_update_bits(tps->rmap, reg, BIT(bit_num), ~0u); | ||
104 | } | ||
105 | EXPORT_SYMBOL_GPL(tps65090_set_bits); | ||
106 | |||
107 | int tps65090_clr_bits(struct device *dev, int reg, uint8_t bit_num) | ||
108 | { | ||
109 | struct tps65090 *tps = dev_get_drvdata(dev); | ||
110 | return regmap_update_bits(tps->rmap, reg, BIT(bit_num), 0u); | ||
111 | } | ||
112 | EXPORT_SYMBOL_GPL(tps65090_clr_bits); | ||
113 | |||
114 | static void tps65090_irq_lock(struct irq_data *data) | 80 | static void tps65090_irq_lock(struct irq_data *data) |
115 | { | 81 | { |
116 | struct tps65090 *tps65090 = irq_data_get_irq_chip_data(data); | 82 | struct tps65090 *tps65090 = irq_data_get_irq_chip_data(data); |