diff options
| -rw-r--r-- | Documentation/devicetree/bindings/mfd/tps65910.txt | 4 | ||||
| -rw-r--r-- | drivers/mfd/sec-core.c | 30 | ||||
| -rw-r--r-- | drivers/regulator/s2mps11.c | 2 | ||||
| -rw-r--r-- | drivers/regulator/s5m8767.c | 99 | ||||
| -rw-r--r-- | drivers/regulator/stw481x-vmmc.c | 12 | ||||
| -rw-r--r-- | drivers/regulator/tps51632-regulator.c | 30 | ||||
| -rw-r--r-- | drivers/regulator/tps62360-regulator.c | 2 | ||||
| -rw-r--r-- | drivers/regulator/tps65910-regulator.c | 40 | ||||
| -rw-r--r-- | drivers/regulator/twl-regulator.c | 4 | ||||
| -rw-r--r-- | drivers/regulator/wm831x-dcdc.c | 10 | ||||
| -rw-r--r-- | include/linux/mfd/samsung/core.h | 6 | ||||
| -rw-r--r-- | include/linux/mfd/samsung/s5m8767.h | 18 | ||||
| -rw-r--r-- | include/linux/mfd/tps65910.h | 5 |
13 files changed, 140 insertions, 122 deletions
diff --git a/Documentation/devicetree/bindings/mfd/tps65910.txt b/Documentation/devicetree/bindings/mfd/tps65910.txt index 2e3304888ffc..b4bd98af1cc7 100644 --- a/Documentation/devicetree/bindings/mfd/tps65910.txt +++ b/Documentation/devicetree/bindings/mfd/tps65910.txt | |||
| @@ -21,7 +21,7 @@ Required properties: | |||
| 21 | 21 | ||
| 22 | The valid regulator-compatible values are: | 22 | The valid regulator-compatible values are: |
| 23 | tps65910: vrtc, vio, vdd1, vdd2, vdd3, vdig1, vdig2, vpll, vdac, vaux1, | 23 | tps65910: vrtc, vio, vdd1, vdd2, vdd3, vdig1, vdig2, vpll, vdac, vaux1, |
| 24 | vaux2, vaux33, vmmc | 24 | vaux2, vaux33, vmmc, vbb |
| 25 | tps65911: vrtc, vio, vdd1, vdd3, vddctrl, ldo1, ldo2, ldo3, ldo4, ldo5, | 25 | tps65911: vrtc, vio, vdd1, vdd3, vddctrl, ldo1, ldo2, ldo3, ldo4, ldo5, |
| 26 | ldo6, ldo7, ldo8 | 26 | ldo6, ldo7, ldo8 |
| 27 | 27 | ||
| @@ -38,7 +38,7 @@ Required properties: | |||
| 38 | vcc4-supply: VAUX1 and VAUX2 input. | 38 | vcc4-supply: VAUX1 and VAUX2 input. |
| 39 | vcc5-supply: VPLL and VDAC input. | 39 | vcc5-supply: VPLL and VDAC input. |
| 40 | vcc6-supply: VDIG1 and VDIG2 input. | 40 | vcc6-supply: VDIG1 and VDIG2 input. |
| 41 | vcc7-supply: VRTC input. | 41 | vcc7-supply: VRTC and VBB input. |
| 42 | vccio-supply: VIO input. | 42 | vccio-supply: VIO input. |
| 43 | tps65911: | 43 | tps65911: |
| 44 | vcc1-supply: VDD1 input. | 44 | vcc1-supply: VDD1 input. |
diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 54cc25546592..1d158d5ba8b8 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c | |||
| @@ -79,36 +79,6 @@ static struct of_device_id sec_dt_match[] = { | |||
| 79 | }; | 79 | }; |
| 80 | #endif | 80 | #endif |
| 81 | 81 | ||
| 82 | int sec_reg_read(struct sec_pmic_dev *sec_pmic, u8 reg, void *dest) | ||
| 83 | { | ||
| 84 | return regmap_read(sec_pmic->regmap_pmic, reg, dest); | ||
| 85 | } | ||
| 86 | EXPORT_SYMBOL_GPL(sec_reg_read); | ||
| 87 | |||
| 88 | int sec_bulk_read(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf) | ||
| 89 | { | ||
| 90 | return regmap_bulk_read(sec_pmic->regmap_pmic, reg, buf, count); | ||
| 91 | } | ||
| 92 | EXPORT_SYMBOL_GPL(sec_bulk_read); | ||
| 93 | |||
| 94 | int sec_reg_write(struct sec_pmic_dev *sec_pmic, u8 reg, u8 value) | ||
| 95 | { | ||
| 96 | return regmap_write(sec_pmic->regmap_pmic, reg, value); | ||
| 97 | } | ||
| 98 | EXPORT_SYMBOL_GPL(sec_reg_write); | ||
| 99 | |||
| 100 | int sec_bulk_write(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf) | ||
| 101 | { | ||
| 102 | return regmap_raw_write(sec_pmic->regmap_pmic, reg, buf, count); | ||
| 103 | } | ||
| 104 | EXPORT_SYMBOL_GPL(sec_bulk_write); | ||
| 105 | |||
| 106 | int sec_reg_update(struct sec_pmic_dev *sec_pmic, u8 reg, u8 val, u8 mask) | ||
| 107 | { | ||
| 108 | return regmap_update_bits(sec_pmic->regmap_pmic, reg, mask, val); | ||
| 109 | } | ||
| 110 | EXPORT_SYMBOL_GPL(sec_reg_update); | ||
| 111 | |||
| 112 | static bool s2mps11_volatile(struct device *dev, unsigned int reg) | 82 | static bool s2mps11_volatile(struct device *dev, unsigned int reg) |
| 113 | { | 83 | { |
| 114 | switch (reg) { | 84 | switch (reg) { |
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index 9e61922d8230..d9e557990577 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c | |||
| @@ -70,8 +70,6 @@ static int s2mps11_regulator_set_voltage_time_sel(struct regulator_dev *rdev, | |||
| 70 | ramp_delay = s2mps11->ramp_delay2; | 70 | ramp_delay = s2mps11->ramp_delay2; |
| 71 | break; | 71 | break; |
| 72 | case S2MPS11_BUCK3: | 72 | case S2MPS11_BUCK3: |
| 73 | ramp_delay = s2mps11->ramp_delay34; | ||
| 74 | break; | ||
| 75 | case S2MPS11_BUCK4: | 73 | case S2MPS11_BUCK4: |
| 76 | ramp_delay = s2mps11->ramp_delay34; | 74 | ramp_delay = s2mps11->ramp_delay34; |
| 77 | break; | 75 | break; |
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c index aeb40aad0ae7..d7164bb75d3e 100644 --- a/drivers/regulator/s5m8767.c +++ b/drivers/regulator/s5m8767.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/mfd/samsung/core.h> | 23 | #include <linux/mfd/samsung/core.h> |
| 24 | #include <linux/mfd/samsung/s5m8767.h> | 24 | #include <linux/mfd/samsung/s5m8767.h> |
| 25 | #include <linux/regulator/of_regulator.h> | 25 | #include <linux/regulator/of_regulator.h> |
| 26 | #include <linux/regmap.h> | ||
| 26 | 27 | ||
| 27 | #define S5M8767_OPMODE_NORMAL_MODE 0x1 | 28 | #define S5M8767_OPMODE_NORMAL_MODE 0x1 |
| 28 | 29 | ||
| @@ -120,8 +121,8 @@ static const struct sec_voltage_desc *reg_voltage_map[] = { | |||
| 120 | [S5M8767_BUCK4] = &buck_voltage_val2, | 121 | [S5M8767_BUCK4] = &buck_voltage_val2, |
| 121 | [S5M8767_BUCK5] = &buck_voltage_val1, | 122 | [S5M8767_BUCK5] = &buck_voltage_val1, |
| 122 | [S5M8767_BUCK6] = &buck_voltage_val1, | 123 | [S5M8767_BUCK6] = &buck_voltage_val1, |
| 123 | [S5M8767_BUCK7] = NULL, | 124 | [S5M8767_BUCK7] = &buck_voltage_val3, |
| 124 | [S5M8767_BUCK8] = NULL, | 125 | [S5M8767_BUCK8] = &buck_voltage_val3, |
| 125 | [S5M8767_BUCK9] = &buck_voltage_val3, | 126 | [S5M8767_BUCK9] = &buck_voltage_val3, |
| 126 | }; | 127 | }; |
| 127 | 128 | ||
| @@ -217,7 +218,7 @@ static int s5m8767_reg_is_enabled(struct regulator_dev *rdev) | |||
| 217 | { | 218 | { |
| 218 | struct s5m8767_info *s5m8767 = rdev_get_drvdata(rdev); | 219 | struct s5m8767_info *s5m8767 = rdev_get_drvdata(rdev); |
| 219 | int ret, reg; | 220 | int ret, reg; |
| 220 | int mask = 0xc0, enable_ctrl; | 221 | int enable_ctrl; |
| 221 | unsigned int val; | 222 | unsigned int val; |
| 222 | 223 | ||
| 223 | ret = s5m8767_get_register(rdev, ®, &enable_ctrl); | 224 | ret = s5m8767_get_register(rdev, ®, &enable_ctrl); |
| @@ -226,37 +227,38 @@ static int s5m8767_reg_is_enabled(struct regulator_dev *rdev) | |||
| 226 | else if (ret) | 227 | else if (ret) |
| 227 | return ret; | 228 | return ret; |
| 228 | 229 | ||
| 229 | ret = sec_reg_read(s5m8767->iodev, reg, &val); | 230 | ret = regmap_read(s5m8767->iodev->regmap_pmic, reg, &val); |
| 230 | if (ret) | 231 | if (ret) |
| 231 | return ret; | 232 | return ret; |
| 232 | 233 | ||
| 233 | return (val & mask) == enable_ctrl; | 234 | return (val & S5M8767_ENCTRL_MASK) == enable_ctrl; |
| 234 | } | 235 | } |
| 235 | 236 | ||
| 236 | static int s5m8767_reg_enable(struct regulator_dev *rdev) | 237 | static int s5m8767_reg_enable(struct regulator_dev *rdev) |
| 237 | { | 238 | { |
| 238 | struct s5m8767_info *s5m8767 = rdev_get_drvdata(rdev); | 239 | struct s5m8767_info *s5m8767 = rdev_get_drvdata(rdev); |
| 239 | int ret, reg; | 240 | int ret, reg; |
| 240 | int mask = 0xc0, enable_ctrl; | 241 | int enable_ctrl; |
| 241 | 242 | ||
| 242 | ret = s5m8767_get_register(rdev, ®, &enable_ctrl); | 243 | ret = s5m8767_get_register(rdev, ®, &enable_ctrl); |
| 243 | if (ret) | 244 | if (ret) |
| 244 | return ret; | 245 | return ret; |
| 245 | 246 | ||
| 246 | return sec_reg_update(s5m8767->iodev, reg, enable_ctrl, mask); | 247 | return regmap_update_bits(s5m8767->iodev->regmap_pmic, reg, |
| 248 | S5M8767_ENCTRL_MASK, enable_ctrl); | ||
| 247 | } | 249 | } |
| 248 | 250 | ||
| 249 | static int s5m8767_reg_disable(struct regulator_dev *rdev) | 251 | static int s5m8767_reg_disable(struct regulator_dev *rdev) |
| 250 | { | 252 | { |
| 251 | struct s5m8767_info *s5m8767 = rdev_get_drvdata(rdev); | 253 | struct s5m8767_info *s5m8767 = rdev_get_drvdata(rdev); |
| 252 | int ret, reg; | 254 | int ret, reg, enable_ctrl; |
| 253 | int mask = 0xc0, enable_ctrl; | ||
| 254 | 255 | ||
| 255 | ret = s5m8767_get_register(rdev, ®, &enable_ctrl); | 256 | ret = s5m8767_get_register(rdev, ®, &enable_ctrl); |
| 256 | if (ret) | 257 | if (ret) |
| 257 | return ret; | 258 | return ret; |
| 258 | 259 | ||
| 259 | return sec_reg_update(s5m8767->iodev, reg, ~mask, mask); | 260 | return regmap_update_bits(s5m8767->iodev->regmap_pmic, reg, |
| 261 | S5M8767_ENCTRL_MASK, ~S5M8767_ENCTRL_MASK); | ||
| 260 | } | 262 | } |
| 261 | 263 | ||
| 262 | static int s5m8767_get_vsel_reg(int reg_id, struct s5m8767_info *s5m8767) | 264 | static int s5m8767_get_vsel_reg(int reg_id, struct s5m8767_info *s5m8767) |
| @@ -417,9 +419,12 @@ static struct regulator_ops s5m8767_ops = { | |||
| 417 | }; | 419 | }; |
| 418 | 420 | ||
| 419 | static struct regulator_ops s5m8767_buck78_ops = { | 421 | static struct regulator_ops s5m8767_buck78_ops = { |
| 422 | .list_voltage = regulator_list_voltage_linear, | ||
| 420 | .is_enabled = s5m8767_reg_is_enabled, | 423 | .is_enabled = s5m8767_reg_is_enabled, |
| 421 | .enable = s5m8767_reg_enable, | 424 | .enable = s5m8767_reg_enable, |
| 422 | .disable = s5m8767_reg_disable, | 425 | .disable = s5m8767_reg_disable, |
| 426 | .get_voltage_sel = regulator_get_voltage_sel_regmap, | ||
| 427 | .set_voltage_sel = regulator_set_voltage_sel_regmap, | ||
| 423 | }; | 428 | }; |
| 424 | 429 | ||
| 425 | #define s5m8767_regulator_desc(_name) { \ | 430 | #define s5m8767_regulator_desc(_name) { \ |
| @@ -745,17 +750,20 @@ static int s5m8767_pmic_probe(struct platform_device *pdev) | |||
| 745 | buck_init = s5m8767_convert_voltage_to_sel(&buck_voltage_val2, | 750 | buck_init = s5m8767_convert_voltage_to_sel(&buck_voltage_val2, |
| 746 | pdata->buck2_init); | 751 | pdata->buck2_init); |
| 747 | 752 | ||
| 748 | sec_reg_write(s5m8767->iodev, S5M8767_REG_BUCK2DVS2, buck_init); | 753 | regmap_write(s5m8767->iodev->regmap_pmic, S5M8767_REG_BUCK2DVS2, |
| 754 | buck_init); | ||
| 749 | 755 | ||
| 750 | buck_init = s5m8767_convert_voltage_to_sel(&buck_voltage_val2, | 756 | buck_init = s5m8767_convert_voltage_to_sel(&buck_voltage_val2, |
| 751 | pdata->buck3_init); | 757 | pdata->buck3_init); |
| 752 | 758 | ||
| 753 | sec_reg_write(s5m8767->iodev, S5M8767_REG_BUCK3DVS2, buck_init); | 759 | regmap_write(s5m8767->iodev->regmap_pmic, S5M8767_REG_BUCK3DVS2, |
| 760 | buck_init); | ||
| 754 | 761 | ||
| 755 | buck_init = s5m8767_convert_voltage_to_sel(&buck_voltage_val2, | 762 | buck_init = s5m8767_convert_voltage_to_sel(&buck_voltage_val2, |
| 756 | pdata->buck4_init); | 763 | pdata->buck4_init); |
| 757 | 764 | ||
| 758 | sec_reg_write(s5m8767->iodev, S5M8767_REG_BUCK4DVS2, buck_init); | 765 | regmap_write(s5m8767->iodev->regmap_pmic, S5M8767_REG_BUCK4DVS2, |
| 766 | buck_init); | ||
| 759 | 767 | ||
| 760 | for (i = 0; i < 8; i++) { | 768 | for (i = 0; i < 8; i++) { |
| 761 | if (s5m8767->buck2_gpiodvs) { | 769 | if (s5m8767->buck2_gpiodvs) { |
| @@ -837,71 +845,76 @@ static int s5m8767_pmic_probe(struct platform_device *pdev) | |||
| 837 | 845 | ||
| 838 | if (pdata->buck2_gpiodvs || pdata->buck3_gpiodvs || | 846 | if (pdata->buck2_gpiodvs || pdata->buck3_gpiodvs || |
| 839 | pdata->buck4_gpiodvs) { | 847 | pdata->buck4_gpiodvs) { |
| 840 | sec_reg_update(s5m8767->iodev, S5M8767_REG_BUCK2CTRL, | 848 | regmap_update_bits(s5m8767->iodev->regmap_pmic, |
| 841 | (pdata->buck2_gpiodvs) ? (1 << 1) : (0 << 1), | 849 | S5M8767_REG_BUCK2CTRL, 1 << 1, |
| 842 | 1 << 1); | 850 | (pdata->buck2_gpiodvs) ? (1 << 1) : (0 << 1)); |
| 843 | sec_reg_update(s5m8767->iodev, S5M8767_REG_BUCK3CTRL, | 851 | regmap_update_bits(s5m8767->iodev->regmap_pmic, |
| 844 | (pdata->buck3_gpiodvs) ? (1 << 1) : (0 << 1), | 852 | S5M8767_REG_BUCK3CTRL, 1 << 1, |
| 845 | 1 << 1); | 853 | (pdata->buck3_gpiodvs) ? (1 << 1) : (0 << 1)); |
| 846 | sec_reg_update(s5m8767->iodev, S5M8767_REG_BUCK4CTRL, | 854 | regmap_update_bits(s5m8767->iodev->regmap_pmic, |
| 847 | (pdata->buck4_gpiodvs) ? (1 << 1) : (0 << 1), | 855 | S5M8767_REG_BUCK4CTRL, 1 << 1, |
| 848 | 1 << 1); | 856 | (pdata->buck4_gpiodvs) ? (1 << 1) : (0 << 1)); |
| 849 | } | 857 | } |
| 850 | 858 | ||
| 851 | /* Initialize GPIO DVS registers */ | 859 | /* Initialize GPIO DVS registers */ |
| 852 | for (i = 0; i < 8; i++) { | 860 | for (i = 0; i < 8; i++) { |
| 853 | if (s5m8767->buck2_gpiodvs) { | 861 | if (s5m8767->buck2_gpiodvs) { |
| 854 | sec_reg_write(s5m8767->iodev, S5M8767_REG_BUCK2DVS1 + i, | 862 | regmap_write(s5m8767->iodev->regmap_pmic, |
| 855 | s5m8767->buck2_vol[i]); | 863 | S5M8767_REG_BUCK2DVS1 + i, |
| 864 | s5m8767->buck2_vol[i]); | ||
| 856 | } | 865 | } |
| 857 | 866 | ||
| 858 | if (s5m8767->buck3_gpiodvs) { | 867 | if (s5m8767->buck3_gpiodvs) { |
| 859 | sec_reg_write(s5m8767->iodev, S5M8767_REG_BUCK3DVS1 + i, | 868 | regmap_write(s5m8767->iodev->regmap_pmic, |
| 860 | s5m8767->buck3_vol[i]); | 869 | S5M8767_REG_BUCK3DVS1 + i, |
| 870 | s5m8767->buck3_vol[i]); | ||
| 861 | } | 871 | } |
| 862 | 872 | ||
| 863 | if (s5m8767->buck4_gpiodvs) { | 873 | if (s5m8767->buck4_gpiodvs) { |
| 864 | sec_reg_write(s5m8767->iodev, S5M8767_REG_BUCK4DVS1 + i, | 874 | regmap_write(s5m8767->iodev->regmap_pmic, |
| 865 | s5m8767->buck4_vol[i]); | 875 | S5M8767_REG_BUCK4DVS1 + i, |
| 876 | s5m8767->buck4_vol[i]); | ||
| 866 | } | 877 | } |
| 867 | } | 878 | } |
| 868 | 879 | ||
| 869 | if (s5m8767->buck2_ramp) | 880 | if (s5m8767->buck2_ramp) |
| 870 | sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, 0x08, 0x08); | 881 | regmap_update_bits(s5m8767->iodev->regmap_pmic, |
| 882 | S5M8767_REG_DVSRAMP, 0x08, 0x08); | ||
| 871 | 883 | ||
| 872 | if (s5m8767->buck3_ramp) | 884 | if (s5m8767->buck3_ramp) |
| 873 | sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, 0x04, 0x04); | 885 | regmap_update_bits(s5m8767->iodev->regmap_pmic, |
| 886 | S5M8767_REG_DVSRAMP, 0x04, 0x04); | ||
| 874 | 887 | ||
| 875 | if (s5m8767->buck4_ramp) | 888 | if (s5m8767->buck4_ramp) |
| 876 | sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, 0x02, 0x02); | 889 | regmap_update_bits(s5m8767->iodev->regmap_pmic, |
| 890 | S5M8767_REG_DVSRAMP, 0x02, 0x02); | ||
| 877 | 891 | ||
| 878 | if (s5m8767->buck2_ramp || s5m8767->buck3_ramp | 892 | if (s5m8767->buck2_ramp || s5m8767->buck3_ramp |
| 879 | || s5m8767->buck4_ramp) { | 893 | || s5m8767->buck4_ramp) { |
| 894 | unsigned int val; | ||
| 880 | switch (s5m8767->ramp_delay) { | 895 | switch (s5m8767->ramp_delay) { |
| 881 | case 5: | 896 | case 5: |
| 882 | sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, | 897 | val = S5M8767_DVS_BUCK_RAMP_5; |
| 883 | 0x40, 0xf0); | ||
| 884 | break; | 898 | break; |
| 885 | case 10: | 899 | case 10: |
| 886 | sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, | 900 | val = S5M8767_DVS_BUCK_RAMP_10; |
| 887 | 0x90, 0xf0); | ||
| 888 | break; | 901 | break; |
| 889 | case 25: | 902 | case 25: |
| 890 | sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, | 903 | val = S5M8767_DVS_BUCK_RAMP_25; |
| 891 | 0xd0, 0xf0); | ||
| 892 | break; | 904 | break; |
| 893 | case 50: | 905 | case 50: |
| 894 | sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, | 906 | val = S5M8767_DVS_BUCK_RAMP_50; |
| 895 | 0xe0, 0xf0); | ||
| 896 | break; | 907 | break; |
| 897 | case 100: | 908 | case 100: |
| 898 | sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, | 909 | val = S5M8767_DVS_BUCK_RAMP_100; |
| 899 | 0xf0, 0xf0); | ||
| 900 | break; | 910 | break; |
| 901 | default: | 911 | default: |
| 902 | sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, | 912 | val = S5M8767_DVS_BUCK_RAMP_10; |
| 903 | 0x90, 0xf0); | ||
| 904 | } | 913 | } |
| 914 | regmap_update_bits(s5m8767->iodev->regmap_pmic, | ||
| 915 | S5M8767_REG_DVSRAMP, | ||
| 916 | S5M8767_DVS_BUCK_RAMP_MASK, | ||
| 917 | val << S5M8767_DVS_BUCK_RAMP_SHIFT); | ||
| 905 | } | 918 | } |
| 906 | 919 | ||
| 907 | for (i = 0; i < pdata->num_regulators; i++) { | 920 | for (i = 0; i < pdata->num_regulators; i++) { |
diff --git a/drivers/regulator/stw481x-vmmc.c b/drivers/regulator/stw481x-vmmc.c index f78857bd6a15..a7e152696a02 100644 --- a/drivers/regulator/stw481x-vmmc.c +++ b/drivers/regulator/stw481x-vmmc.c | |||
| @@ -74,7 +74,8 @@ static int stw481x_vmmc_regulator_probe(struct platform_device *pdev) | |||
| 74 | config.init_data = of_get_regulator_init_data(&pdev->dev, | 74 | config.init_data = of_get_regulator_init_data(&pdev->dev, |
| 75 | pdev->dev.of_node); | 75 | pdev->dev.of_node); |
| 76 | 76 | ||
| 77 | stw481x->vmmc_regulator = regulator_register(&vmmc_regulator, &config); | 77 | stw481x->vmmc_regulator = devm_regulator_register(&pdev->dev, |
| 78 | &vmmc_regulator, &config); | ||
| 78 | if (IS_ERR(stw481x->vmmc_regulator)) { | 79 | if (IS_ERR(stw481x->vmmc_regulator)) { |
| 79 | dev_err(&pdev->dev, | 80 | dev_err(&pdev->dev, |
| 80 | "error initializing STw481x VMMC regulator\n"); | 81 | "error initializing STw481x VMMC regulator\n"); |
| @@ -85,14 +86,6 @@ static int stw481x_vmmc_regulator_probe(struct platform_device *pdev) | |||
| 85 | return 0; | 86 | return 0; |
| 86 | } | 87 | } |
| 87 | 88 | ||
| 88 | static int stw481x_vmmc_regulator_remove(struct platform_device *pdev) | ||
| 89 | { | ||
| 90 | struct stw481x *stw481x = dev_get_platdata(&pdev->dev); | ||
| 91 | |||
| 92 | regulator_unregister(stw481x->vmmc_regulator); | ||
| 93 | return 0; | ||
| 94 | } | ||
| 95 | |||
| 96 | static const struct of_device_id stw481x_vmmc_match[] = { | 89 | static const struct of_device_id stw481x_vmmc_match[] = { |
| 97 | { .compatible = "st,stw481x-vmmc", }, | 90 | { .compatible = "st,stw481x-vmmc", }, |
| 98 | {}, | 91 | {}, |
| @@ -105,7 +98,6 @@ static struct platform_driver stw481x_vmmc_regulator_driver = { | |||
| 105 | .of_match_table = stw481x_vmmc_match, | 98 | .of_match_table = stw481x_vmmc_match, |
| 106 | }, | 99 | }, |
| 107 | .probe = stw481x_vmmc_regulator_probe, | 100 | .probe = stw481x_vmmc_regulator_probe, |
| 108 | .remove = stw481x_vmmc_regulator_remove, | ||
| 109 | }; | 101 | }; |
| 110 | 102 | ||
| 111 | module_platform_driver(stw481x_vmmc_regulator_driver); | 103 | module_platform_driver(stw481x_vmmc_regulator_driver); |
diff --git a/drivers/regulator/tps51632-regulator.c b/drivers/regulator/tps51632-regulator.c index b0a3f0917a27..b3764f594ee9 100644 --- a/drivers/regulator/tps51632-regulator.c +++ b/drivers/regulator/tps51632-regulator.c | |||
| @@ -70,16 +70,16 @@ | |||
| 70 | #define TPS51632_POWER_STATE_SINGLE_PHASE_CCM 0x1 | 70 | #define TPS51632_POWER_STATE_SINGLE_PHASE_CCM 0x1 |
| 71 | #define TPS51632_POWER_STATE_SINGLE_PHASE_DCM 0x2 | 71 | #define TPS51632_POWER_STATE_SINGLE_PHASE_DCM 0x2 |
| 72 | 72 | ||
| 73 | #define TPS51632_MIN_VOLATGE 500000 | 73 | #define TPS51632_MIN_VOLTAGE 500000 |
| 74 | #define TPS51632_MAX_VOLATGE 1520000 | 74 | #define TPS51632_MAX_VOLTAGE 1520000 |
| 75 | #define TPS51632_VOLATGE_STEP_10mV 10000 | 75 | #define TPS51632_VOLTAGE_STEP_10mV 10000 |
| 76 | #define TPS51632_VOLATGE_STEP_20mV 20000 | 76 | #define TPS51632_VOLTAGE_STEP_20mV 20000 |
| 77 | #define TPS51632_MAX_VSEL 0x7F | 77 | #define TPS51632_MAX_VSEL 0x7F |
| 78 | #define TPS51632_MIN_VSEL 0x19 | 78 | #define TPS51632_MIN_VSEL 0x19 |
| 79 | #define TPS51632_DEFAULT_RAMP_DELAY 6000 | 79 | #define TPS51632_DEFAULT_RAMP_DELAY 6000 |
| 80 | #define TPS51632_VOLT_VSEL(uV) \ | 80 | #define TPS51632_VOLT_VSEL(uV) \ |
| 81 | (DIV_ROUND_UP(uV - TPS51632_MIN_VOLATGE, \ | 81 | (DIV_ROUND_UP(uV - TPS51632_MIN_VOLTAGE, \ |
| 82 | TPS51632_VOLATGE_STEP_10mV) + \ | 82 | TPS51632_VOLTAGE_STEP_10mV) + \ |
| 83 | TPS51632_MIN_VSEL) | 83 | TPS51632_MIN_VSEL) |
| 84 | 84 | ||
| 85 | /* TPS51632 chip information */ | 85 | /* TPS51632 chip information */ |
| @@ -243,9 +243,9 @@ static struct tps51632_regulator_platform_data * | |||
| 243 | pdata->dvfs_step_20mV = of_property_read_bool(np, "ti,dvfs-step-20mV"); | 243 | pdata->dvfs_step_20mV = of_property_read_bool(np, "ti,dvfs-step-20mV"); |
| 244 | 244 | ||
| 245 | pdata->base_voltage_uV = pdata->reg_init_data->constraints.min_uV ? : | 245 | pdata->base_voltage_uV = pdata->reg_init_data->constraints.min_uV ? : |
| 246 | TPS51632_MIN_VOLATGE; | 246 | TPS51632_MIN_VOLTAGE; |
| 247 | pdata->max_voltage_uV = pdata->reg_init_data->constraints.max_uV ? : | 247 | pdata->max_voltage_uV = pdata->reg_init_data->constraints.max_uV ? : |
| 248 | TPS51632_MAX_VOLATGE; | 248 | TPS51632_MAX_VOLTAGE; |
| 249 | return pdata; | 249 | return pdata; |
| 250 | } | 250 | } |
| 251 | #else | 251 | #else |
| @@ -284,15 +284,15 @@ static int tps51632_probe(struct i2c_client *client, | |||
| 284 | } | 284 | } |
| 285 | 285 | ||
| 286 | if (pdata->enable_pwm_dvfs) { | 286 | if (pdata->enable_pwm_dvfs) { |
| 287 | if ((pdata->base_voltage_uV < TPS51632_MIN_VOLATGE) || | 287 | if ((pdata->base_voltage_uV < TPS51632_MIN_VOLTAGE) || |
| 288 | (pdata->base_voltage_uV > TPS51632_MAX_VOLATGE)) { | 288 | (pdata->base_voltage_uV > TPS51632_MAX_VOLTAGE)) { |
| 289 | dev_err(&client->dev, "Invalid base_voltage_uV setting\n"); | 289 | dev_err(&client->dev, "Invalid base_voltage_uV setting\n"); |
| 290 | return -EINVAL; | 290 | return -EINVAL; |
| 291 | } | 291 | } |
| 292 | 292 | ||
| 293 | if ((pdata->max_voltage_uV) && | 293 | if ((pdata->max_voltage_uV) && |
| 294 | ((pdata->max_voltage_uV < TPS51632_MIN_VOLATGE) || | 294 | ((pdata->max_voltage_uV < TPS51632_MIN_VOLTAGE) || |
| 295 | (pdata->max_voltage_uV > TPS51632_MAX_VOLATGE))) { | 295 | (pdata->max_voltage_uV > TPS51632_MAX_VOLTAGE))) { |
| 296 | dev_err(&client->dev, "Invalid max_voltage_uV setting\n"); | 296 | dev_err(&client->dev, "Invalid max_voltage_uV setting\n"); |
| 297 | return -EINVAL; | 297 | return -EINVAL; |
| 298 | } | 298 | } |
| @@ -305,11 +305,11 @@ static int tps51632_probe(struct i2c_client *client, | |||
| 305 | } | 305 | } |
| 306 | 306 | ||
| 307 | tps->dev = &client->dev; | 307 | tps->dev = &client->dev; |
| 308 | tps->desc.name = id->name; | 308 | tps->desc.name = client->name; |
| 309 | tps->desc.id = 0; | 309 | tps->desc.id = 0; |
| 310 | tps->desc.ramp_delay = TPS51632_DEFAULT_RAMP_DELAY; | 310 | tps->desc.ramp_delay = TPS51632_DEFAULT_RAMP_DELAY; |
| 311 | tps->desc.min_uV = TPS51632_MIN_VOLATGE; | 311 | tps->desc.min_uV = TPS51632_MIN_VOLTAGE; |
| 312 | tps->desc.uV_step = TPS51632_VOLATGE_STEP_10mV; | 312 | tps->desc.uV_step = TPS51632_VOLTAGE_STEP_10mV; |
| 313 | tps->desc.linear_min_sel = TPS51632_MIN_VSEL; | 313 | tps->desc.linear_min_sel = TPS51632_MIN_VSEL; |
| 314 | tps->desc.n_voltages = TPS51632_MAX_VSEL + 1; | 314 | tps->desc.n_voltages = TPS51632_MAX_VSEL + 1; |
| 315 | tps->desc.ops = &tps51632_dcdc_ops; | 315 | tps->desc.ops = &tps51632_dcdc_ops; |
diff --git a/drivers/regulator/tps62360-regulator.c b/drivers/regulator/tps62360-regulator.c index c2c0185a2dcd..c3fa15a299b1 100644 --- a/drivers/regulator/tps62360-regulator.c +++ b/drivers/regulator/tps62360-regulator.c | |||
| @@ -360,7 +360,7 @@ static int tps62360_probe(struct i2c_client *client, | |||
| 360 | dev_err(&client->dev, "Error: No device match found\n"); | 360 | dev_err(&client->dev, "Error: No device match found\n"); |
| 361 | return -ENODEV; | 361 | return -ENODEV; |
| 362 | } | 362 | } |
| 363 | chip_id = (int)match->data; | 363 | chip_id = (int)(long)match->data; |
| 364 | if (!pdata) | 364 | if (!pdata) |
| 365 | pdata = of_get_tps62360_platform_data(&client->dev); | 365 | pdata = of_get_tps62360_platform_data(&client->dev); |
| 366 | } else if (id) { | 366 | } else if (id) { |
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c index a00132e31ec7..f50dd847eebc 100644 --- a/drivers/regulator/tps65910-regulator.c +++ b/drivers/regulator/tps65910-regulator.c | |||
| @@ -88,6 +88,11 @@ static const unsigned int VMMC_VSEL_table[] = { | |||
| 88 | 1800000, 2800000, 3000000, 3300000, | 88 | 1800000, 2800000, 3000000, 3300000, |
| 89 | }; | 89 | }; |
| 90 | 90 | ||
| 91 | /* supported BBCH voltages in microvolts */ | ||
| 92 | static const unsigned int VBB_VSEL_table[] = { | ||
| 93 | 3000000, 2520000, 3150000, 5000000, | ||
| 94 | }; | ||
| 95 | |||
| 91 | struct tps_info { | 96 | struct tps_info { |
| 92 | const char *name; | 97 | const char *name; |
| 93 | const char *vin_name; | 98 | const char *vin_name; |
| @@ -183,6 +188,12 @@ static struct tps_info tps65910_regs[] = { | |||
| 183 | .voltage_table = VMMC_VSEL_table, | 188 | .voltage_table = VMMC_VSEL_table, |
| 184 | .enable_time_us = 100, | 189 | .enable_time_us = 100, |
| 185 | }, | 190 | }, |
| 191 | { | ||
| 192 | .name = "vbb", | ||
| 193 | .vin_name = "vcc7", | ||
| 194 | .n_voltages = ARRAY_SIZE(VBB_VSEL_table), | ||
| 195 | .voltage_table = VBB_VSEL_table, | ||
| 196 | }, | ||
| 186 | }; | 197 | }; |
| 187 | 198 | ||
| 188 | static struct tps_info tps65911_regs[] = { | 199 | static struct tps_info tps65911_regs[] = { |
| @@ -339,6 +350,8 @@ static int tps65910_get_ctrl_register(int id) | |||
| 339 | return TPS65910_VAUX33; | 350 | return TPS65910_VAUX33; |
| 340 | case TPS65910_REG_VMMC: | 351 | case TPS65910_REG_VMMC: |
| 341 | return TPS65910_VMMC; | 352 | return TPS65910_VMMC; |
| 353 | case TPS65910_REG_VBB: | ||
| 354 | return TPS65910_BBCH; | ||
| 342 | default: | 355 | default: |
| 343 | return -EINVAL; | 356 | return -EINVAL; |
| 344 | } | 357 | } |
| @@ -528,6 +541,10 @@ static int tps65910_get_voltage_sel(struct regulator_dev *dev) | |||
| 528 | value &= LDO_SEL_MASK; | 541 | value &= LDO_SEL_MASK; |
| 529 | value >>= LDO_SEL_SHIFT; | 542 | value >>= LDO_SEL_SHIFT; |
| 530 | break; | 543 | break; |
| 544 | case TPS65910_REG_VBB: | ||
| 545 | value &= BBCH_BBSEL_MASK; | ||
| 546 | value >>= BBCH_BBSEL_SHIFT; | ||
| 547 | break; | ||
| 531 | default: | 548 | default: |
| 532 | return -EINVAL; | 549 | return -EINVAL; |
| 533 | } | 550 | } |
| @@ -638,6 +655,9 @@ static int tps65910_set_voltage_sel(struct regulator_dev *dev, | |||
| 638 | case TPS65910_REG_VMMC: | 655 | case TPS65910_REG_VMMC: |
| 639 | return tps65910_reg_update_bits(pmic->mfd, reg, LDO_SEL_MASK, | 656 | return tps65910_reg_update_bits(pmic->mfd, reg, LDO_SEL_MASK, |
| 640 | selector << LDO_SEL_SHIFT); | 657 | selector << LDO_SEL_SHIFT); |
| 658 | case TPS65910_REG_VBB: | ||
| 659 | return tps65910_reg_update_bits(pmic->mfd, reg, BBCH_BBSEL_MASK, | ||
| 660 | selector << BBCH_BBSEL_SHIFT); | ||
| 641 | } | 661 | } |
| 642 | 662 | ||
| 643 | return -EINVAL; | 663 | return -EINVAL; |
| @@ -669,6 +689,9 @@ static int tps65911_set_voltage_sel(struct regulator_dev *dev, | |||
| 669 | case TPS65910_REG_VIO: | 689 | case TPS65910_REG_VIO: |
| 670 | return tps65910_reg_update_bits(pmic->mfd, reg, LDO_SEL_MASK, | 690 | return tps65910_reg_update_bits(pmic->mfd, reg, LDO_SEL_MASK, |
| 671 | selector << LDO_SEL_SHIFT); | 691 | selector << LDO_SEL_SHIFT); |
| 692 | case TPS65910_REG_VBB: | ||
| 693 | return tps65910_reg_update_bits(pmic->mfd, reg, BBCH_BBSEL_MASK, | ||
| 694 | selector << BBCH_BBSEL_SHIFT); | ||
| 672 | } | 695 | } |
| 673 | 696 | ||
| 674 | return -EINVAL; | 697 | return -EINVAL; |
| @@ -762,6 +785,18 @@ static struct regulator_ops tps65910_ops_vdd3 = { | |||
| 762 | .map_voltage = regulator_map_voltage_ascend, | 785 | .map_voltage = regulator_map_voltage_ascend, |
| 763 | }; | 786 | }; |
| 764 | 787 | ||
| 788 | static struct regulator_ops tps65910_ops_vbb = { | ||
| 789 | .is_enabled = regulator_is_enabled_regmap, | ||
| 790 | .enable = regulator_enable_regmap, | ||
| 791 | .disable = regulator_disable_regmap, | ||
| 792 | .set_mode = tps65910_set_mode, | ||
| 793 | .get_mode = tps65910_get_mode, | ||
| 794 | .get_voltage_sel = tps65910_get_voltage_sel, | ||
| 795 | .set_voltage_sel = tps65910_set_voltage_sel, | ||
| 796 | .list_voltage = regulator_list_voltage_table, | ||
| 797 | .map_voltage = regulator_map_voltage_iterate, | ||
| 798 | }; | ||
| 799 | |||
| 765 | static struct regulator_ops tps65910_ops = { | 800 | static struct regulator_ops tps65910_ops = { |
| 766 | .is_enabled = regulator_is_enabled_regmap, | 801 | .is_enabled = regulator_is_enabled_regmap, |
| 767 | .enable = regulator_enable_regmap, | 802 | .enable = regulator_enable_regmap, |
| @@ -944,6 +979,7 @@ static struct of_regulator_match tps65910_matches[] = { | |||
| 944 | { .name = "vaux2", .driver_data = (void *) &tps65910_regs[10] }, | 979 | { .name = "vaux2", .driver_data = (void *) &tps65910_regs[10] }, |
| 945 | { .name = "vaux33", .driver_data = (void *) &tps65910_regs[11] }, | 980 | { .name = "vaux33", .driver_data = (void *) &tps65910_regs[11] }, |
| 946 | { .name = "vmmc", .driver_data = (void *) &tps65910_regs[12] }, | 981 | { .name = "vmmc", .driver_data = (void *) &tps65910_regs[12] }, |
| 982 | { .name = "vbb", .driver_data = (void *) &tps65910_regs[13] }, | ||
| 947 | }; | 983 | }; |
| 948 | 984 | ||
| 949 | static struct of_regulator_match tps65911_matches[] = { | 985 | static struct of_regulator_match tps65911_matches[] = { |
| @@ -1145,6 +1181,10 @@ static int tps65910_probe(struct platform_device *pdev) | |||
| 1145 | pmic->desc[i].ops = &tps65910_ops_dcdc; | 1181 | pmic->desc[i].ops = &tps65910_ops_dcdc; |
| 1146 | pmic->desc[i].ramp_delay = 5000; | 1182 | pmic->desc[i].ramp_delay = 5000; |
| 1147 | } | 1183 | } |
| 1184 | } else if (i == TPS65910_REG_VBB && | ||
| 1185 | tps65910_chip_id(tps65910) == TPS65910) { | ||
| 1186 | pmic->desc[i].ops = &tps65910_ops_vbb; | ||
| 1187 | pmic->desc[i].volt_table = info->voltage_table; | ||
| 1148 | } else { | 1188 | } else { |
| 1149 | if (tps65910_chip_id(tps65910) == TPS65910) { | 1189 | if (tps65910_chip_id(tps65910) == TPS65910) { |
| 1150 | pmic->desc[i].ops = &tps65910_ops; | 1190 | pmic->desc[i].ops = &tps65910_ops; |
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 8ebd785485c7..fed28abef419 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c | |||
| @@ -58,7 +58,7 @@ struct twlreg_info { | |||
| 58 | struct regulator_desc desc; | 58 | struct regulator_desc desc; |
| 59 | 59 | ||
| 60 | /* chip specific features */ | 60 | /* chip specific features */ |
| 61 | unsigned long features; | 61 | unsigned long features; |
| 62 | 62 | ||
| 63 | /* | 63 | /* |
| 64 | * optional override functions for voltage set/get | 64 | * optional override functions for voltage set/get |
| @@ -1128,7 +1128,7 @@ static int twlreg_probe(struct platform_device *pdev) | |||
| 1128 | if (!initdata) | 1128 | if (!initdata) |
| 1129 | return -EINVAL; | 1129 | return -EINVAL; |
| 1130 | 1130 | ||
| 1131 | info = kmemdup(template, sizeof (*info), GFP_KERNEL); | 1131 | info = kmemdup(template, sizeof(*info), GFP_KERNEL); |
| 1132 | if (!info) | 1132 | if (!info) |
| 1133 | return -ENOMEM; | 1133 | return -ENOMEM; |
| 1134 | 1134 | ||
diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c index 6823e6f2b88a..04cf9c16ef23 100644 --- a/drivers/regulator/wm831x-dcdc.c +++ b/drivers/regulator/wm831x-dcdc.c | |||
| @@ -762,8 +762,7 @@ static int wm831x_boostp_probe(struct platform_device *pdev) | |||
| 762 | res = platform_get_resource(pdev, IORESOURCE_REG, 0); | 762 | res = platform_get_resource(pdev, IORESOURCE_REG, 0); |
| 763 | if (res == NULL) { | 763 | if (res == NULL) { |
| 764 | dev_err(&pdev->dev, "No REG resource\n"); | 764 | dev_err(&pdev->dev, "No REG resource\n"); |
| 765 | ret = -EINVAL; | 765 | return -EINVAL; |
| 766 | goto err; | ||
| 767 | } | 766 | } |
| 768 | dcdc->base = res->start; | 767 | dcdc->base = res->start; |
| 769 | 768 | ||
| @@ -788,7 +787,7 @@ static int wm831x_boostp_probe(struct platform_device *pdev) | |||
| 788 | ret = PTR_ERR(dcdc->regulator); | 787 | ret = PTR_ERR(dcdc->regulator); |
| 789 | dev_err(wm831x->dev, "Failed to register DCDC%d: %d\n", | 788 | dev_err(wm831x->dev, "Failed to register DCDC%d: %d\n", |
| 790 | id + 1, ret); | 789 | id + 1, ret); |
| 791 | goto err; | 790 | return ret; |
| 792 | } | 791 | } |
| 793 | 792 | ||
| 794 | irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV")); | 793 | irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV")); |
| @@ -799,15 +798,12 @@ static int wm831x_boostp_probe(struct platform_device *pdev) | |||
| 799 | if (ret != 0) { | 798 | if (ret != 0) { |
| 800 | dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", | 799 | dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", |
| 801 | irq, ret); | 800 | irq, ret); |
| 802 | goto err; | 801 | return ret; |
| 803 | } | 802 | } |
| 804 | 803 | ||
| 805 | platform_set_drvdata(pdev, dcdc); | 804 | platform_set_drvdata(pdev, dcdc); |
| 806 | 805 | ||
| 807 | return 0; | 806 | return 0; |
| 808 | |||
| 809 | err: | ||
| 810 | return ret; | ||
| 811 | } | 807 | } |
| 812 | 808 | ||
| 813 | static struct platform_driver wm831x_boostp_driver = { | 809 | static struct platform_driver wm831x_boostp_driver = { |
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index cab2dd279076..41c9bde410c5 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h | |||
| @@ -59,12 +59,6 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic); | |||
| 59 | void sec_irq_exit(struct sec_pmic_dev *sec_pmic); | 59 | void sec_irq_exit(struct sec_pmic_dev *sec_pmic); |
| 60 | int sec_irq_resume(struct sec_pmic_dev *sec_pmic); | 60 | int sec_irq_resume(struct sec_pmic_dev *sec_pmic); |
| 61 | 61 | ||
| 62 | extern int sec_reg_read(struct sec_pmic_dev *sec_pmic, u8 reg, void *dest); | ||
| 63 | extern int sec_bulk_read(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf); | ||
| 64 | extern int sec_reg_write(struct sec_pmic_dev *sec_pmic, u8 reg, u8 value); | ||
| 65 | extern int sec_bulk_write(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf); | ||
| 66 | extern int sec_reg_update(struct sec_pmic_dev *sec_pmic, u8 reg, u8 val, u8 mask); | ||
| 67 | |||
| 68 | struct sec_platform_data { | 62 | struct sec_platform_data { |
| 69 | struct sec_regulator_data *regulators; | 63 | struct sec_regulator_data *regulators; |
| 70 | struct sec_opmode_data *opmode; | 64 | struct sec_opmode_data *opmode; |
diff --git a/include/linux/mfd/samsung/s5m8767.h b/include/linux/mfd/samsung/s5m8767.h index 306a95fc558c..2ab0b0f03641 100644 --- a/include/linux/mfd/samsung/s5m8767.h +++ b/include/linux/mfd/samsung/s5m8767.h | |||
| @@ -183,6 +183,22 @@ enum s5m8767_regulators { | |||
| 183 | S5M8767_REG_MAX, | 183 | S5M8767_REG_MAX, |
| 184 | }; | 184 | }; |
| 185 | 185 | ||
| 186 | #define S5M8767_ENCTRL_SHIFT 6 | 186 | #define S5M8767_ENCTRL_SHIFT 6 |
| 187 | #define S5M8767_ENCTRL_MASK (0x3 << S5M8767_ENCTRL_SHIFT) | ||
| 188 | |||
| 189 | /* | ||
| 190 | * Values for BUCK_RAMP field in DVS_RAMP register, matching raw values | ||
| 191 | * in mV/us. | ||
| 192 | */ | ||
| 193 | enum s5m8767_dvs_buck_ramp_values { | ||
| 194 | S5M8767_DVS_BUCK_RAMP_5 = 0x4, | ||
| 195 | S5M8767_DVS_BUCK_RAMP_10 = 0x9, | ||
| 196 | S5M8767_DVS_BUCK_RAMP_12_5 = 0xb, | ||
| 197 | S5M8767_DVS_BUCK_RAMP_25 = 0xd, | ||
| 198 | S5M8767_DVS_BUCK_RAMP_50 = 0xe, | ||
| 199 | S5M8767_DVS_BUCK_RAMP_100 = 0xf, | ||
| 200 | }; | ||
| 201 | #define S5M8767_DVS_BUCK_RAMP_SHIFT 4 | ||
| 202 | #define S5M8767_DVS_BUCK_RAMP_MASK (0xf << S5M8767_DVS_BUCK_RAMP_SHIFT) | ||
| 187 | 203 | ||
| 188 | #endif /* __LINUX_MFD_S5M8767_H */ | 204 | #endif /* __LINUX_MFD_S5M8767_H */ |
diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h index 20e433e551e3..16c2335c2856 100644 --- a/include/linux/mfd/tps65910.h +++ b/include/linux/mfd/tps65910.h | |||
| @@ -358,8 +358,6 @@ | |||
| 358 | /*Register BBCH (0x80) register.RegisterDescription */ | 358 | /*Register BBCH (0x80) register.RegisterDescription */ |
| 359 | #define BBCH_BBSEL_MASK 0x06 | 359 | #define BBCH_BBSEL_MASK 0x06 |
| 360 | #define BBCH_BBSEL_SHIFT 1 | 360 | #define BBCH_BBSEL_SHIFT 1 |
| 361 | #define BBCH_BBCHEN_MASK 0x01 | ||
| 362 | #define BBCH_BBCHEN_SHIFT 0 | ||
| 363 | 361 | ||
| 364 | 362 | ||
| 365 | /*Register DCDCCTRL (0x80) register.RegisterDescription */ | 363 | /*Register DCDCCTRL (0x80) register.RegisterDescription */ |
| @@ -833,6 +831,7 @@ | |||
| 833 | #define TPS65910_REG_VAUX2 10 | 831 | #define TPS65910_REG_VAUX2 10 |
| 834 | #define TPS65910_REG_VAUX33 11 | 832 | #define TPS65910_REG_VAUX33 11 |
| 835 | #define TPS65910_REG_VMMC 12 | 833 | #define TPS65910_REG_VMMC 12 |
| 834 | #define TPS65910_REG_VBB 13 | ||
| 836 | 835 | ||
| 837 | #define TPS65911_REG_VDDCTRL 4 | 836 | #define TPS65911_REG_VDDCTRL 4 |
| 838 | #define TPS65911_REG_LDO1 5 | 837 | #define TPS65911_REG_LDO1 5 |
| @@ -845,7 +844,7 @@ | |||
| 845 | #define TPS65911_REG_LDO8 12 | 844 | #define TPS65911_REG_LDO8 12 |
| 846 | 845 | ||
| 847 | /* Max number of TPS65910/11 regulators */ | 846 | /* Max number of TPS65910/11 regulators */ |
| 848 | #define TPS65910_NUM_REGS 13 | 847 | #define TPS65910_NUM_REGS 14 |
| 849 | 848 | ||
| 850 | /* External sleep controls through EN1/EN2/EN3/SLEEP inputs */ | 849 | /* External sleep controls through EN1/EN2/EN3/SLEEP inputs */ |
| 851 | #define TPS65910_SLEEP_CONTROL_EXT_INPUT_EN1 0x1 | 850 | #define TPS65910_SLEEP_CONTROL_EXT_INPUT_EN1 0x1 |
