Skip to contentSkip to conversation

power: pmic: Add support for Palmas family of PMICs

PATCH Superseded Keerthy 5 participants 21 messages Sep 19, 2016 – Sep 25, 2016 I2C

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore

Keerthy

author
#0 lore raw

v3 cover power: pmic: Add support for Palmas family of PMICs

The series adds support for Palmas family of PMICs. Implements functions to configure regulators. Enable/Disable Get/Set voltages of regulators.

Supports TPS659038, TPS65917, Palmas.

Tested on TPS659038, TPS65917 using DRA7XX-EVM and AM57XX-EVM.

Changes in v3:

Introduced u8 i2c read/write functions.

Keerthy (6):
dm: i2c: Add u8 read/write i2c functions
power: regulator: Add ctrl_reg and volt_reg fields for pmic
power: pmic: Palmas: Add the base pmic support
power: regulator: palmas: Add regulator support
configs: am57xx_evm_defconfig: Enable PALMAS options
configs: dra7xx_evm_defconfig: Enable PALMAS options

 configs/am57xx_evm_defconfig               |   3 +
 configs/dra7xx_evm_defconfig               |   3 +
 drivers/i2c/i2c-uclass.c                   |  10 +
 drivers/power/pmic/Kconfig                 |   7 +
 drivers/power/pmic/Makefile                |   1 +
 drivers/power/pmic/palmas.c                |  77 +++++
 drivers/power/regulator/Kconfig            |   8 +
 drivers/power/regulator/Makefile           |   1 +
 drivers/power/regulator/palmas_regulator.c | 457 +++++++++++++++++++++++++++++
 include/i2c.h                              |  24 ++
 include/power/palmas.h                     |  25 ++
 include/power/regulator.h                  |   4 +
 12 files changed, 620 insertions(+)
 create mode 100644 drivers/power/pmic/palmas.c
 create mode 100644 drivers/power/regulator/palmas_regulator.c
 create mode 100644 include/power/palmas.h
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH v3 1/6 dm: i2c: Add u8 read/write i2c functions

Add u8 i2c read/write hooks.

---
 drivers/i2c/i2c-uclass.c | 10 ++++++++++
 include/i2c.h            | 24 ++++++++++++++++++++++++
 2 files changed, 34 insertions(+)
drivers/i2c/i2c-uclass.c +10 -0
index dbd3789..6ce5d9a 100644
@@ -231,6 +231,16 @@ int dm_i2c_reg_write(struct udevice *dev, uint offset, uint value)
 	return dm_i2c_write(dev, offset, &val, 1);
 }
 
