aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorSangbeom Kim <sbkim73@samsung.com>2012-07-11 08:06:55 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-07-16 08:26:45 -0400
commit63063bfbffe997452e2ee4890f22dcde0119001e (patch)
tree97fe4749b7a3c55fe094334f1def509623dc5702 /include/linux/mfd
parent66c9fbb9895499ff3aede96845968138a5bec8ab (diff)
mfd: Modify samsung mfd driver for common api
Previous naming rule of samsung pmic start with s5m prefix. But It is changed by s2m. To cover various samsung s2m and s5m series, This patch modify function and variable name for common usage. Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/samsung/s5m-core.h30
-rw-r--r--include/linux/mfd/samsung/s5m-pmic.h24
2 files changed, 27 insertions, 27 deletions
diff --git a/include/linux/mfd/samsung/s5m-core.h b/include/linux/mfd/samsung/s5m-core.h
index 7332ff608c85..d3b4f634b5da 100644
--- a/include/linux/mfd/samsung/s5m-core.h
+++ b/include/linux/mfd/samsung/s5m-core.h
@@ -16,7 +16,7 @@
16 16
17#define NUM_IRQ_REGS 4 17#define NUM_IRQ_REGS 4
18 18
19enum s5m_device_type { 19enum sec_device_type {
20 S5M8751X, 20 S5M8751X,
21 S5M8763X, 21 S5M8763X,
22 S5M8767X, 22 S5M8767X,
@@ -292,20 +292,20 @@ enum s5m8763_irq {
292#define S5M8763_ENRAMP (1 << 4) 292#define S5M8763_ENRAMP (1 << 4)
293 293
294/** 294/**
295 * struct s5m87xx_dev - s5m87xx master device for sub-drivers 295 * struct sec_pmic_dev - sec_pmic master device for sub-drivers
296 * @dev: master device of the chip (can be used to access platform data) 296 * @dev: master device of the chip (can be used to access platform data)
297 * @i2c: i2c client private data for regulator 297 * @i2c: i2c client private data for regulator
298 * @rtc: i2c client private data for rtc 298 * @rtc: i2c client private data for rtc
299 * @iolock: mutex for serializing io access 299 * @iolock: mutex for serializing io access
300 * @irqlock: mutex for buslock 300 * @irqlock: mutex for buslock
301 * @irq_base: base IRQ number for s5m87xx, required for IRQs 301 * @irq_base: base IRQ number for sec_pmic, required for IRQs
302 * @irq: generic IRQ number for s5m87xx 302 * @irq: generic IRQ number for s5m87xx
303 * @ono: power onoff IRQ number for s5m87xx 303 * @ono: power onoff IRQ number for s5m87xx
304 * @irq_masks_cur: currently active value 304 * @irq_masks_cur: currently active value
305 * @irq_masks_cache: cached hardware value 305 * @irq_masks_cache: cached hardware value
306 * @type: indicate which s5m87xx "variant" is used 306 * @type: indicate which s5m87xx "variant" is used
307 */ 307 */
308struct s5m87xx_dev { 308struct sec_pmic_dev {
309 struct device *dev; 309 struct device *dev;
310 struct regmap *regmap; 310 struct regmap *regmap;
311 struct i2c_client *i2c; 311 struct i2c_client *i2c;
@@ -323,19 +323,19 @@ struct s5m87xx_dev {
323 bool wakeup; 323 bool wakeup;
324}; 324};
325 325
326int s5m_irq_init(struct s5m87xx_dev *s5m87xx); 326int sec_irq_init(struct sec_pmic_dev *sec_pmic);
327void s5m_irq_exit(struct s5m87xx_dev *s5m87xx); 327void sec_irq_exit(struct sec_pmic_dev *sec_pmic);
328int s5m_irq_resume(struct s5m87xx_dev *s5m87xx); 328int sec_irq_resume(struct sec_pmic_dev *sec_pmic);
329 329
330extern int s5m_reg_read(struct s5m87xx_dev *s5m87xx, u8 reg, void *dest); 330extern int sec_reg_read(struct sec_pmic_dev *sec_pmic, u8 reg, void *dest);
331extern int s5m_bulk_read(struct s5m87xx_dev *s5m87xx, u8 reg, int count, u8 *buf); 331extern int sec_bulk_read(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf);
332extern int s5m_reg_write(struct s5m87xx_dev *s5m87xx, u8 reg, u8 value); 332extern int sec_reg_write(struct sec_pmic_dev *sec_pmic, u8 reg, u8 value);
333extern int s5m_bulk_write(struct s5m87xx_dev *s5m87xx, u8 reg, int count, u8 *buf); 333extern int sec_bulk_write(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf);
334extern int s5m_reg_update(struct s5m87xx_dev *s5m87xx, u8 reg, u8 val, u8 mask); 334extern int sec_reg_update(struct sec_pmic_dev *sec_pmic, u8 reg, u8 val, u8 mask);
335 335
336struct s5m_platform_data { 336struct sec_platform_data {
337 struct s5m_regulator_data *regulators; 337 struct sec_regulator_data *regulators;
338 struct s5m_opmode_data *opmode; 338 struct sec_opmode_data *opmode;
339 int device_type; 339 int device_type;
340 int num_regulators; 340 int num_regulators;
341 341
diff --git a/include/linux/mfd/samsung/s5m-pmic.h b/include/linux/mfd/samsung/s5m-pmic.h
index 7c719f20f58a..562febf73277 100644
--- a/include/linux/mfd/samsung/s5m-pmic.h
+++ b/include/linux/mfd/samsung/s5m-pmic.h
@@ -94,7 +94,7 @@ enum s5m8763_regulators {
94 * @id: regulator id 94 * @id: regulator id
95 * @initdata: regulator init data (contraints, supplies, ...) 95 * @initdata: regulator init data (contraints, supplies, ...)
96 */ 96 */
97struct s5m_regulator_data { 97struct sec_regulator_data {
98 int id; 98 int id;
99 struct regulator_init_data *initdata; 99 struct regulator_init_data *initdata;
100}; 100};
@@ -104,26 +104,26 @@ struct s5m_regulator_data {
104 * @id: regulator id 104 * @id: regulator id
105 * @mode: regulator operation mode 105 * @mode: regulator operation mode
106 */ 106 */
107struct s5m_opmode_data { 107struct sec_opmode_data {
108 int id; 108 int id;
109 int mode; 109 int mode;
110}; 110};
111 111
112/* 112/*
113 * s5m regulator operation mode 113 * samsung regulator operation mode
114 * S5M_OPMODE_OFF Regulator always OFF 114 * SEC_OPMODE_OFF Regulator always OFF
115 * S5M_OPMODE_ON Regulator always ON 115 * SEC_OPMODE_ON Regulator always ON
116 * S5M_OPMODE_LOWPOWER Regulator is on in low-power mode 116 * SEC_OPMODE_LOWPOWER Regulator is on in low-power mode
117 * S5M_OPMODE_SUSPEND Regulator is changed by PWREN pin 117 * SEC_OPMODE_SUSPEND Regulator is changed by PWREN pin
118 * If PWREN is high, regulator is on 118 * If PWREN is high, regulator is on
119 * If PWREN is low, regulator is off 119 * If PWREN is low, regulator is off
120 */ 120 */
121 121
122enum s5m_opmode { 122enum sec_opmode {
123 S5M_OPMODE_OFF, 123 SEC_OPMODE_OFF,
124 S5M_OPMODE_ON, 124 SEC_OPMODE_ON,
125 S5M_OPMODE_LOWPOWER, 125 SEC_OPMODE_LOWPOWER,
126 S5M_OPMODE_SUSPEND, 126 SEC_OPMODE_SUSPEND,
127}; 127};
128 128
129#endif /* __LINUX_MFD_S5M_PMIC_H */ 129#endif /* __LINUX_MFD_S5M_PMIC_H */