summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-04-03 11:52:16 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-03 11:52:16 -0700
commitb51c4354dffd32b3472c5a3da7ce864c7be82601 (patch)
tree84efef7ea859085da102b2446c91ea8dd9a9b82b /include
parentffd776bf564f1308fb94634b032df296ce3134a3 (diff)
parent36fd679f45a25a7c634b3dbec35a2d7fdb832a65 (diff)
downloadlinux-b51c4354dffd32b3472c5a3da7ce864c7be82601.tar.bz2
Merge tag 'regulator-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown: "A very small set of updates for the regulator API this time around, there's a few bug fixes and also: - Conversion of the regulator API to use GPIO descriptors rather than numbers from Linus Walleij. - New drivers for Marvell 88PG86x and Qualcomm PM8998 and PMI8998" * tag 'regulator-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: qcom: smd: Add pm8998 and pmi8998 regulators regulator: core: Add missing blank line between functions regulator: qcom_smd: Drop regulator/{machine,of_regulator} includes regulator: giving regulator controlling gpios a non-empty label when used through the devicetree. regulator: gpio: Fix some error handling paths in 'gpio_regulator_probe()' regulator: 88pg86x: new i2c dual regulator chip regulator: 88pg86x: add DT bindings document regulator: da9211: Pass descriptors instead of GPIO numbers regulator: da9055: Pass descriptor instead of GPIO number regulator: core: Support passing an initialized GPIO enable descriptor regulator: dt: regulator-name is required property regulator: of: Add a missing 'of_node_put()' in an error handling path of 'of_regulator_match()'
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/da9055/pdata.h5
-rw-r--r--include/linux/regulator/da9211.h4
-rw-r--r--include/linux/regulator/driver.h3
-rw-r--r--include/linux/soc/qcom/smd-rpm.h1
4 files changed, 10 insertions, 3 deletions
diff --git a/include/linux/mfd/da9055/pdata.h b/include/linux/mfd/da9055/pdata.h
index 04e092be4b07..1a94fa2ac309 100644
--- a/include/linux/mfd/da9055/pdata.h
+++ b/include/linux/mfd/da9055/pdata.h
@@ -12,6 +12,7 @@
#define DA9055_MAX_REGULATORS 8
struct da9055;
+struct gpio_desc;
enum gpio_select {
NO_GPIO = 0,
@@ -47,7 +48,7 @@ struct da9055_pdata {
* controls the regulator set A/B, 0 if not available.
*/
enum gpio_select *reg_rsel;
- /* GPIOs to enable regulator, 0 if not available */
- int *ena_gpio;
+ /* GPIO descriptors to enable regulator, NULL if not available */
+ struct gpio_desc **ena_gpiods;
};
#endif /* __DA9055_PDATA_H */
diff --git a/include/linux/regulator/da9211.h b/include/linux/regulator/da9211.h
index f2fd2d3bf58f..d1f2073e4d5f 100644
--- a/include/linux/regulator/da9211.h
+++ b/include/linux/regulator/da9211.h
@@ -21,6 +21,8 @@
#define DA9211_MAX_REGULATORS 2
+struct gpio_desc;
+
enum da9211_chip_id {
DA9211,
DA9212,
@@ -39,7 +41,7 @@ struct da9211_pdata {
* 2 : 2 phase 2 buck
*/
int num_buck;
- int gpio_ren[DA9211_MAX_REGULATORS];
+ struct gpio_desc *gpiod_ren[DA9211_MAX_REGULATORS];
struct device_node *reg_node[DA9211_MAX_REGULATORS];
struct regulator_init_data *init_data[DA9211_MAX_REGULATORS];
};
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 4c00486b7a78..4fc96cb8e5d7 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -19,6 +19,7 @@
#include <linux/notifier.h>
#include <linux/regulator/consumer.h>
+struct gpio_desc;
struct regmap;
struct regulator_dev;
struct regulator_config;
@@ -387,6 +388,7 @@ struct regulator_desc {
* initialized, meaning that >= 0 is a valid gpio
* identifier and < 0 is a non existent gpio.
* @ena_gpio: GPIO controlling regulator enable.
+ * @ena_gpiod: GPIO descriptor controlling regulator enable.
* @ena_gpio_invert: Sense for GPIO enable control.
* @ena_gpio_flags: Flags to use when calling gpio_request_one()
*/
@@ -399,6 +401,7 @@ struct regulator_config {
bool ena_gpio_initialized;
int ena_gpio;
+ struct gpio_desc *ena_gpiod;
unsigned int ena_gpio_invert:1;
unsigned int ena_gpio_flags;
};
diff --git a/include/linux/soc/qcom/smd-rpm.h b/include/linux/soc/qcom/smd-rpm.h
index 9f5c6e53f3a5..9e4fdd861a51 100644
--- a/include/linux/soc/qcom/smd-rpm.h
+++ b/include/linux/soc/qcom/smd-rpm.h
@@ -10,6 +10,7 @@ struct qcom_smd_rpm;
/*
* Constants used for addressing resources in the RPM.
*/
+#define QCOM_SMD_RPM_BOBB 0x62626f62
#define QCOM_SMD_RPM_BOOST 0x61747362
#define QCOM_SMD_RPM_BUS_CLK 0x316b6c63
#define QCOM_SMD_RPM_BUS_MASTER 0x73616d62