+int dm_i2c_u8_read(struct udevice *dev, uint offset, u8 *val)
+{
+	return dm_i2c_read(dev, offset, val, 1);
+}
+
+int dm_i2c_u8_write(struct udevice *dev, uint offset, u8 *val)
+{
+	return dm_i2c_write(dev, offset, val, 1);
+}
+
 /**
  * i2c_probe_chip() - probe for a chip on a bus
  *
include/i2c.h +24 -0
index d500445..c3059ad 100644
@@ -191,6 +191,30 @@ int dm_i2c_reg_read(struct udevice *dev, uint offset);
 int dm_i2c_reg_write(struct udevice *dev, uint offset, unsigned int val);
 
 /**
+ * dm_i2c_u8_read() - Read a byte value from an I2C register
+ *
+ * This reads a single value from the given address in an I2C chip
+ *
+ * @dev:        Device to use for transfer
+ * @addr:       Address to read from
+ * @val:	Value read is stored in val
+ * @return 0 for success, -ve on error
+ */
+int dm_i2c_u8_read(struct udevice *dev, uint offset, u8 *val);
+
+/**
+ * dm_i2c_u8_write() - Write a byte value to an I2C register
+ *
+ * This writes a single value to the given address in an I2C chip
+ *
+ * @dev:        Device to use for transfer
+ * @addr:       Address to write to
+ * @val:        Value to write
+ * @return 0 on success, -ve on error
+ */
+int dm_i2c_u8_write(struct udevice *dev, uint offset, u8 *val);
+
+/**
  * dm_i2c_xfer() - Transfer messages over I2C
  *
  * This transfers a raw message. It is best to use dm_i2c_reg_read/write()
Signature · 1 line
1.9.1
#2 lore raw

PATCH v3 1/6 dm: i2c: Add u8 read/write i2c functions

Quoted 3 lines · Keerthy

Add u8 i2c read/write hooks.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160919/696293f7/attachment.sig>
#3 lore raw

PATCH v3 1/6 dm: i2c: Add u8 read/write i2c functions

In reply to Keerthy

Hello,

Am 19.09.2016 um 08:17 schrieb Keerthy:

Quoted 7 lines

Add u8 i2c read/write hooks.

---
  drivers/i2c/i2c-uclass.c | 10 ++++++++++
  include/i2c.h            | 24 ++++++++++++++++++++++++
  2 files changed, 34 insertions(+)

bye,
Heiko

Quoted 58 lines
drivers/i2c/i2c-uclass.c +10 -0
index dbd3789..6ce5d9a 100644
@@ -231,6 +231,16 @@ int dm_i2c_reg_write(struct udevice *dev, uint offset, uint value)
  	return dm_i2c_write(dev, offset, &val, 1);
  }
 
+int dm_i2c_u8_read(struct udevice *dev, uint offset, u8 *val)
+{
+	return dm_i2c_read(dev, offset, val, 1);
+}
+
+int dm_i2c_u8_write(struct udevice *dev, uint offset, u8 *val)
+{
+	return dm_i2c_write(dev, offset, val, 1);
+}
+
  /**
   * i2c_probe_chip() - probe for a chip on a bus
   *
include/i2c.h +24 -0
index d500445..c3059ad 100644
@@ -191,6 +191,30 @@ int dm_i2c_reg_read(struct udevice *dev, uint offset);
  int dm_i2c_reg_write(struct udevice *dev, uint offset, unsigned int val);
 
  /**
+ * dm_i2c_u8_read() - Read a byte value from an I2C register
+ *
+ * This reads a single value from the given address in an I2C chip
+ *
+ * @dev:        Device to use for transfer
+ * @addr:       Address to read from
+ * @val:	Value read is stored in val
+ * @return 0 for success, -ve on error
+ */
+int dm_i2c_u8_read(struct udevice *dev, uint offset, u8 *val);
+
+/**
+ * dm_i2c_u8_write() - Write a byte value to an I2C register
+ *
+ * This writes a single value to the given address in an I2C chip
+ *
+ * @dev:        Device to use for transfer
+ * @addr:       Address to write to
+ * @val:        Value to write
+ * @return 0 on success, -ve on error
+ */
+int dm_i2c_u8_write(struct udevice *dev, uint offset, u8 *val);
+
+/**
   * dm_i2c_xfer() - Transfer messages over I2C
   *
   * This transfers a raw message. It is best to use dm_i2c_reg_read/write()
Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#4 lore raw

PATCH v3 1/6 dm: i2c: Add u8 read/write i2c functions

In reply to Keerthy

Hi,

Quoted 15 lines · Keerthy

Add u8 i2c read/write hooks.

---
 drivers/i2c/i2c-uclass.c | 10 ++++++++++
 include/i2c.h            | 24 ++++++++++++++++++++++++
 2 files changed, 34 insertions(+)
drivers/i2c/i2c-uclass.c +0 -0
index dbd3789..6ce5d9a 100644
@@ -231,6 +231,16 @@ int dm_i2c_reg_write(struct udevice *dev, uint offset, uint value)
        return dm_i2c_write(dev, offset, &val, 1);
 }

drivers/i2c/i2c-uclass.c int dm_i2c_reg_write(struct udevice *dev, uint offset, uint value) · line 242

Quoted 10 lines
drivers/i2c/i2c-uclass.c +9 -0
 
+int dm_i2c_u8_read(struct udevice *dev, uint offset, u8 *val)
+{
+       return dm_i2c_read(dev, offset, val, 1);
+}
+
+int dm_i2c_u8_write(struct udevice *dev, uint offset, u8 *val)
+{
+       return dm_i2c_write(dev, offset, val, 1);
+}

These look almost the same as dm_i2c_reg_read/write(), but IMO those are easier to use since they don't require a pointer to be passed. How do you intend to use these two new functions?

Quoted 40 lines
drivers/i2c/i2c-uclass.c +1 -0
+
 /**
  * i2c_probe_chip() - probe for a chip on a bus
  *
include/i2c.h +24 -1
index d500445..c3059ad 100644
@@ -191,6 +191,30 @@ int dm_i2c_reg_read(struct udevice *dev, uint offset);
 int dm_i2c_reg_write(struct udevice *dev, uint offset, unsigned int val);
 
 /**
+ * dm_i2c_u8_read() - Read a byte value from an I2C register
+ *
+ * This reads a single value from the given address in an I2C chip
+ *
+ * @dev:        Device to use for transfer
+ * @addr:       Address to read from
+ * @val:       Value read is stored in val
+ * @return 0 for success, -ve on error
+ */
+int dm_i2c_u8_read(struct udevice *dev, uint offset, u8 *val);
+
+/**
+ * dm_i2c_u8_write() - Write a byte value to an I2C register
+ *
+ * This writes a single value to the given address in an I2C chip
+ *
+ * @dev:        Device to use for transfer
+ * @addr:       Address to write to
+ * @val:        Value to write
+ * @return 0 on success, -ve on error
+ */
+int dm_i2c_u8_write(struct udevice *dev, uint offset, u8 *val);
+
+/**
  * dm_i2c_xfer() - Transfer messages over I2C
  *
  * This transfers a raw message. It is best to use dm_i2c_reg_read/write()
--
Quoted 1 line

1.9.1

Regards,
Simon

#5 lore raw

PATCH v3 1/6 dm: i2c: Add u8 read/write i2c functions

Quoted 19 lines · Simon Glass

Hi,

Quoted 16 lines · Keerthy

Add u8 i2c read/write hooks.

---
 drivers/i2c/i2c-uclass.c | 10 ++++++++++
 include/i2c.h            | 24 ++++++++++++++++++++++++
 2 files changed, 34 insertions(+)
drivers/i2c/i2c-uclass.c +0 -0
index dbd3789..6ce5d9a 100644
@@ -231,6 +231,16 @@ int dm_i2c_reg_write(struct udevice *dev, uint offset, uint value)
        return dm_i2c_write(dev, offset, &val, 1);
 }
 
Quoted 13 lines

drivers/i2c/i2c-uclass.c int dm_i2c_reg_write(struct udevice *dev, uint offset, uint value) · line 242

Quoted 9 lines
drivers/i2c/i2c-uclass.c +9 -0
+int dm_i2c_u8_read(struct udevice *dev, uint offset, u8 *val)
+{
+       return dm_i2c_read(dev, offset, val, 1);
+}
+
+int dm_i2c_u8_write(struct udevice *dev, uint offset, u8 *val)
+{
+       return dm_i2c_write(dev, offset, val, 1);
+}

These look almost the same as dm_i2c_reg_read/write(), but IMO those are easier to use since they don't require a pointer to be passed. How do you intend to use these two new functions?

Simon,

I see a kind of issue in the current implementation of int dm_i2c_reg_read(struct udevice *dev, uint offset) int dm_i2c_reg_write(struct udevice *dev, uint offset, uint value)

In the current set up my need is to read and then write a 1 byte I2C register. It is best to have consistency with read and write. In the current case(dm_i2c_reg_read/write) i read an integer and now when i want to write i need to convert it to an unsigned integer.

Instead of all this i made a patch which keeps u8 across read and write:

int dm_i2c_reg_read(struct udevice *dev, uint offset, u8 *val) returns error/success with the return value and value is passed by reference in val variable.

int dm_i2c_reg_write(struct udevice *dev, uint offset, u8 *val) returns error/success using the return value and the value to be written is sent in val.

Regards,
Keerthy

Quoted 46 lines
Quoted 41 lines
drivers/i2c/i2c-uclass.c +1 -0
+
 /**
  * i2c_probe_chip() - probe for a chip on a bus
  *
include/i2c.h +24 -1
index d500445..c3059ad 100644
@@ -191,6 +191,30 @@ int dm_i2c_reg_read(struct udevice *dev, uint offset);
 int dm_i2c_reg_write(struct udevice *dev, uint offset, unsigned int val);
 
 /**
+ * dm_i2c_u8_read() - Read a byte value from an I2C register
+ *
+ * This reads a single value from the given address in an I2C chip
+ *
+ * @dev:        Device to use for transfer
+ * @addr:       Address to read from
+ * @val:       Value read is stored in val
+ * @return 0 for success, -ve on error
+ */
+int dm_i2c_u8_read(struct udevice *dev, uint offset, u8 *val);
+
+/**
+ * dm_i2c_u8_write() - Write a byte value to an I2C register
+ *
+ * This writes a single value to the given address in an I2C chip
+ *
+ * @dev:        Device to use for transfer
+ * @addr:       Address to write to
+ * @val:        Value to write
+ * @return 0 on success, -ve on error
+ */
+int dm_i2c_u8_write(struct udevice *dev, uint offset, u8 *val);
+
+/**
  * dm_i2c_xfer() - Transfer messages over I2C
  *
  * This transfers a raw message. It is best to use dm_i2c_reg_read/write()
--
Quoted 1 line

1.9.1

Regards,
Simon

#6 lore raw

PATCH v3 1/6 dm: i2c: Add u8 read/write i2c functions

Hi,

Quoted 54 lines · Keerthy
Quoted 22 lines · Simon Glass

Hi,

Quoted 18 lines · Keerthy

Add u8 i2c read/write hooks.

---
 drivers/i2c/i2c-uclass.c | 10 ++++++++++
 include/i2c.h            | 24 ++++++++++++++++++++++++
 2 files changed, 34 insertions(+)
drivers/i2c/i2c-uclass.c +0 -0
index dbd3789..6ce5d9a 100644
@@ -231,6 +231,16 @@ int dm_i2c_reg_write(struct udevice *dev, uint
 offset, uint value)
        return dm_i2c_write(dev, offset, &val, 1);
 }
 
Quoted 14 lines

drivers/i2c/i2c-uclass.c int dm_i2c_reg_write(struct udevice *dev, uint offset, uint value) · line 242

Quoted 9 lines
drivers/i2c/i2c-uclass.c +9 -0
+int dm_i2c_u8_read(struct udevice *dev, uint offset, u8 *val)
+{
+       return dm_i2c_read(dev, offset, val, 1);
+}
+
+int dm_i2c_u8_write(struct udevice *dev, uint offset, u8 *val)
+{
+       return dm_i2c_write(dev, offset, val, 1);
+}

These look almost the same as dm_i2c_reg_read/write(), but IMO those are easier to use since they don't require a pointer to be passed. How do you intend to use these two new functions?

Simon,

I see a kind of issue in the current implementation of int dm_i2c_reg_read(struct udevice *dev, uint offset) int dm_i2c_reg_write(struct udevice *dev, uint offset, uint value)

In the current set up my need is to read and then write a 1 byte I2C register. It is best to have consistency with read and write. In the current case(dm_i2c_reg_read/write) i read an integer and now when i want to write i need to convert it to an unsigned integer.

Instead of all this i made a patch which keeps u8 across read and write:

Quoted 7 lines

int dm_i2c_reg_read(struct udevice *dev, uint offset, u8 *val) returns error/success with the return value and value is passed by reference in val variable.

int dm_i2c_reg_write(struct udevice *dev, uint offset, u8 *val) returns error/success using the return value and the value to be written is sent in val.

Well I really don't see why you can use the other functions. But if you prefer these, then OK.

Quoted 5 lines

Regards,
Keerthy

[...]

Regards,
Simon

author
#7 lore raw

PATCH v3 2/6 power: regulator: Add ctrl_reg and volt_reg fields for pmic

In reply to Keerthy

The ctrl reg contains bit fields to enable and disable regulators, and volt_reg has the bit fields to configure the voltage values. The registers are frequently accessed hence make them part of dm_regulator_uclass_platdata structure.

---
 include/power/regulator.h | 4 ++++
 1 file changed, 4 insertions(+)
include/power/regulator.h +4 -0
index 9bcd728..2117f55 100644
@@ -152,6 +152,8 @@ enum regulator_flag {
  * TODO(sjg at chromium.org): Consider putting the above two into @flags
  * @flags:     - flags value (see REGULATOR_FLAG_...)
  * @name**     - fdt regulator name - should be taken from the device tree
+ * ctrl_reg:   - Control register offset used to enable/disable regulator
+ * volt_reg:   - register offset for writing voltage vsel values
  *
  * Note:
  * *  - set automatically on device probe by the uclass's '.pre_probe' method.
@@ -171,6 +173,8 @@ struct dm_regulator_uclass_platdata {
 	bool boot_on;
 	const char *name;
 	int flags;
+	u8 ctrl_reg;
+	u8 volt_reg;
 };
 
 /* Regulator device operations */
