diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-03 15:27:53 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-03 15:27:53 -0400 |
| commit | a90f0e9ebb88ba7b0efea4e7d9defc0c2b96f712 (patch) | |
| tree | e3a026a1dbf96ce5d500def6c0eaa35305829133 /include/linux | |
| parent | 14b730723aac9cf3ba0a74e830491e9a43bfc80a (diff) | |
| parent | ae53b5dbafc9713359696a9cff7e25f2aeaafada (diff) | |
Merge tag 'regulator-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown:
"Quite a lot going on with the regulator API for this release, much
more in the core than in the drivers for a change:
- Fixes for voltage change propagation through dumb power switches.
- A notification when regulators are enabled.
- A new settling time property for regulators where the time taken to
move to a new voltage is not related to the size of the change.
- Some reorganization of the Arizona drivers in preparation for
sharing the code with the next generation devices they've been
integrated with.
- Support for newer Freescale chips in the Anatop regulator.
- A new driver for voltage controlled regulators to cope with some
exciting ChromeOS hardware designs.
- Support for Rohm BD9571MWV-M and TI TPS65132"
* tag 'regulator-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (51 commits)
regulator: Add ROHM BD9571MWV-M PMIC regulator driver
regulator: arizona-ldo1: Factor out generic initialization
regulator: arizona-ldo1: Make arizona_ldo1 independent of struct arizona
regulator: arizona-ldo1: Move pdata into a separate structure
regulator: arizona-micsupp: Factor out generic initialization
regulator: arizona-micsupp: Make arizona_micsupp independent of struct arizona
regulator: arizona-micsupp: Move pdata into a separate structure
regulator: arizona: Split KConfig options for LDO1 and MICSUPP regulators
regulator: anatop: make regulator name property required
regulator: tps65023: Fix inverted core enable logic.
regulator: anatop: make sure regulator name is properly defined
regulator: core: Allow dummy regulators for supplies
regulator: core: Only propagate voltage changes to if it can change voltages
regulator: vctrl: Fix out of bounds array access for vctrl->vtable
regulator: tps65132: fix platform_no_drv_owner.cocci warnings
regulator: tps65132: Fix off-by-one for .max_register setting
regulator: anatop: set default voltage selector for pcie
regulator: tps65132: add device-tree binding
regulator: tps65132: add regulator driver for TI TPS65132
regulator: anatop: remove unneeded name field of struct anatop_regulator
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mfd/arizona/pdata.h | 7 | ||||
| -rw-r--r-- | include/linux/platform_data/isl9305.h | 2 | ||||
| -rw-r--r-- | include/linux/regulator/arizona-ldo1.h | 24 | ||||
| -rw-r--r-- | include/linux/regulator/arizona-micsupp.h | 21 | ||||
| -rw-r--r-- | include/linux/regulator/consumer.h | 1 | ||||
| -rw-r--r-- | include/linux/regulator/driver.h | 18 | ||||
| -rw-r--r-- | include/linux/regulator/machine.h | 3 | ||||
| -rw-r--r-- | include/linux/regulator/pfuze100.h | 1 |
8 files changed, 73 insertions, 4 deletions
diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h index 64faeeff698c..bfeecf179895 100644 --- a/include/linux/mfd/arizona/pdata.h +++ b/include/linux/mfd/arizona/pdata.h | |||
| @@ -12,6 +12,8 @@ | |||
| 12 | #define _ARIZONA_PDATA_H | 12 | #define _ARIZONA_PDATA_H |
| 13 | 13 | ||
| 14 | #include <dt-bindings/mfd/arizona.h> | 14 | #include <dt-bindings/mfd/arizona.h> |
| 15 | #include <linux/regulator/arizona-ldo1.h> | ||
| 16 | #include <linux/regulator/arizona-micsupp.h> | ||
| 15 | 17 | ||
| 16 | #define ARIZONA_GPN_DIR_MASK 0x8000 /* GPN_DIR */ | 18 | #define ARIZONA_GPN_DIR_MASK 0x8000 /* GPN_DIR */ |
| 17 | #define ARIZONA_GPN_DIR_SHIFT 15 /* GPN_DIR */ | 19 | #define ARIZONA_GPN_DIR_SHIFT 15 /* GPN_DIR */ |
| @@ -76,13 +78,12 @@ struct arizona_micd_range { | |||
| 76 | 78 | ||
| 77 | struct arizona_pdata { | 79 | struct arizona_pdata { |
| 78 | int reset; /** GPIO controlling /RESET, if any */ | 80 | int reset; /** GPIO controlling /RESET, if any */ |
| 79 | int ldoena; /** GPIO controlling LODENA, if any */ | ||
| 80 | 81 | ||
| 81 | /** Regulator configuration for MICVDD */ | 82 | /** Regulator configuration for MICVDD */ |
| 82 | struct regulator_init_data *micvdd; | 83 | struct arizona_micsupp_pdata micvdd; |
| 83 | 84 | ||
| 84 | /** Regulator configuration for LDO1 */ | 85 | /** Regulator configuration for LDO1 */ |
| 85 | struct regulator_init_data *ldo1; | 86 | struct arizona_ldo1_pdata ldo1; |
| 86 | 87 | ||
| 87 | /** If a direct 32kHz clock is provided on an MCLK specify it here */ | 88 | /** If a direct 32kHz clock is provided on an MCLK specify it here */ |
| 88 | int clk32k_src; | 89 | int clk32k_src; |
diff --git a/include/linux/platform_data/isl9305.h b/include/linux/platform_data/isl9305.h index 1419133fa69e..4ac1a070af0a 100644 --- a/include/linux/platform_data/isl9305.h +++ b/include/linux/platform_data/isl9305.h | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | struct regulator_init_data; | 24 | struct regulator_init_data; |
| 25 | 25 | ||
| 26 | struct isl9305_pdata { | 26 | struct isl9305_pdata { |
| 27 | struct regulator_init_data *init_data[ISL9305_MAX_REGULATOR]; | 27 | struct regulator_init_data *init_data[ISL9305_MAX_REGULATOR + 1]; |
| 28 | }; | 28 | }; |
| 29 | 29 | ||
| 30 | #endif | 30 | #endif |
diff --git a/include/linux/regulator/arizona-ldo1.h b/include/linux/regulator/arizona-ldo1.h new file mode 100644 index 000000000000..c685f1277c63 --- /dev/null +++ b/include/linux/regulator/arizona-ldo1.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* | ||
| 2 | * Platform data for Arizona LDO1 regulator | ||
| 3 | * | ||
| 4 | * Copyright 2017 Cirrus Logic | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef ARIZONA_LDO1_H | ||
| 12 | #define ARIZONA_LDO1_H | ||
| 13 | |||
| 14 | struct regulator_init_data; | ||
| 15 | |||
| 16 | struct arizona_ldo1_pdata { | ||
| 17 | /** GPIO controlling LDOENA, if any */ | ||
| 18 | int ldoena; | ||
| 19 | |||
| 20 | /** Regulator configuration for LDO1 */ | ||
| 21 | const struct regulator_init_data *init_data; | ||
| 22 | }; | ||
| 23 | |||
| 24 | #endif | ||
diff --git a/include/linux/regulator/arizona-micsupp.h b/include/linux/regulator/arizona-micsupp.h new file mode 100644 index 000000000000..616842619c00 --- /dev/null +++ b/include/linux/regulator/arizona-micsupp.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* | ||
| 2 | * Platform data for Arizona micsupp regulator | ||
| 3 | * | ||
| 4 | * Copyright 2017 Cirrus Logic | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef ARIZONA_MICSUPP_H | ||
| 12 | #define ARIZONA_MICSUPP_H | ||
| 13 | |||
| 14 | struct regulator_init_data; | ||
| 15 | |||
| 16 | struct arizona_micsupp_pdata { | ||
| 17 | /** Regulator configuration for micsupp */ | ||
| 18 | const struct regulator_init_data *init_data; | ||
| 19 | }; | ||
| 20 | |||
| 21 | #endif | ||
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index ea0fffa5faeb..df176d7c2b87 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
| @@ -119,6 +119,7 @@ struct regmap; | |||
| 119 | #define REGULATOR_EVENT_ABORT_VOLTAGE_CHANGE 0x200 | 119 | #define REGULATOR_EVENT_ABORT_VOLTAGE_CHANGE 0x200 |
| 120 | #define REGULATOR_EVENT_PRE_DISABLE 0x400 | 120 | #define REGULATOR_EVENT_PRE_DISABLE 0x400 |
| 121 | #define REGULATOR_EVENT_ABORT_DISABLE 0x800 | 121 | #define REGULATOR_EVENT_ABORT_DISABLE 0x800 |
| 122 | #define REGULATOR_EVENT_ENABLE 0x1000 | ||
| 122 | 123 | ||
| 123 | /* | 124 | /* |
| 124 | * Regulator errors that can be queried using regulator_get_error_flags | 125 | * Regulator errors that can be queried using regulator_get_error_flags |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index dac8e7b16bc6..94417b4226bd 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
| @@ -292,6 +292,14 @@ enum regulator_type { | |||
| 292 | * set_active_discharge | 292 | * set_active_discharge |
| 293 | * @active_discharge_reg: Register for control when using regmap | 293 | * @active_discharge_reg: Register for control when using regmap |
| 294 | * set_active_discharge | 294 | * set_active_discharge |
| 295 | * @soft_start_reg: Register for control when using regmap set_soft_start | ||
| 296 | * @soft_start_mask: Mask for control when using regmap set_soft_start | ||
| 297 | * @soft_start_val_on: Enabling value for control when using regmap | ||
| 298 | * set_soft_start | ||
| 299 | * @pull_down_reg: Register for control when using regmap set_pull_down | ||
| 300 | * @pull_down_mask: Mask for control when using regmap set_pull_down | ||
| 301 | * @pull_down_val_on: Enabling value for control when using regmap | ||
| 302 | * set_pull_down | ||
| 295 | * | 303 | * |
| 296 | * @enable_time: Time taken for initial enable of regulator (in uS). | 304 | * @enable_time: Time taken for initial enable of regulator (in uS). |
| 297 | * @off_on_delay: guard time (in uS), before re-enabling a regulator | 305 | * @off_on_delay: guard time (in uS), before re-enabling a regulator |
| @@ -345,6 +353,12 @@ struct regulator_desc { | |||
| 345 | unsigned int active_discharge_off; | 353 | unsigned int active_discharge_off; |
| 346 | unsigned int active_discharge_mask; | 354 | unsigned int active_discharge_mask; |
| 347 | unsigned int active_discharge_reg; | 355 | unsigned int active_discharge_reg; |
| 356 | unsigned int soft_start_reg; | ||
| 357 | unsigned int soft_start_mask; | ||
| 358 | unsigned int soft_start_val_on; | ||
| 359 | unsigned int pull_down_reg; | ||
| 360 | unsigned int pull_down_mask; | ||
| 361 | unsigned int pull_down_val_on; | ||
| 348 | 362 | ||
| 349 | unsigned int enable_time; | 363 | unsigned int enable_time; |
| 350 | 364 | ||
| @@ -429,6 +443,8 @@ struct regulator_dev { | |||
| 429 | struct regulator_enable_gpio *ena_pin; | 443 | struct regulator_enable_gpio *ena_pin; |
| 430 | unsigned int ena_gpio_state:1; | 444 | unsigned int ena_gpio_state:1; |
| 431 | 445 | ||
| 446 | unsigned int is_switch:1; | ||
| 447 | |||
| 432 | /* time when this regulator was disabled last time */ | 448 | /* time when this regulator was disabled last time */ |
| 433 | unsigned long last_off_jiffy; | 449 | unsigned long last_off_jiffy; |
| 434 | }; | 450 | }; |
| @@ -476,6 +492,8 @@ int regulator_set_voltage_time_sel(struct regulator_dev *rdev, | |||
| 476 | unsigned int new_selector); | 492 | unsigned int new_selector); |
| 477 | int regulator_set_bypass_regmap(struct regulator_dev *rdev, bool enable); | 493 | int regulator_set_bypass_regmap(struct regulator_dev *rdev, bool enable); |
| 478 | int regulator_get_bypass_regmap(struct regulator_dev *rdev, bool *enable); | 494 | int regulator_get_bypass_regmap(struct regulator_dev *rdev, bool *enable); |
| 495 | int regulator_set_soft_start_regmap(struct regulator_dev *rdev); | ||
| 496 | int regulator_set_pull_down_regmap(struct regulator_dev *rdev); | ||
| 479 | 497 | ||
| 480 | int regulator_set_active_discharge_regmap(struct regulator_dev *rdev, | 498 | int regulator_set_active_discharge_regmap(struct regulator_dev *rdev, |
| 481 | bool enable); | 499 | bool enable); |
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index c9f795e9a2ee..117699d1f7df 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h | |||
| @@ -108,6 +108,8 @@ struct regulator_state { | |||
| 108 | * @initial_state: Suspend state to set by default. | 108 | * @initial_state: Suspend state to set by default. |
| 109 | * @initial_mode: Mode to set at startup. | 109 | * @initial_mode: Mode to set at startup. |
| 110 | * @ramp_delay: Time to settle down after voltage change (unit: uV/us) | 110 | * @ramp_delay: Time to settle down after voltage change (unit: uV/us) |
| 111 | * @settling_time: Time to settle down after voltage change when voltage | ||
| 112 | * change is non-linear (unit: microseconds). | ||
| 111 | * @active_discharge: Enable/disable active discharge. The enum | 113 | * @active_discharge: Enable/disable active discharge. The enum |
| 112 | * regulator_active_discharge values are used for | 114 | * regulator_active_discharge values are used for |
| 113 | * initialisation. | 115 | * initialisation. |
| @@ -149,6 +151,7 @@ struct regulation_constraints { | |||
| 149 | unsigned int initial_mode; | 151 | unsigned int initial_mode; |
| 150 | 152 | ||
| 151 | unsigned int ramp_delay; | 153 | unsigned int ramp_delay; |
| 154 | unsigned int settling_time; | ||
| 152 | unsigned int enable_time; | 155 | unsigned int enable_time; |
| 153 | 156 | ||
| 154 | unsigned int active_discharge; | 157 | unsigned int active_discharge; |
diff --git a/include/linux/regulator/pfuze100.h b/include/linux/regulator/pfuze100.h index 70c6c66c5bcf..e0ccf46f66cf 100644 --- a/include/linux/regulator/pfuze100.h +++ b/include/linux/regulator/pfuze100.h | |||
| @@ -48,6 +48,7 @@ | |||
| 48 | #define PFUZE200_VGEN4 10 | 48 | #define PFUZE200_VGEN4 10 |
| 49 | #define PFUZE200_VGEN5 11 | 49 | #define PFUZE200_VGEN5 11 |
| 50 | #define PFUZE200_VGEN6 12 | 50 | #define PFUZE200_VGEN6 12 |
| 51 | #define PFUZE200_COIN 13 | ||
| 51 | 52 | ||
| 52 | #define PFUZE3000_SW1A 0 | 53 | #define PFUZE3000_SW1A 0 |
| 53 | #define PFUZE3000_SW1B 1 | 54 | #define PFUZE3000_SW1B 1 |
