diff mbox series

[v6,3/3] dt-bindings: power: supply: Add bindings for Microchip UCS1002

Message ID 20190503170042.19334-4-andrew.smirnov@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show
Series Driver for UCS1002 | expand

Commit Message

Andrey Smirnov May 3, 2019, 5 p.m. UTC
Add bindings for Microchip UCS1002 Programmable USB Port Power
Controller with Charger Emulation.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Reviewed-by: Rob Herring <robh+dt@kernel.org>
Cc: Enric Balletbo Serra <enric.balletbo@collabora.com>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: linux-kernel@vger.kernel.org
Cc: linux-pm@vger.kernel.org
---
 .../power/supply/microchip,ucs1002.txt        | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/supply/microchip,ucs1002.txt

Comments

Guenter Roeck May 3, 2019, 5:03 p.m. UTC | #1
On Fri, May 03, 2019 at 10:00:42AM -0700, Andrey Smirnov wrote:
> Add bindings for Microchip UCS1002 Programmable USB Port Power
> Controller with Charger Emulation.
> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> Reviewed-by: Rob Herring <robh+dt@kernel.org>
> Cc: Enric Balletbo Serra <enric.balletbo@collabora.com>
> Cc: Chris Healy <cphealy@gmail.com>
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Fabio Estevam <festevam@gmail.com>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: Sebastian Reichel <sre@kernel.org>
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-pm@vger.kernel.org
> ---
>  .../power/supply/microchip,ucs1002.txt        | 27 +++++++++++++++++++
>  1 file changed, 27 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/power/supply/microchip,ucs1002.txt
> 
> diff --git a/Documentation/devicetree/bindings/power/supply/microchip,ucs1002.txt b/Documentation/devicetree/bindings/power/supply/microchip,ucs1002.txt
> new file mode 100644
> index 000000000000..1d284ad816bf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/supply/microchip,ucs1002.txt
> @@ -0,0 +1,27 @@
> +Microchip UCS1002 USB Port Power Controller
> +
> +Required properties:
> +- compatible		: Should be "microchip,ucs1002";
> +- reg			: I2C slave address
> +
> +Optional properties:
> +- interrupts		: A list of interrupts lines present (could be either
> +			  corresponding to A_DET# pin, ALERT# pin, or both)
> +- interrupt-names	: A list of interrupt names. Should contain (if
> +			  present):
> +			  - "a_det" for line connected to A_DET# pin
> +			  - "alert" for line connected to ALERT# pin
> +			  Both are expected to be IRQ_TYPE_EDGE_BOTH
> +Example:
> +
> +&i2c3 {
> +	charger@32 {
> +		compatible = "microchip,ucs1002";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_ucs1002_pins>;
> +		reg = <0x32>;
> +		interrupts-extended = <&gpio5 2 IRQ_TYPE_EDGE_BOTH>,
> +				      <&gpio3 21 IRQ_TYPE_EDGE_BOTH>;

interrupts ?

> +		interrupt-names = "a_det", "alert";
> +	};
> +};
> -- 
> 2.21.0
>
Andrey Smirnov May 3, 2019, 5:33 p.m. UTC | #2
On Fri, May 3, 2019 at 12:03 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> On Fri, May 03, 2019 at 10:00:42AM -0700, Andrey Smirnov wrote:
> > Add bindings for Microchip UCS1002 Programmable USB Port Power
> > Controller with Charger Emulation.
> >
> > Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> > Reviewed-by: Rob Herring <robh+dt@kernel.org>
> > Cc: Enric Balletbo Serra <enric.balletbo@collabora.com>
> > Cc: Chris Healy <cphealy@gmail.com>
> > Cc: Lucas Stach <l.stach@pengutronix.de>
> > Cc: Fabio Estevam <festevam@gmail.com>
> > Cc: Guenter Roeck <linux@roeck-us.net>
> > Cc: Sebastian Reichel <sre@kernel.org>
> > Cc: linux-kernel@vger.kernel.org
> > Cc: linux-pm@vger.kernel.org
> > ---
> >  .../power/supply/microchip,ucs1002.txt        | 27 +++++++++++++++++++
> >  1 file changed, 27 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/power/supply/microchip,ucs1002.txt
> >
> > diff --git a/Documentation/devicetree/bindings/power/supply/microchip,ucs1002.txt b/Documentation/devicetree/bindings/power/supply/microchip,ucs1002.txt
> > new file mode 100644
> > index 000000000000..1d284ad816bf
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/power/supply/microchip,ucs1002.txt
> > @@ -0,0 +1,27 @@
> > +Microchip UCS1002 USB Port Power Controller
> > +
> > +Required properties:
> > +- compatible         : Should be "microchip,ucs1002";
> > +- reg                        : I2C slave address
> > +
> > +Optional properties:
> > +- interrupts         : A list of interrupts lines present (could be either
> > +                       corresponding to A_DET# pin, ALERT# pin, or both)
> > +- interrupt-names    : A list of interrupt names. Should contain (if
> > +                       present):
> > +                       - "a_det" for line connected to A_DET# pin
> > +                       - "alert" for line connected to ALERT# pin
> > +                       Both are expected to be IRQ_TYPE_EDGE_BOTH
> > +Example:
> > +
> > +&i2c3 {
> > +     charger@32 {
> > +             compatible = "microchip,ucs1002";
> > +             pinctrl-names = "default";
> > +             pinctrl-0 = <&pinctrl_ucs1002_pins>;
> > +             reg = <0x32>;
> > +             interrupts-extended = <&gpio5 2 IRQ_TYPE_EDGE_BOTH>,
> > +                                   <&gpio3 21 IRQ_TYPE_EDGE_BOTH>;
>
> interrupts ?

Can't really use it here since it assumes single "interrupt-parent"
(we have gpio5 and gpio3 as parents above)

Thanks,
Andrey Smirnov
Guenter Roeck May 3, 2019, 6:17 p.m. UTC | #3
On Fri, May 03, 2019 at 12:33:40PM -0500, Andrey Smirnov wrote:
> On Fri, May 3, 2019 at 12:03 PM Guenter Roeck <linux@roeck-us.net> wrote:
> >
> > On Fri, May 03, 2019 at 10:00:42AM -0700, Andrey Smirnov wrote:
> > > Add bindings for Microchip UCS1002 Programmable USB Port Power
> > > Controller with Charger Emulation.
> > >
> > > Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> > > Reviewed-by: Rob Herring <robh+dt@kernel.org>
> > > Cc: Enric Balletbo Serra <enric.balletbo@collabora.com>
> > > Cc: Chris Healy <cphealy@gmail.com>
> > > Cc: Lucas Stach <l.stach@pengutronix.de>
> > > Cc: Fabio Estevam <festevam@gmail.com>
> > > Cc: Guenter Roeck <linux@roeck-us.net>
> > > Cc: Sebastian Reichel <sre@kernel.org>
> > > Cc: linux-kernel@vger.kernel.org
> > > Cc: linux-pm@vger.kernel.org
> > > ---
> > >  .../power/supply/microchip,ucs1002.txt        | 27 +++++++++++++++++++
> > >  1 file changed, 27 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/power/supply/microchip,ucs1002.txt
> > >
> > > diff --git a/Documentation/devicetree/bindings/power/supply/microchip,ucs1002.txt b/Documentation/devicetree/bindings/power/supply/microchip,ucs1002.txt
> > > new file mode 100644
> > > index 000000000000..1d284ad816bf
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/power/supply/microchip,ucs1002.txt
> > > @@ -0,0 +1,27 @@
> > > +Microchip UCS1002 USB Port Power Controller
> > > +
> > > +Required properties:
> > > +- compatible         : Should be "microchip,ucs1002";
> > > +- reg                        : I2C slave address
> > > +
> > > +Optional properties:
> > > +- interrupts         : A list of interrupts lines present (could be either
> > > +                       corresponding to A_DET# pin, ALERT# pin, or both)
> > > +- interrupt-names    : A list of interrupt names. Should contain (if
> > > +                       present):
> > > +                       - "a_det" for line connected to A_DET# pin
> > > +                       - "alert" for line connected to ALERT# pin
> > > +                       Both are expected to be IRQ_TYPE_EDGE_BOTH
> > > +Example:
> > > +
> > > +&i2c3 {
> > > +     charger@32 {
> > > +             compatible = "microchip,ucs1002";
> > > +             pinctrl-names = "default";
> > > +             pinctrl-0 = <&pinctrl_ucs1002_pins>;
> > > +             reg = <0x32>;
> > > +             interrupts-extended = <&gpio5 2 IRQ_TYPE_EDGE_BOTH>,
> > > +                                   <&gpio3 21 IRQ_TYPE_EDGE_BOTH>;
> >
> > interrupts ?
> 
> Can't really use it here since it assumes single "interrupt-parent"
> (we have gpio5 and gpio3 as parents above)
> 
Ah, ok. Thanks for the clarification.

Guenter
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/power/supply/microchip,ucs1002.txt b/Documentation/devicetree/bindings/power/supply/microchip,ucs1002.txt
new file mode 100644
index 000000000000..1d284ad816bf
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/microchip,ucs1002.txt
@@ -0,0 +1,27 @@ 
+Microchip UCS1002 USB Port Power Controller
+
+Required properties:
+- compatible		: Should be "microchip,ucs1002";
+- reg			: I2C slave address
+
+Optional properties:
+- interrupts		: A list of interrupts lines present (could be either
+			  corresponding to A_DET# pin, ALERT# pin, or both)
+- interrupt-names	: A list of interrupt names. Should contain (if
+			  present):
+			  - "a_det" for line connected to A_DET# pin
+			  - "alert" for line connected to ALERT# pin
+			  Both are expected to be IRQ_TYPE_EDGE_BOTH
+Example:
+
+&i2c3 {
+	charger@32 {
+		compatible = "microchip,ucs1002";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_ucs1002_pins>;
+		reg = <0x32>;
+		interrupts-extended = <&gpio5 2 IRQ_TYPE_EDGE_BOTH>,
+				      <&gpio3 21 IRQ_TYPE_EDGE_BOTH>;
+		interrupt-names = "a_det", "alert";
+	};
+};