Signature · 1 line
1.9.1
#8 lore raw

PATCH v3 2/6 power: regulator: Add ctrl_reg and volt_reg fields for pmic

Quoted 6 lines · Keerthy

The ctrl reg contains bit fields to enable and disable regulators, and volt_reg has the bit fields to configure the voltage values. The registers are frequently accessed hence make them part of dm_regulator_uclass_platdata structure.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160919/c88a45a5/attachment.sig>
#9 lore raw

PATCH v3 2/6 power: regulator: Add ctrl_reg and volt_reg fields for pmic

In reply to Keerthy
Quoted 9 lines · Keerthy

The ctrl reg contains bit fields to enable and disable regulators, and volt_reg has the bit fields to configure the voltage values. The registers are frequently accessed hence make them part of dm_regulator_uclass_platdata structure.

---
 include/power/regulator.h | 4 ++++
 1 file changed, 4 insertions(+)
#10 lore raw

PATCH v3 2/6 power: regulator: Add ctrl_reg and volt_reg fields for pmic

Quoted 6 lines · Simon Glass
Quoted 5 lines · Keerthy

The ctrl reg contains bit fields to enable and disable regulators, and volt_reg has the bit fields to configure the voltage values. The registers are frequently accessed hence make them part of dm_regulator_uclass_platdata structure.

