summaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/samsung
diff options
context:
space:
mode:
authorSangbeom Kim <sbkim73@samsung.com>2012-07-11 21:06:55 +0900
committerSamuel Ortiz <sameo@linux.intel.com>2012-07-16 14:26:45 +0200
commit63063bfbffe997452e2ee4890f22dcde0119001e (patch)
tree97fe4749b7a3c55fe094334f1def509623dc5702 /include/linux/mfd/samsung
parent66c9fbb9895499ff3aede96845968138a5bec8ab (diff)
downloadop-kernel-dev-63063bfbffe997452e2ee4890f22dcde0119001e.zip
op-kernel-dev-63063bfbffe997452e2ee4890f22dcde0119001e.tar.gz
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/samsung')
-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 7332ff6..d3b4f63 100644
--- a/include/linux/mfd/samsung/s5m-core.h
+++ b/include/linux/mfd/samsung/s5m-core.h
@@ -16,7 +16,7 @@
#define NUM_IRQ_REGS 4
-enum s5m_device_type {
+enum sec_device_type {
S5M8751X,
S5M8763X,
S5M8767X,
@@ -292,20 +292,20 @@ enum s5m8763_irq {
#define S5M8763_ENRAMP (1 << 4)
/**
- * struct s5m87xx_dev - s5m87xx master device for sub-drivers
+ * struct sec_pmic_dev - sec_pmic master device for sub-drivers
* @dev: master device of the chip (can be used to access platform data)
* @i2c: i2c client private data for regulator
* @rtc: i2c client private data for rtc
* @iolock: mutex for serializing io access
* @irqlock: mutex for buslock
- * @irq_base: base IRQ number for s5m87xx, required for IRQs
+ * @irq_base: base IRQ number for sec_pmic, required for IRQs
* @irq: generic IRQ number for s5m87xx
* @ono: power onoff IRQ number for s5m87xx
* @irq_masks_cur: currently active value
* @irq_masks_cache: cached hardware value
* @type: indicate which s5m87xx "variant" is used
*/
-struct s5m87xx_dev {
+struct sec_pmic_dev {
struct device *dev;
struct regmap *regmap;
struct i2c_client *i2c;
@@ -323,19 +323,19 @@ struct s5m87xx_dev {
bool wakeup;
};
-int s5m_irq_init(struct s5m87xx_dev *s5m87xx);
-void s5m_irq_exit(struct s5m87xx_dev *s5m87xx);
-int s5m_irq_resume(struct s5m87xx_dev *s5m87xx);
+int sec_irq_init(struct sec_pmic_dev *sec_pmic);
+void sec_irq_exit(struct sec_pmic_dev *sec_pmic);
+int sec_irq_resume(struct sec_pmic_dev *sec_pmic);
-extern int s5m_reg_read(struct s5m87xx_dev *s5m87xx, u8 reg, void *dest);
-extern int s5m_bulk_read(struct s5m87xx_dev *s5m87xx, u8 reg, int count, u8 *buf);
-extern int s5m_reg_write(struct s5m87xx_dev *s5m87xx, u8 reg, u8 value);
-extern int s5m_bulk_write(struct s5m87xx_dev *s5m87xx, u8 reg, int count, u8 *buf);
-extern int s5m_reg_update(struct s5m87xx_dev *s5m87xx, u8 reg, u8 val, u8 mask);
+extern int sec_reg_read(struct sec_pmic_dev *sec_pmic, u8 reg, void *dest);
+extern int sec_bulk_read(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf);
+extern int sec_reg_write(struct sec_pmic_dev *sec_pmic, u8 reg, u8 value);
+extern int sec_bulk_write(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf);
+extern int sec_reg_update(struct sec_pmic_dev *sec_pmic, u8 reg, u8 val, u8 mask);
-struct s5m_platform_data {
- struct s5m_regulator_data *regulators;
- struct s5m_opmode_data *opmode;
+struct sec_platform_data {
+ struct sec_regulator_data *regulators;
+ struct sec_opmode_data *opmode;
int device_type;
int num_regulators;
diff --git a/include/linux/mfd/samsung/s5m-pmic.h b/include/linux/mfd/samsung/s5m-pmic.h
index 7c719f2..562febf 100644
--- a/include/linux/mfd/samsung/s5m-pmic.h
+++ b/include/linux/mfd/samsung/s5m-pmic.h
@@ -94,7 +94,7 @@ enum s5m8763_regulators {
* @id: regulator id
* @initdata: regulator init data (contraints, supplies, ...)
*/
-struct s5m_regulator_data {
+struct sec_regulator_data {
int id;
struct regulator_init_data *initdata;
};
@@ -104,26 +104,26 @@ struct s5m_regulator_data {
* @id: regulator id
* @mode: regulator operation mode
*/
-struct s5m_opmode_data {
+struct sec_opmode_data {
int id;
int mode;
};
/*
- * s5m regulator operation mode
- * S5M_OPMODE_OFF Regulator always OFF
- * S5M_OPMODE_ON Regulator always ON
- * S5M_OPMODE_LOWPOWER Regulator is on in low-power mode
- * S5M_OPMODE_SUSPEND Regulator is changed by PWREN pin
+ * samsung regulator operation mode
+ * SEC_OPMODE_OFF Regulator always OFF
+ * SEC_OPMODE_ON Regulator always ON
+ * SEC_OPMODE_LOWPOWER Regulator is on in low-power mode
+ * SEC_OPMODE_SUSPEND Regulator is changed by PWREN pin
* If PWREN is high, regulator is on
* If PWREN is low, regulator is off
*/
-enum s5m_opmode {
- S5M_OPMODE_OFF,
- S5M_OPMODE_ON,
- S5M_OPMODE_LOWPOWER,
- S5M_OPMODE_SUSPEND,
+enum sec_opmode {
+ SEC_OPMODE_OFF,
+ SEC_OPMODE_ON,
+ SEC_OPMODE_LOWPOWER,
+ SEC_OPMODE_SUSPEND,
};
#endif /* __LINUX_MFD_S5M_PMIC_H */
OpenPOWER on IntegriCloud