aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-13 15:04:35 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-13 15:04:35 -0500
commit8b0cab14951fbf8126795ab301835a8f8126a988 (patch)
tree2bf23662944ac9bfcd34d13ef81a6e331266ebf9 /include/linux/mfd
parentfd62c5450324af7f6cc12897b09b77285cd48a92 (diff)
parent4ffc45c3604dd8e283884ce006faf0e955cbd9e6 (diff)
Merge tag 'regulator-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown: "A fairly quiet release again, a couple of relatively small new features and a bunch of driver specific work including yet more code elimination and fixes from Axel Lin. - Addidion of linear_min_sel for offsetting linear selectors in the helpers. - Support for continuous voltage ranges for regulators with extremely high resolution. - Drivers for AS3711, DA9055, MAX9873, TPS51632, TPS80031 and ARM vexpress." Fix up trivial conflict (due to typo fix) in palmas-regulator.c * tag 'regulator-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (80 commits) regulator: core: Fix logic to determinate if regulator can change voltage regulator: s5m8767: Fix to work even if no DVS gpio present regulator: s5m8767: Fix to read the first DVS register. regulator: s5m8767: Fix to work when platform registers less regulators regulator: gpio-regulator: gpio_set_value should use cansleep regulator: gpio-regulator: Fix logical error in for() loop regulator: anatop: Use regulator_[get|set]_voltage_sel_regmap regulator: anatop: Use linear_min_sel with linear mapping regulator: max1586: Implement get_voltage_sel callback regulator: lp8788-buck: Kill _gpio_request function regulator: tps80031: Convert tps80031_ldo_ops to linear_min_sel and list_voltage_linear regulator: lp8788-ldo: Remove val array in lp8788_config_ldo_enable_mode regulator: gpio-regulator: Add ifdef CONFIG_OF guard for regulator_gpio_of_match regulator: palmas: Convert palmas_ops_smps to regulator_[get|set]_voltage_sel_regmap regulator: palmas: Return raw register values as the selectors in [get|set]_voltage_sel regulators: add regulator_can_change_voltage() function regulator: tps51632: Ensure [base|max]_voltage_uV pdata settings are valid regulator: wm831x-dcdc: Add MODULE_ALIAS for wm831x-boostp regulator: wm831x-dcdc: Ensure selected voltage falls within requested range regulator: tps51632: Use linear_min_sel and regulator_[map|list]_voltage_linear ...
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/arizona/registers.h16
-rw-r--r--include/linux/mfd/da9055/pdata.h27
-rw-r--r--include/linux/mfd/max8997-private.h1
-rw-r--r--include/linux/mfd/max8997.h1
-rw-r--r--include/linux/mfd/tps65090.h35
-rw-r--r--include/linux/mfd/tps6586x.h3
6 files changed, 80 insertions, 3 deletions
diff --git a/include/linux/mfd/arizona/registers.h b/include/linux/mfd/arizona/registers.h
index 7671a287dfee..ba26e99c388d 100644
--- a/include/linux/mfd/arizona/registers.h
+++ b/include/linux/mfd/arizona/registers.h
@@ -76,6 +76,7 @@
76#define ARIZONA_RATE_ESTIMATOR_3 0x154 76#define ARIZONA_RATE_ESTIMATOR_3 0x154
77#define ARIZONA_RATE_ESTIMATOR_4 0x155 77#define ARIZONA_RATE_ESTIMATOR_4 0x155
78#define ARIZONA_RATE_ESTIMATOR_5 0x156 78#define ARIZONA_RATE_ESTIMATOR_5 0x156
79#define ARIZONA_DYNAMIC_FREQUENCY_SCALING_1 0x161
79#define ARIZONA_FLL1_CONTROL_1 0x171 80#define ARIZONA_FLL1_CONTROL_1 0x171
80#define ARIZONA_FLL1_CONTROL_2 0x172 81#define ARIZONA_FLL1_CONTROL_2 0x172
81#define ARIZONA_FLL1_CONTROL_3 0x173 82#define ARIZONA_FLL1_CONTROL_3 0x173
@@ -110,6 +111,7 @@
110#define ARIZONA_FLL2_GPIO_CLOCK 0x1AA 111#define ARIZONA_FLL2_GPIO_CLOCK 0x1AA
111#define ARIZONA_MIC_CHARGE_PUMP_1 0x200 112#define ARIZONA_MIC_CHARGE_PUMP_1 0x200
112#define ARIZONA_LDO1_CONTROL_1 0x210 113#define ARIZONA_LDO1_CONTROL_1 0x210
114#define ARIZONA_LDO1_CONTROL_2 0x212
113#define ARIZONA_LDO2_CONTROL_1 0x213 115#define ARIZONA_LDO2_CONTROL_1 0x213
114#define ARIZONA_MIC_BIAS_CTRL_1 0x218 116#define ARIZONA_MIC_BIAS_CTRL_1 0x218
115#define ARIZONA_MIC_BIAS_CTRL_2 0x219 117#define ARIZONA_MIC_BIAS_CTRL_2 0x219
@@ -1574,6 +1576,13 @@
1574#define ARIZONA_SAMPLE_RATE_DETECT_D_WIDTH 5 /* SAMPLE_RATE_DETECT_D - [4:0] */ 1576#define ARIZONA_SAMPLE_RATE_DETECT_D_WIDTH 5 /* SAMPLE_RATE_DETECT_D - [4:0] */
1575 1577
1576/* 1578/*
1579 * R353 (0x161) - Dynamic Frequency Scaling 1
1580 */
1581#define ARIZONA_SUBSYS_MAX_FREQ 0x0001 /* SUBSYS_MAX_FREQ */
1582#define ARIZONA_SUBSYS_MAX_FREQ_SHIFT 0 /* SUBSYS_MAX_FREQ */
1583#define ARIZONA_SUBSYS_MAX_FREQ_WIDTH 1 /* SUBSYS_MAX_FREQ */
1584
1585/*
1577 * R369 (0x171) - FLL1 Control 1 1586 * R369 (0x171) - FLL1 Control 1
1578 */ 1587 */
1579#define ARIZONA_FLL1_FREERUN 0x0002 /* FLL1_FREERUN */ 1588#define ARIZONA_FLL1_FREERUN 0x0002 /* FLL1_FREERUN */
@@ -1889,6 +1898,13 @@
1889#define ARIZONA_LDO1_ENA_WIDTH 1 /* LDO1_ENA */ 1898#define ARIZONA_LDO1_ENA_WIDTH 1 /* LDO1_ENA */
1890 1899
1891/* 1900/*
1901 * R530 (0x212) - LDO1 Control 2
1902 */
1903#define ARIZONA_LDO1_HI_PWR 0x0001 /* LDO1_HI_PWR */
1904#define ARIZONA_LDO1_HI_PWR_SHIFT 0 /* LDO1_HI_PWR */
1905#define ARIZONA_LDO1_HI_PWR_WIDTH 1 /* LDO1_HI_PWR */
1906
1907/*
1892 * R531 (0x213) - LDO2 Control 1 1908 * R531 (0x213) - LDO2 Control 1
1893 */ 1909 */
1894#define ARIZONA_LDO2_VSEL_MASK 0x07E0 /* LDO2_VSEL - [10:5] */ 1910#define ARIZONA_LDO2_VSEL_MASK 0x07E0 /* LDO2_VSEL - [10:5] */
diff --git a/include/linux/mfd/da9055/pdata.h b/include/linux/mfd/da9055/pdata.h
index 147293b4471d..f87a6c172a91 100644
--- a/include/linux/mfd/da9055/pdata.h
+++ b/include/linux/mfd/da9055/pdata.h
@@ -25,8 +25,29 @@ struct da9055_pdata {
25 int gpio_base; 25 int gpio_base;
26 26
27 struct regulator_init_data *regulators[DA9055_MAX_REGULATORS]; 27 struct regulator_init_data *regulators[DA9055_MAX_REGULATORS];
28 bool reset_enable; /* Enable RTC in RESET Mode */ 28 /* Enable RTC in RESET Mode */
29 enum gpio_select *gpio_rsel; /* Select regulator set thru GPIO 1/2 */ 29 bool reset_enable;
30 enum gpio_select *gpio_ren; /* Enable regulator thru GPIO 1/2 */ 30 /*
31 * GPI muxed pin to control
32 * regulator state A/B, 0 if not available.
33 */
34 int *gpio_ren;
35 /*
36 * GPI muxed pin to control
37 * regulator set, 0 if not available.
38 */
39 int *gpio_rsel;
40 /*
41 * Regulator mode control bits value (GPI offset) that
42 * that controls the regulator state, 0 if not available.
43 */
44 enum gpio_select *reg_ren;
45 /*
46 * Regulator mode control bits value (GPI offset) that
47 * controls the regulator set A/B, 0 if not available.
48 */
49 enum gpio_select *reg_rsel;
50 /* GPIOs to enable regulator, 0 if not available */
51 int *ena_gpio;
31}; 52};
32#endif /* __DA9055_PDATA_H */ 53#endif /* __DA9055_PDATA_H */
diff --git a/include/linux/mfd/max8997-private.h b/include/linux/mfd/max8997-private.h
index 830152cfae33..6ae21bf47d64 100644
--- a/include/linux/mfd/max8997-private.h
+++ b/include/linux/mfd/max8997-private.h
@@ -316,6 +316,7 @@ enum max8997_irq {
316#define MAX8997_NUM_GPIO 12 316#define MAX8997_NUM_GPIO 12
317struct max8997_dev { 317struct max8997_dev {
318 struct device *dev; 318 struct device *dev;
319 struct max8997_platform_data *pdata;
319 struct i2c_client *i2c; /* 0xcc / PMIC, Battery Control, and FLASH */ 320 struct i2c_client *i2c; /* 0xcc / PMIC, Battery Control, and FLASH */
320 struct i2c_client *rtc; /* slave addr 0x0c */ 321 struct i2c_client *rtc; /* slave addr 0x0c */
321 struct i2c_client *haptic; /* slave addr 0x90 */ 322 struct i2c_client *haptic; /* slave addr 0x90 */
diff --git a/include/linux/mfd/max8997.h b/include/linux/mfd/max8997.h
index 328d8e24b533..1d4a4fe6ac33 100644
--- a/include/linux/mfd/max8997.h
+++ b/include/linux/mfd/max8997.h
@@ -75,6 +75,7 @@ enum max8998_regulators {
75struct max8997_regulator_data { 75struct max8997_regulator_data {
76 int id; 76 int id;
77 struct regulator_init_data *initdata; 77 struct regulator_init_data *initdata;
78 struct device_node *reg_node;
78}; 79};
79 80
80enum max8997_muic_usb_type { 81enum max8997_muic_usb_type {
diff --git a/include/linux/mfd/tps65090.h b/include/linux/mfd/tps65090.h
index 6bc31d854626..804e280c1e1d 100644
--- a/include/linux/mfd/tps65090.h
+++ b/include/linux/mfd/tps65090.h
@@ -24,6 +24,25 @@
24 24
25#include <linux/irq.h> 25#include <linux/irq.h>
26 26
27/* TPS65090 Regulator ID */
28enum {
29 TPS65090_REGULATOR_DCDC1,
30 TPS65090_REGULATOR_DCDC2,
31 TPS65090_REGULATOR_DCDC3,
32 TPS65090_REGULATOR_FET1,
33 TPS65090_REGULATOR_FET2,
34 TPS65090_REGULATOR_FET3,
35 TPS65090_REGULATOR_FET4,
36 TPS65090_REGULATOR_FET5,
37 TPS65090_REGULATOR_FET6,
38 TPS65090_REGULATOR_FET7,
39 TPS65090_REGULATOR_LDO1,
40 TPS65090_REGULATOR_LDO2,
41
42 /* Last entry for maximum ID */
43 TPS65090_REGULATOR_MAX,
44};
45
27struct tps65090 { 46struct tps65090 {
28 struct mutex lock; 47 struct mutex lock;
29 struct device *dev; 48 struct device *dev;
@@ -41,10 +60,26 @@ struct tps65090_subdev_info {
41 void *platform_data; 60 void *platform_data;
42}; 61};
43 62
63/*
64 * struct tps65090_regulator_plat_data
65 *
66 * @reg_init_data: The regulator init data.
67 * @enable_ext_control: Enable extrenal control or not. Only available for
68 * DCDC1, DCDC2 and DCDC3.
69 * @gpio: Gpio number if external control is enabled and controlled through
70 * gpio.
71 */
72struct tps65090_regulator_plat_data {
73 struct regulator_init_data *reg_init_data;
74 bool enable_ext_control;
75 int gpio;
76};
77
44struct tps65090_platform_data { 78struct tps65090_platform_data {
45 int irq_base; 79 int irq_base;
46 int num_subdevs; 80 int num_subdevs;
47 struct tps65090_subdev_info *subdevs; 81 struct tps65090_subdev_info *subdevs;
82 struct tps65090_regulator_plat_data *reg_pdata[TPS65090_REGULATOR_MAX];
48}; 83};
49 84
50/* 85/*
diff --git a/include/linux/mfd/tps6586x.h b/include/linux/mfd/tps6586x.h
index 2dd123194958..f8da0e152567 100644
--- a/include/linux/mfd/tps6586x.h
+++ b/include/linux/mfd/tps6586x.h
@@ -29,6 +29,7 @@ enum {
29 TPS6586X_ID_LDO_8, 29 TPS6586X_ID_LDO_8,
30 TPS6586X_ID_LDO_9, 30 TPS6586X_ID_LDO_9,
31 TPS6586X_ID_LDO_RTC, 31 TPS6586X_ID_LDO_RTC,
32 TPS6586X_ID_MAX_REGULATOR,
32}; 33};
33 34
34enum { 35enum {
@@ -79,6 +80,8 @@ struct tps6586x_platform_data {
79 int gpio_base; 80 int gpio_base;
80 int irq_base; 81 int irq_base;
81 bool pm_off; 82 bool pm_off;
83
84 struct regulator_init_data *reg_init_data[TPS6586X_ID_MAX_REGULATOR];
82}; 85};
83 86
84/* 87/*