Quoted 6 lines
Quoted 4 lines
---
 include/power/regulator.h | 4 ++++
 1 file changed, 4 insertions(+)

Thanks i will repost a v4 with comments on the other patch fixed.

Quoted 1 line
author
#11 lore raw

PATCH v3 3/6 power: pmic: Palmas: Add the base pmic support

In reply to Keerthy

Add support to bind the regulators/child nodes with the pmic.

---
 drivers/power/pmic/Kconfig  |  7 +++++
 drivers/power/pmic/Makefile |  1 +
 drivers/power/pmic/palmas.c | 77 +++++++++++++++++++++++++++++++++++++++++++++
 include/power/palmas.h      | 25 +++++++++++++++
 4 files changed, 110 insertions(+)
 create mode 100644 drivers/power/pmic/palmas.c
 create mode 100644 include/power/palmas.h
drivers/power/pmic/Kconfig +7 -0
index 69f8d51..92931c5 100644
@@ -135,3 +135,10 @@ config PMIC_TPS65090
 	FETs and a battery charger. This driver provides register access
 	only, and you can enable the regulator/charger drivers separately if
 	required.
+
+config PMIC_PALMAS
+	bool "Enable driver for Texas Instruments PALMAS PMIC"
+	depends on DM_PMIC
+	---help---
+	The PALMAS is a PMIC containing several LDOs, SMPS.
+	This driver binds the pmic children.
drivers/power/pmic/Makefile +1 -0
index 52b4f71..828c0cf 100644
@@ -15,6 +15,7 @@ obj-$(CONFIG_PMIC_PM8916) += pm8916.o
 obj-$(CONFIG_PMIC_RK808) += rk808.o
 obj-$(CONFIG_PMIC_TPS65090) += tps65090.o
 obj-$(CONFIG_PMIC_S5M8767) += s5m8767.o
