Skip to contentSkip to conversation

power: regulator: Add support for gpio regulators

PATCH New Keerthy 4 participants 6 messages Sep 15, 2016 – Oct 11, 2016

lore
Share & tools
lore

Keerthy

author
#0 lore raw

PATCH v2 1/1 power: regulator: Add support for gpio regulators

Add support for gpio regulators. As of now this driver caters to gpio regulators with one gpio. Supports setting voltage values to gpio regulators and retrieving the values.

---

Changes in v2:

* Added states and voltages as part of plat data to have a generic state to voltage mapping removing any assumptions.

 drivers/power/regulator/Kconfig          |   8 ++
 drivers/power/regulator/Makefile         |   1 +
 drivers/power/regulator/gpio-regulator.c | 137 +++++++++++++++++++++++++++++++
 include/power/regulator.h                |   1 +
 4 files changed, 147 insertions(+)
 create mode 100644 drivers/power/regulator/gpio-regulator.c
drivers/power/regulator/Kconfig +8 -0
index 2510474..4776011 100644
@@ -58,6 +58,14 @@ config DM_REGULATOR_FIXED
 	features for fixed value regulators. The driver implements get/set api
 	for enable and get only for voltage value.
 
+config DM_REGULATOR_GPIO
+	bool "Enable Driver Model for GPIO REGULATOR"
+	depends on DM_REGULATOR
+	---help---
+	This config enables implementation of driver-model regulator uclass
+	features for gpio regulators. The driver implements get/set for
+	voltage value.
+
 config REGULATOR_RK808
 	bool "Enable driver for RK808 regulators"
 	depends on DM_REGULATOR && PMIC_RK808
drivers/power/regulator/Makefile +1 -0
index 2093048..2d350cb 100644
@@ -10,6 +10,7 @@ obj-$(CONFIG_REGULATOR_ACT8846) += act8846.o
 obj-$(CONFIG_DM_REGULATOR_MAX77686) += max77686.o
 obj-$(CONFIG_DM_REGULATOR_PFUZE100) += pfuze100.o
 obj-$(CONFIG_$(SPL_)DM_REGULATOR_FIXED) += fixed.o
+obj-$(CONFIG_$(SPL_)DM_REGULATOR_GPIO) += gpio-regulator.o
 obj-$(CONFIG_REGULATOR_RK808) += rk808.o
 obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o
 obj-$(CONFIG_DM_REGULATOR_SANDBOX) += sandbox.o
drivers/power/regulator/gpio-regulator.c new file +137 -0

137 lines not on this page · raw message

include/power/regulator.h +1 -0
index 8ae6b14..5d327e6 100644
@@ -108,6 +108,7 @@ enum regulator_type {
 	REGULATOR_TYPE_BUCK,
 	REGULATOR_TYPE_DVS,
 	REGULATOR_TYPE_FIXED,
+	REGULATOR_TYPE_GPIO,
 	REGULATOR_TYPE_OTHER,
 };
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/1 power: regulator: Add support for gpio regulators

Quoted 12 lines · Keerthy

Add support for gpio regulators. As of now this driver caters to gpio regulators with one gpio. Supports setting voltage values to gpio regulators and retrieving the values.

---

Changes in v2:

* Added states and voltages as part of plat data to have a generic state to voltage mapping removing any assumptions.

Quoted 6 lines
 drivers/power/regulator/Kconfig          |   8 ++
 drivers/power/regulator/Makefile         |   1 +
 drivers/power/regulator/gpio-regulator.c | 137 +++++++++++++++++++++++++++++++
 include/power/regulator.h                |   1 +
 4 files changed, 147 insertions(+)
 create mode 100644 drivers/power/regulator/gpio-regulator.c
#2 lore raw

PATCH v2 1/1 power: regulator: Add support for gpio regulators

Quoted 13 lines · Simon Glass
Quoted 12 lines · Keerthy

Add support for gpio regulators. As of now this driver caters to gpio regulators with one gpio. Supports setting voltage values to gpio regulators and retrieving the values.

---

Changes in v2:

* Added states and voltages as part of plat data to have a generic state to voltage mapping removing any assumptions.

