Message ID | 1398334639-14172-12-git-send-email-tomi.valkeinen@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hello. On 24-04-2014 14:17, Tomi Valkeinen wrote: > omap5-uevm has a tca6424a I/O expander. Add it to the .dts file. > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> > Cc: Tony Lindgren <tony@atomide.com> > --- > arch/arm/boot/dts/omap5-uevm.dts | 7 +++++++ > 1 file changed, 7 insertions(+) > diff --git a/arch/arm/boot/dts/omap5-uevm.dts b/arch/arm/boot/dts/omap5-uevm.dts > index 3b99ec25b748..9e7581eaeb23 100644 > --- a/arch/arm/boot/dts/omap5-uevm.dts > +++ b/arch/arm/boot/dts/omap5-uevm.dts > @@ -434,6 +434,13 @@ > pinctrl-0 = <&i2c5_pins>; > > clock-frequency = <400000>; > + > + tca6424a: tca6424a@22 { The ePAPR standard [1] says: "The name of a node should be somewhat generic, reflecting the function of the device and not its precise programming model. If appropriate, the name should be one of the following choices: [...] - gpio;" > + compatible = "ti,tca6424"; > + reg = <0x22>; > + gpio-controller; > + #gpio-cells = <2>; > + }; > }; [1] http://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf WBR, Sergei
On 24/04/14 16:49, Sergei Shtylyov wrote: > Hello. > > On 24-04-2014 14:17, Tomi Valkeinen wrote: > >> omap5-uevm has a tca6424a I/O expander. Add it to the .dts file. > >> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> >> Cc: Tony Lindgren <tony@atomide.com> >> --- >> arch/arm/boot/dts/omap5-uevm.dts | 7 +++++++ >> 1 file changed, 7 insertions(+) > >> diff --git a/arch/arm/boot/dts/omap5-uevm.dts >> b/arch/arm/boot/dts/omap5-uevm.dts >> index 3b99ec25b748..9e7581eaeb23 100644 >> --- a/arch/arm/boot/dts/omap5-uevm.dts >> +++ b/arch/arm/boot/dts/omap5-uevm.dts >> @@ -434,6 +434,13 @@ >> pinctrl-0 = <&i2c5_pins>; >> >> clock-frequency = <400000>; >> + >> + tca6424a: tca6424a@22 { > > The ePAPR standard [1] says: "The name of a node should be somewhat > generic, > reflecting the function of the device and not its precise programming > model. > If appropriate, the name should be one of the following choices: > [...] > - gpio;" Right. I wonder what the name should be... "gpio" is out, as the name should be more specific. We already have gpio1-8, which are the gpio banks from the SoC. It could be 'gpio9', but that makes it sound it's just one more SoC gpio bank. 'gpio-expander1'? Tomi
Hello. On 04/24/2014 06:33 PM, Tomi Valkeinen wrote: >>> omap5-uevm has a tca6424a I/O expander. Add it to the .dts file. >>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> >>> Cc: Tony Lindgren <tony@atomide.com> >>> --- >>> arch/arm/boot/dts/omap5-uevm.dts | 7 +++++++ >>> 1 file changed, 7 insertions(+) >>> diff --git a/arch/arm/boot/dts/omap5-uevm.dts >>> b/arch/arm/boot/dts/omap5-uevm.dts >>> index 3b99ec25b748..9e7581eaeb23 100644 >>> --- a/arch/arm/boot/dts/omap5-uevm.dts >>> +++ b/arch/arm/boot/dts/omap5-uevm.dts >>> @@ -434,6 +434,13 @@ >>> pinctrl-0 = <&i2c5_pins>; >>> >>> clock-frequency = <400000>; >>> + >>> + tca6424a: tca6424a@22 { >> The ePAPR standard [1] says: "The name of a node should be somewhat >> generic, >> reflecting the function of the device and not its precise programming >> model. >> If appropriate, the name should be one of the following choices: >> [...] >> - gpio;" > Right. I wonder what the name should be... "gpio" is out, as the name > should be more specific. No, it's not out. The name should be "gpio@22", I think it would be unique. > We already have gpio1-8, which are the gpio > banks from the SoC. I don't understand why you are indexing the names while you probably have the address part after @ that makes them unique already. > Tomi WBR, Sergei
On 24/04/14 19:53, Sergei Shtylyov wrote: >> Right. I wonder what the name should be... "gpio" is out, as the name >> should be more specific. > > No, it's not out. The name should be "gpio@22", I think it would be > unique. > >> We already have gpio1-8, which are the gpio >> banks from the SoC. > > I don't understand why you are indexing the names while you probably > have the address part after @ that makes them unique already. Ah sorry for the confusion, I misunderstood. I was talking about the label, not the name, of the node. So the labels for the gpio banks are 'gpio2' etc. The names are 'gpio@123456' etc. And yes, here the name should be 'gpio@22' as you said. I didn't see any rules about the labels in the ePARP doc, so I guess 'tca6424a' would be a valid one. Maybe not a good one, though, especially if there are multiple tca6424a chips on the board (I need to check). Tomi
diff --git a/arch/arm/boot/dts/omap5-uevm.dts b/arch/arm/boot/dts/omap5-uevm.dts index 3b99ec25b748..9e7581eaeb23 100644 --- a/arch/arm/boot/dts/omap5-uevm.dts +++ b/arch/arm/boot/dts/omap5-uevm.dts @@ -434,6 +434,13 @@ pinctrl-0 = <&i2c5_pins>; clock-frequency = <400000>; + + tca6424a: tca6424a@22 { + compatible = "ti,tca6424"; + reg = <0x22>; + gpio-controller; + #gpio-cells = <2>; + }; }; &mcbsp3 {
omap5-uevm has a tca6424a I/O expander. Add it to the .dts file. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Tony Lindgren <tony@atomide.com> --- arch/arm/boot/dts/omap5-uevm.dts | 7 +++++++ 1 file changed, 7 insertions(+)