+obj-$(CONFIG_$(SPL_)PMIC_PALMAS) += palmas.o
 
 obj-$(CONFIG_POWER_LTC3676) += pmic_ltc3676.o
 obj-$(CONFIG_POWER_MAX77696) += pmic_max77696.o
drivers/power/pmic/palmas.c new file +77 -0

77 lines not on this page · raw message

include/power/palmas.h new file +25 -0
new file mode 100644
index 0000000..bad5a35
@@ -0,0 +1,25 @@
+#define	PALMAS		0x0
+#define TPS659038	0x1
+#define TPS65917	0x2
+
+/* I2C device address for pmic palmas */
+#define PALMAS_I2C_ADDR	(0x12 >> 1)
+#define PALMAS_LDO_NUM		11
+#define PALMAS_SMPS_NUM	8
+
+/* Drivers name */
+#define PALMAS_LDO_DRIVER     "palmas_ldo"
+#define PALMAS_SMPS_DRIVER    "palmas_smps"
+
+#define PALMAS_SMPS_VOLT_MASK		0x7F
+#define PALMAS_SMPS_RANGE_MASK		0x80
+#define PALMAS_SMPS_VOLT_MAX_HEX	0x7F
+#define PALMAS_SMPS_VOLT_MAX		3300000
+#define PALMAS_SMPS_MODE_MASK		0x3
+#define	PALMAS_SMPS_STATUS_MASK		0x30
+
+#define PALMAS_LDO_VOLT_MASK    0x3F
+#define PALMAS_LDO_VOLT_MAX_HEX 0x3F
+#define PALMAS_LDO_VOLT_MAX     3300000
+#define PALMAS_LDO_MODE_MASK	0x1
+#define PALMAS_LDO_STATUS_MASK	0x10
Signature · 1 line
1.9.1
#12 lore raw

