diff options
Diffstat (limited to 'drivers/mfd/rc5t583.c')
-rw-r--r-- | drivers/mfd/rc5t583.c | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/drivers/mfd/rc5t583.c b/drivers/mfd/rc5t583.c index 99ef944c621d..44afae0a69ce 100644 --- a/drivers/mfd/rc5t583.c +++ b/drivers/mfd/rc5t583.c | |||
@@ -80,44 +80,6 @@ static struct mfd_cell rc5t583_subdevs[] = { | |||
80 | {.name = "rc5t583-key", } | 80 | {.name = "rc5t583-key", } |
81 | }; | 81 | }; |
82 | 82 | ||
83 | int rc5t583_write(struct device *dev, uint8_t reg, uint8_t val) | ||
84 | { | ||
85 | struct rc5t583 *rc5t583 = dev_get_drvdata(dev); | ||
86 | return regmap_write(rc5t583->regmap, reg, val); | ||
87 | } | ||
88 | |||
89 | int rc5t583_read(struct device *dev, uint8_t reg, uint8_t *val) | ||
90 | { | ||
91 | struct rc5t583 *rc5t583 = dev_get_drvdata(dev); | ||
92 | unsigned int ival; | ||
93 | int ret; | ||
94 | ret = regmap_read(rc5t583->regmap, reg, &ival); | ||
95 | if (!ret) | ||
96 | *val = (uint8_t)ival; | ||
97 | return ret; | ||
98 | } | ||
99 | |||
100 | int rc5t583_set_bits(struct device *dev, unsigned int reg, | ||
101 | unsigned int bit_mask) | ||
102 | { | ||
103 | struct rc5t583 *rc5t583 = dev_get_drvdata(dev); | ||
104 | return regmap_update_bits(rc5t583->regmap, reg, bit_mask, bit_mask); | ||
105 | } | ||
106 | |||
107 | int rc5t583_clear_bits(struct device *dev, unsigned int reg, | ||
108 | unsigned int bit_mask) | ||
109 | { | ||
110 | struct rc5t583 *rc5t583 = dev_get_drvdata(dev); | ||
111 | return regmap_update_bits(rc5t583->regmap, reg, bit_mask, 0); | ||
112 | } | ||
113 | |||
114 | int rc5t583_update(struct device *dev, unsigned int reg, | ||
115 | unsigned int val, unsigned int mask) | ||
116 | { | ||
117 | struct rc5t583 *rc5t583 = dev_get_drvdata(dev); | ||
118 | return regmap_update_bits(rc5t583->regmap, reg, mask, val); | ||
119 | } | ||
120 | |||
121 | static int __rc5t583_set_ext_pwrreq1_control(struct device *dev, | 83 | static int __rc5t583_set_ext_pwrreq1_control(struct device *dev, |
122 | int id, int ext_pwr, int slots) | 84 | int id, int ext_pwr, int slots) |
123 | { | 85 | { |
@@ -197,6 +159,7 @@ int rc5t583_ext_power_req_config(struct device *dev, int ds_id, | |||
197 | ds_id, ext_pwr_req); | 159 | ds_id, ext_pwr_req); |
198 | return 0; | 160 | return 0; |
199 | } | 161 | } |
162 | EXPORT_SYMBOL(rc5t583_ext_power_req_config); | ||
200 | 163 | ||
201 | static int rc5t583_clear_ext_power_req(struct rc5t583 *rc5t583, | 164 | static int rc5t583_clear_ext_power_req(struct rc5t583 *rc5t583, |
202 | struct rc5t583_platform_data *pdata) | 165 | struct rc5t583_platform_data *pdata) |