Skip to contentSkip to conversation

regulator: isl9305: Add Intersil ISL9305/H driver

PATCH In review Mark Brown 2 participants 3 messages Sep 6, 2014 – Sep 10, 2014

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 regulator: isl9305: Add Intersil ISL9305/H driver

The ISL9305 and ISL9305H are mini-PMICs offering two DCDC regulators and two LDO regulators. While there are some register differences between them these do not affect the current Linux driver as the relevant features are not yet supported.

---
 .../devicetree/bindings/regulator/isl9305.txt      |  36 +++
 drivers/regulator/Kconfig                          |   6 +
 drivers/regulator/Makefile                         |   1 +
 drivers/regulator/isl9305.c                        | 247 +++++++++++++++++++++
 include/linux/platform_data/isl9305.h              |  30 +++
 5 files changed, 320 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/isl9305.txt
 create mode 100644 drivers/regulator/isl9305.c
 create mode 100644 include/linux/platform_data/isl9305.h
Documentation/devicetree/bindings/regulator/isl9305.txt new file +36 -0
new file mode 100644
index 000000000000..a626fc1bbf0d
@@ -0,0 +1,36 @@
+Intersil ISL9305/ISL9305H voltage regulator
+
+Required properties:
+
+- compatible: "isl,isl9305" or "isl,isl9305h"
+- reg: I2C slave address, usually 0x68.
+- regulators: A node that houses a sub-node for each regulator within the
+  device. Each sub-node is identified using the node's name, with valid
+  values being "dcd1", "dcd2", "ldo1" and "ldo2". The content of each sub-node
+  is defined by the standard binding for regulators; see regulator.txt.
+- VINDCD1-supply: A phandle to a regulator node supplying VINDCD1.
+  VINDCD2-supply: A phandle to a regulator node supplying VINDCD2.
+  VINLDO1-supply: A phandle to a regulator node supplying VINLDO1.
+  VINLDO2-supply: A phandle to a regulator node supplying VINLDO2.
+
+Optional properties:
+- Per-regulator optional properties are defined in regulator.txt
+
+Example
+
+	pmic: isl9305@68 {
+		compatible = "isl,isl9305";
+		reg = <0x68>;
+
+		VINDCD1-supply = <&system_power>;
+		VINDCD2-supply = <&system_power>;
+		VINLDO1-supply = <&system_power>;
+		VINLDO2-supply = <&system_power>;
+
+		regulators {
+			dcd1 {
+			        regulator-name = "VDD_DSP";
+				regulator-always-on;
+                        };
+		};
+	};
drivers/regulator/Kconfig +6 -0
index a5ed328ab324..7a3a0614d573 100644
@@ -251,6 +251,12 @@ config REGULATOR_HI6421
 	  21 general purpose LDOs, 3 dedicated LDOs, and 5 BUCKs. All
 	  of them come with support to either ECO (idle) or sleep mode.
 
+config REGULATOR_ISL9305
+	tristate "Intersil ISL9305 regulator"
+	depends on I2C
+	help
+	  This driver supports ISL9305 voltage regulator chip.
+
 config REGULATOR_ISL6271A
 	tristate "Intersil ISL6271A Power regulator"
 	depends on I2C
drivers/regulator/Makefile +1 -0
index 271fe1e8ad18..25271f80f098 100644
@@ -34,6 +34,7 @@ obj-$(CONFIG_REGULATOR_FAN53555) += fan53555.o
 obj-$(CONFIG_REGULATOR_GPIO) += gpio-regulator.o
 obj-$(CONFIG_REGULATOR_HI6421) += hi6421-regulator.o
 obj-$(CONFIG_REGULATOR_ISL6271A) += isl6271a-regulator.o
+obj-$(CONFIG_REGULATOR_ISL9305) += isl9305.o
 obj-$(CONFIG_REGULATOR_LP3971) += lp3971.o
 obj-$(CONFIG_REGULATOR_LP3972) += lp3972.o
 obj-$(CONFIG_REGULATOR_LP872X) += lp872x.o
drivers/regulator/isl9305.c new file +247 -0

247 lines not on this page · raw message

include/linux/platform_data/isl9305.h new file +30 -0
new file mode 100644
index 000000000000..1419133fa69e
@@ -0,0 +1,30 @@
+/*
+ * isl9305 - Intersil ISL9305 DCDC regulator
+ *
+ * Copyright 2014 Linaro Ltd
+ *
+ * Author: Mark Brown <[email protected]>
+ *
+ *  This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ */
+
+#ifndef __ISL9305_H
+#define __ISL9305_H
+
+#define ISL9305_DCD1 0
+#define ISL9305_DCD2 1
+#define ISL9305_LDO1 2
+#define ISL9305_LDO2 3
+
+#define ISL9305_MAX_REGULATOR ISL9305_LDO2
+
+struct regulator_init_data;
+
+struct isl9305_pdata {
+	struct regulator_init_data *init_data[ISL9305_MAX_REGULATOR];
+};
+
+#endif
Signature · 1 line
2.1.0
#1 lore raw

Hi Mark,

On Sat, Sep 6, 2014 at 1:42 PM, Mark Brown <[email protected]> wrote:
[...]

Documentation/devicetree/bindings/regulator/isl9305.txt line 5

Quoted 11 lines
Documentation/devicetree/bindings/regulator/isl9305.txt new file +5 -0
new file mode 100644
index 000000000000..a626fc1bbf0d
@@ -0,0 +1,36 @@
+Intersil ISL9305/ISL9305H voltage regulator
+
+Required properties:
+
+- compatible: "isl,isl9305" or "isl,isl9305h"

I have suggested to change the Intersil vendor prefix to 'isil':
http://www.mail-archive.com/[email protected]/msg40842.html

regards
Philipp

author maintainer
#2 lore raw
Quoted 8 lines · Philipp Zabel
Quoted 3 lines · Mark Brown

+Required properties:

+- compatible: "isl,isl9305" or "isl,isl9305h"

I have suggested to change the Intersil vendor prefix to 'isil':
http://www.mail-archive.com/[email protected]/msg40842.html

I'm really not sure it's worth the bother but whatever... please send a patch if that goes through.