Quoted 8 lines
Quoted 6 lines
 drivers/power/regulator/Kconfig          |   8 ++
 drivers/power/regulator/Makefile         |   1 +
 drivers/power/regulator/gpio-regulator.c | 137 +++++++++++++++++++++++++++++++
 include/power/regulator.h                |   1 +
 4 files changed, 147 insertions(+)
 create mode 100644 drivers/power/regulator/gpio-regulator.c

Simon,

Wanted to know who is pulling this patch.

- Keerthy

Quoted 1 line
#3 lore raw

PATCH v2 1/1 power: regulator: Add support for gpio regulators

Hi Keerthy,

Quoted 27 lines · Keerthy
Quoted 24 lines · Simon Glass
Quoted 20 lines · Keerthy

Add support for gpio regulators. As of now this driver caters to gpio regulators with one gpio. Supports setting voltage values to gpio regulators and retrieving the values.

---

Changes in v2:

* Added states and voltages as part of plat data to have a generic state to voltage mapping removing any assumptions.

 drivers/power/regulator/Kconfig          |   8 ++
 drivers/power/regulator/Makefile         |   1 +
 drivers/power/regulator/gpio-regulator.c | 137
+++++++++++++++++++++++++++++++
 include/power/regulator.h                |   1 +
 4 files changed, 147 insertions(+)
 create mode 100644 drivers/power/regulator/gpio-regulator.c
Quoted 6 lines
Quoted 1 line

Simon,

Wanted to know who is pulling this patch.

Looking in patchwork it is assigned to Przemyslaw.

Regards,
Simon

#4 lore raw

PATCH v2 1/1 power: regulator: Add support for gpio regulators

Hello,

Quoted 28 lines · Simon Glass

Hi Keerthy,

Quoted 25 lines · Keerthy
Quoted 22 lines · Simon Glass
Quoted 12 lines · Keerthy

Add support for gpio regulators. As of now this driver caters to gpio regulators with one gpio. Supports setting voltage values to gpio regulators and retrieving the values.

---

Changes in v2:

* Added states and voltages as part of plat data to have a generic state to voltage mapping removing any assumptions.

Quoted 7 lines
  drivers/power/regulator/Kconfig          |   8 ++
  drivers/power/regulator/Makefile         |   1 +
  drivers/power/regulator/gpio-regulator.c | 137
+++++++++++++++++++++++++++++++
  include/power/regulator.h                |   1 +
  4 files changed, 147 insertions(+)

create mode 100644 drivers/power/regulator/gpio-regulator.c

Quoted 10 lines
Quoted 3 lines

Simon,

Wanted to know who is pulling this patch.

Looking in patchwork it is assigned to Przemyslaw.

Regards,
Simon

I'm sorry for the silence, I have very limited time for open source at present, and now it's hard for me to watch the list.
Simon, I will assign it to you in patchwork, since you have already done the review.

Best regards,

Signature · 4 lines
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
#5 lore raw

PATCH v2 1/1 power: regulator: Add support for gpio regulators

Quoted 51 lines · Przemyslaw Marczak

Hello,

Quoted 35 lines · Simon Glass

Hi Keerthy,

Quoted 31 lines · Keerthy
Quoted 26 lines · Simon Glass
Quoted 14 lines · Keerthy

Add support for gpio regulators. As of now this driver caters to gpio regulators with one gpio. Supports setting voltage values to gpio
regulators and retrieving the values.

---

Changes in v2:

* Added states and voltages as part of plat data to have a generic state to voltage mapping removing any assumptions.

Quoted 7 lines
  drivers/power/regulator/Kconfig          |   8 ++
  drivers/power/regulator/Makefile         |   1 +
  drivers/power/regulator/gpio-regulator.c | 137
+++++++++++++++++++++++++++++++
  include/power/regulator.h                |   1 +
  4 files changed, 147 insertions(+)

create mode 100644 drivers/power/regulator/gpio-regulator.c

Quoted 11 lines
Quoted 3 lines

Simon,

Wanted to know who is pulling this patch.

Looking in patchwork it is assigned to Przemyslaw.

Regards,
Simon

Quoted 4 lines

I'm sorry for the silence, I have very limited time for open source at present, and now it's hard for me to watch the list.
Simon, I will assign it to you in patchwork, since you have already done the review.

Applied to u-boot-dm, thanks!