PATCH v3 3/6 power: pmic: Palmas: Add the base pmic support

Quoted 4 lines · Keerthy

Add support to bind the regulators/child nodes with the pmic.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160919/f85e40ab/attachment.sig>
#13 lore raw

PATCH v3 3/6 power: pmic: Palmas: Add the base pmic support

In reply to Keerthy

Hi,

Quoted 4 lines · Keerthy

Add support to bind the regulators/child nodes with the pmic.

Quoted 8 lines
---
 drivers/power/pmic/Kconfig  |  7 +++++
 drivers/power/pmic/Makefile |  1 +
 drivers/power/pmic/palmas.c | 77 +++++++++++++++++++++++++++++++++++++++++++++
 include/power/palmas.h      | 25 +++++++++++++++
 4 files changed, 110 insertions(+)
 create mode 100644 drivers/power/pmic/palmas.c
 create mode 100644 include/power/palmas.h

I missed it before, but you should use debug() in drivers, not printf().

Regards,
Simon

#14 lore raw

PATCH v3 3/6 power: pmic: Palmas: Add the base pmic support

Quoted 16 lines · Simon Glass

Hi,

Quoted 4 lines · Keerthy

Add support to bind the regulators/child nodes with the pmic.

Quoted 8 lines
---
 drivers/power/pmic/Kconfig  |  7 +++++
 drivers/power/pmic/Makefile |  1 +
 drivers/power/pmic/palmas.c | 77 +++++++++++++++++++++++++++++++++++++++++++++
 include/power/palmas.h      | 25 +++++++++++++++
 4 files changed, 110 insertions(+)
 create mode 100644 drivers/power/pmic/palmas.c
 create mode 100644 include/power/palmas.h
Quoted 1 line

I missed it before, but you should use debug() in drivers, not printf().

Sure. I will fix that in the next version.

Quoted 4 lines

Regards,
Simon

author
#15 lore raw

PATCH v3 4/6 power: regulator: palmas: Add regulator support

In reply to Keerthy

The driver provides regulator set/get voltage enable/disable functions for palmas family of PMICs.

---

Changes in v3:

* made use of dm_i2c_u8_write/read in place of dm_i2c_reg_write/read

Changes in v2:

* made use of dm_i2c_reg_write/read in place of dm_i2c_write/read

 drivers/power/regulator/Kconfig            |   8 +
 drivers/power/regulator/Makefile           |   1 +
 drivers/power/regulator/palmas_regulator.c | 457 +++++++++++++++++++++++++++++
 3 files changed, 466 insertions(+)
 create mode 100644 drivers/power/regulator/palmas_regulator.c
drivers/power/regulator/Kconfig +8 -0
index 17f22dd..adb710a 100644
@@ -115,3 +115,11 @@ config REGULATOR_TPS65090
 	regulators, one for each FET. The standard regulator interface is
 	supported, but it is only possible to turn the regulators on or off.
 	There is no voltage/current control.
+
+config DM_REGULATOR_PALMAS
+	bool "Enable driver for PALMAS PMIC regulators"
+       depends on PMIC_PALMAS
+	---help---
+	This enables implementation of driver-model regulator uclass
+	features for REGULATOR PALMAS and the family of PALMAS PMICs.
+	The driver implements get/set api for: value and enable.
drivers/power/regulator/Makefile +1 -0
index 1590d85..75080d4 100644
@@ -14,3 +14,4 @@ obj-$(CONFIG_REGULATOR_RK808) += rk808.o
 obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o
 obj-$(CONFIG_DM_REGULATOR_SANDBOX) += sandbox.o
 obj-$(CONFIG_REGULATOR_TPS65090) += tps65090_regulator.o
+obj-$(CONFIG_$(SPL_)DM_REGULATOR_PALMAS) += palmas_regulator.o
drivers/power/regulator/palmas_regulator.c new file +457 -0

457 lines not on this page · raw message

Signature · 1 line
1.9.1
#16 lore raw

PATCH v3 4/6 power: regulator: palmas: Add regulator support

Quoted 5 lines · Keerthy

The driver provides regulator set/get voltage enable/disable functions for palmas family of PMICs.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160919/38bf030e/attachment.sig>
author
#17 lore raw

PATCH v3 5/6 configs: am57xx_evm_defconfig: Enable PALMAS options

In reply to Keerthy

Enable palmas PMIC config options.

---
 configs/am57xx_evm_defconfig | 3 +++
 1 file changed, 3 insertions(+)
configs/am57xx_evm_defconfig +3 -0
index 0c41a4e..4a5b206 100644
@@ -43,6 +43,9 @@ CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
+CONFIG_DM_PMIC=y
+CONFIG_PMIC_PALMAS=y
+CONFIG_DM_REGULATOR_PALMAS=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_DM_SPI=y
Signature · 1 line
1.9.1
#18 lore raw

PATCH v3 5/6 configs: am57xx_evm_defconfig: Enable PALMAS options

Quoted 3 lines · Keerthy

Enable palmas PMIC config options.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160919/62d1ace5/attachment.sig>
author
#19 lore raw

PATCH v3 6/6 configs: dra7xx_evm_defconfig: Enable PALMAS options

In reply to Keerthy

Enable palmas PMIC config options.

---
 configs/dra7xx_evm_defconfig | 3 +++
 1 file changed, 3 insertions(+)
configs/dra7xx_evm_defconfig +3 -0
index 5738f1d..31ceca1 100644
@@ -47,8 +47,11 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_DM_ETH=y
+CONFIG_DM_PMIC=y
+CONFIG_PMIC_PALMAS=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_PALMAS=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_DM_SPI=y
Signature · 1 line
1.9.1
#20 lore raw

PATCH v3 6/6 configs: dra7xx_evm_defconfig: Enable PALMAS options

Quoted 3 lines · Keerthy

Enable palmas PMIC config options.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160919/64013035/attachment.sig>