linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [RFC] adding hwmon support to sequoia device tree
@ 2008-09-04  9:55 Matthias Fuchs
  2008-09-04 12:25 ` Josh Boyer
  0 siblings, 1 reply; 18+ messages in thread
From: Matthias Fuchs @ 2008-09-04  9:55 UTC (permalink / raw)
  To: linuxppc-dev

Hi,

I added support for the Sequoia on-board I2C temperature sensor to the device.
I am not sure if there is any node naming convention for such devices.
The needed I2C driver can be found under drivers/hwmon in the kernel sources,
so I found "hwmon" suitable for the node.

Do we want to add this to the sequoia dts file? If this is how it should be done,
I will commit a proper patch.


diff --git a/arch/powerpc/boot/dts/sequoia.dts b/arch/powerpc/boot/dts/sequoia.dts
index 72d15f0..82fdfdf 100644
--- a/arch/powerpc/boot/dts/sequoia.dts
+++ b/arch/powerpc/boot/dts/sequoia.dts
@@ -246,13 +246,23 @@
                        };

                        IIC0: i2c@ef600700 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
                                compatible = "ibm,iic-440epx", "ibm,iic";
                                reg = <0xef600700 0x00000014>;
                                interrupt-parent = <&UIC0>;
                                interrupts = <0x2 0x4>;
+
+                               hwmon@48 {
+                                       device_type = "hwmon";
+                                       compatible = "analog,ad7414";
+                                       reg = <0x48>;
+                               };
                        };

                        IIC1: i2c@ef600800 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
(prepare for adding devices on the 2nd I2C also)

                                compatible = "ibm,iic-440epx", "ibm,iic";
                                reg = <0xef600800 0x00000014>;
                                interrupt-parent = <&UIC0>;


Matthias

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [RFC] adding hwmon support to sequoia device tree
  2008-09-04  9:55 [RFC] adding hwmon support to sequoia device tree Matthias Fuchs
@ 2008-09-04 12:25 ` Josh Boyer
  2008-09-04 12:50   ` Stefan Roese
  2008-09-04 14:28   ` Matthias Fuchs
  0 siblings, 2 replies; 18+ messages in thread
From: Josh Boyer @ 2008-09-04 12:25 UTC (permalink / raw)
  To: Matthias Fuchs; +Cc: linuxppc-dev

On Thu, Sep 04, 2008 at 11:55:02AM +0200, Matthias Fuchs wrote:
>Hi,
>
>I added support for the Sequoia on-board I2C temperature sensor to the device.
>I am not sure if there is any node naming convention for such devices.
>The needed I2C driver can be found under drivers/hwmon in the kernel sources,
>so I found "hwmon" suitable for the node.
>
>Do we want to add this to the sequoia dts file? If this is how it should be done,
>I will commit a proper patch.

See comments below.  Out of curiosity, do you have a working driver and
setup with this?

>diff --git a/arch/powerpc/boot/dts/sequoia.dts b/arch/powerpc/boot/dts/sequoia.dts
>index 72d15f0..82fdfdf 100644
>--- a/arch/powerpc/boot/dts/sequoia.dts
>+++ b/arch/powerpc/boot/dts/sequoia.dts
>@@ -246,13 +246,23 @@
>                        };
>
>                        IIC0: i2c@ef600700 {
>+                               #address-cells = <1>;
>+                               #size-cells = <0>;
>                                compatible = "ibm,iic-440epx", "ibm,iic";
>                                reg = <0xef600700 0x00000014>;
>                                interrupt-parent = <&UIC0>;
>                                interrupts = <0x2 0x4>;
>+
>+                               hwmon@48 {
>+                                       device_type = "hwmon";

We don't need device_type.  Particularly not a new one like this.

>+                                       compatible = "analog,ad7414";

Perhaps 'compatible = "analog,ad7417", "amcc,hwmon-440epx";'

josh

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [RFC] adding hwmon support to sequoia device tree
  2008-09-04 12:25 ` Josh Boyer
@ 2008-09-04 12:50   ` Stefan Roese
  2008-09-04 14:28   ` Matthias Fuchs
  1 sibling, 0 replies; 18+ messages in thread
From: Stefan Roese @ 2008-09-04 12:50 UTC (permalink / raw)
  To: linuxppc-dev

On Thursday 04 September 2008, Josh Boyer wrote:
> >Do we want to add this to the sequoia dts file? If this is how it should
> > be done, I will commit a proper patch.
>
> See comments below.  Out of curiosity, do you have a working driver and
> setup with this?

Sure, it did hit mainline with 2.6.27:

drivers/hwmon/ad7414.c

> >diff --git a/arch/powerpc/boot/dts/sequoia.dts
> > b/arch/powerpc/boot/dts/sequoia.dts index 72d15f0..82fdfdf 100644
> >--- a/arch/powerpc/boot/dts/sequoia.dts
> >+++ b/arch/powerpc/boot/dts/sequoia.dts
> >@@ -246,13 +246,23 @@
> >                        };
> >
> >                        IIC0: i2c@ef600700 {
> >+                               #address-cells = <1>;
> >+                               #size-cells = <0>;
> >                                compatible = "ibm,iic-440epx", "ibm,iic";
> >                                reg = <0xef600700 0x00000014>;
> >                                interrupt-parent = <&UIC0>;
> >                                interrupts = <0x2 0x4>;
> >+
> >+                               hwmon@48 {
> >+                                       device_type = "hwmon";
>
> We don't need device_type.  Particularly not a new one like this.
>
> >+                                       compatible = "analog,ad7414";
>
> Perhaps 'compatible = "analog,ad7417", "amcc,hwmon-440epx";'

I don't think we need any amcc and/or 440epx here. Its a common chip from 
Analog.

Best regards,
Stefan

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [RFC] adding hwmon support to sequoia device tree
  2008-09-04 12:25 ` Josh Boyer
  2008-09-04 12:50   ` Stefan Roese
@ 2008-09-04 14:28   ` Matthias Fuchs
  2008-09-04 14:41     ` [PATCH] powerpc/44x: Add hwmon support to Sequoia " Matthias Fuchs
  2008-09-05 14:27     ` [RFC] adding hwmon support to sequoia " Sean MacLennan
  1 sibling, 2 replies; 18+ messages in thread
From: Matthias Fuchs @ 2008-09-04 14:28 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev

Hi,=20

On Thursday 04 September 2008 14:25, Josh Boyer wrote:
> On Thu, Sep 04, 2008 at 11:55:02AM +0200, Matthias Fuchs wrote:
> >Hi,
> >
> >I added support for the Sequoia on-board I2C temperature sensor to the d=
evice.
> >I am not sure if there is any node naming convention for such devices.
> >The needed I2C driver can be found under drivers/hwmon in the kernel sou=
rces,
> >so I found "hwmon" suitable for the node.
> >
> >Do we want to add this to the sequoia dts file? If this is how it should=
 be done,
> >I will commit a proper patch.
>=20
> See comments below.  Out of curiosity, do you have a working driver and
> setup with this?
Of course.=20

You need
	CONFIG_HWMON=3Dy
	CONFIG_SENSORS_AD7414=3Dy

Via sysfs you get:
sequoia:~# cat /sys/bus/i2c/devices/0-0048/temp1_input
34750
sequoia:~# cat /sys/class/hwmon/hwmon0/device/temp1_input
34750
sequoia:~#=20

34750 =3D 34.75=B0C

>=20
> >diff --git a/arch/powerpc/boot/dts/sequoia.dts b/arch/powerpc/boot/dts/s=
equoia.dts
> >index 72d15f0..82fdfdf 100644
> >--- a/arch/powerpc/boot/dts/sequoia.dts
> >+++ b/arch/powerpc/boot/dts/sequoia.dts
> >@@ -246,13 +246,23 @@
> >                        };
> >
> >                        IIC0: i2c@ef600700 {
> >+                               #address-cells =3D <1>;
> >+                               #size-cells =3D <0>;
> >                                compatible =3D "ibm,iic-440epx", "ibm,ii=
c";
> >                                reg =3D <0xef600700 0x00000014>;
> >                                interrupt-parent =3D <&UIC0>;
> >                                interrupts =3D <0x2 0x4>;
> >+
> >+                               hwmon@48 {
> >+                                       device_type =3D "hwmon";
>=20
> We don't need device_type.  Particularly not a new one like this.
I will remove that.
>=20
> >+                                       compatible =3D "analog,ad7414";
>=20
> Perhaps 'compatible =3D "analog,ad7417", "amcc,hwmon-440epx";'
It has nothing to do with either AMCC or 440EPx.

Patch is on the way.

Matthias

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] powerpc/44x: Add hwmon support to Sequoia device tree
  2008-09-04 14:28   ` Matthias Fuchs
@ 2008-09-04 14:41     ` Matthias Fuchs
  2008-09-05 10:19       ` Stefan Roese
  2008-09-05 14:27     ` [RFC] adding hwmon support to sequoia " Sean MacLennan
  1 sibling, 1 reply; 18+ messages in thread
From: Matthias Fuchs @ 2008-09-04 14:41 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: sr

This patch adds support for the AD7414 temperature sensor
on Sequoia PPC440EPx board.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
---
 arch/powerpc/boot/dts/sequoia.dts |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/boot/dts/sequoia.dts b/arch/powerpc/boot/dts/sequoia.dts
index 72d15f0..9ba5def 100644
--- a/arch/powerpc/boot/dts/sequoia.dts
+++ b/arch/powerpc/boot/dts/sequoia.dts
@@ -246,13 +246,22 @@
 	   		};
 
 			IIC0: i2c@ef600700 {
+				#address-cells = <1>;
+				#size-cells = <0>;
 				compatible = "ibm,iic-440epx", "ibm,iic";
 				reg = <0xef600700 0x00000014>;
 				interrupt-parent = <&UIC0>;
 				interrupts = <0x2 0x4>;
+
+				hwmon@48 {
+					compatible = "analog,ad7414";
+					reg = <0x48>;
+				};
 			};
 
 			IIC1: i2c@ef600800 {
+				#address-cells = <1>;
+				#size-cells = <0>;
 				compatible = "ibm,iic-440epx", "ibm,iic";
 				reg = <0xef600800 0x00000014>;
 				interrupt-parent = <&UIC0>;
-- 
1.5.3

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc/44x: Add hwmon support to Sequoia device tree
  2008-09-04 14:41     ` [PATCH] powerpc/44x: Add hwmon support to Sequoia " Matthias Fuchs
@ 2008-09-05 10:19       ` Stefan Roese
  2008-09-05 14:58         ` Matthias Fuchs
  2008-09-05 16:00         ` Scott Wood
  0 siblings, 2 replies; 18+ messages in thread
From: Stefan Roese @ 2008-09-05 10:19 UTC (permalink / raw)
  To: Matthias Fuchs; +Cc: linuxppc-dev

On Thursday 04 September 2008, Matthias Fuchs wrote:
> This patch adds support for the AD7414 temperature sensor
> on Sequoia PPC440EPx board.
>
> Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
> ---
>  arch/powerpc/boot/dts/sequoia.dts |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/boot/dts/sequoia.dts
> b/arch/powerpc/boot/dts/sequoia.dts index 72d15f0..9ba5def 100644
> --- a/arch/powerpc/boot/dts/sequoia.dts
> +++ b/arch/powerpc/boot/dts/sequoia.dts
> @@ -246,13 +246,22 @@
>  	   		};
>
>  			IIC0: i2c@ef600700 {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
>  				compatible = "ibm,iic-440epx", "ibm,iic";
>  				reg = <0xef600700 0x00000014>;
>  				interrupt-parent = <&UIC0>;
>  				interrupts = <0x2 0x4>;
> +
> +				hwmon@48 {

Not sure if we shouldn't use

                                ad7414@48 {

here. This is the way it is already done in warp.dts.

Other than this:

Acked-by: Stefan Roese <sr@denx.de>

Best regards,
Stefan

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [RFC] adding hwmon support to sequoia device tree
  2008-09-04 14:28   ` Matthias Fuchs
  2008-09-04 14:41     ` [PATCH] powerpc/44x: Add hwmon support to Sequoia " Matthias Fuchs
@ 2008-09-05 14:27     ` Sean MacLennan
  1 sibling, 0 replies; 18+ messages in thread
From: Sean MacLennan @ 2008-09-05 14:27 UTC (permalink / raw)
  To: Matthias Fuchs, Josh Boyer; +Cc: linuxppc-dev

Yes, the ad7414 driver was finally accepted into the kernel. The ad7414 =
is a generic temperature chip.

FWIW, the warp.dts uses ad7414@4c, not hwmon.

Cheers,
   Sean

-----Original Message-----
From:	linuxppc-dev-bounces+smaclennan=3Dpikatech.com@ozlabs.org on =
behalf of Matthias Fuchs
Sent:	Thu 9/4/2008 10:28 AM
To:	Josh Boyer
Cc:	linuxppc-dev@ozlabs.org
Subject:	Re: [RFC] adding hwmon support to sequoia device tree

Hi,=20

On Thursday 04 September 2008 14:25, Josh Boyer wrote:
> On Thu, Sep 04, 2008 at 11:55:02AM +0200, Matthias Fuchs wrote:
> >Hi,
> >
> >I added support for the Sequoia on-board I2C temperature sensor to =
the device.
> >I am not sure if there is any node naming convention for such =
devices.
> >The needed I2C driver can be found under drivers/hwmon in the kernel =
sources,
> >so I found "hwmon" suitable for the node.
> >
> >Do we want to add this to the sequoia dts file? If this is how it =
should be done,
> >I will commit a proper patch.
>=20
> See comments below.  Out of curiosity, do you have a working driver =
and
> setup with this?
Of course.=20

You need
	CONFIG_HWMON=3Dy
	CONFIG_SENSORS_AD7414=3Dy

Via sysfs you get:
sequoia:~# cat /sys/bus/i2c/devices/0-0048/temp1_input
34750
sequoia:~# cat /sys/class/hwmon/hwmon0/device/temp1_input
34750
sequoia:~#=20

34750 =3D 34.75=B0C

>=20
> >diff --git a/arch/powerpc/boot/dts/sequoia.dts =
b/arch/powerpc/boot/dts/sequoia.dts
> >index 72d15f0..82fdfdf 100644
> >--- a/arch/powerpc/boot/dts/sequoia.dts
> >+++ b/arch/powerpc/boot/dts/sequoia.dts
> >@@ -246,13 +246,23 @@
> >                        };
> >
> >                        IIC0: i2c@ef600700 {
> >+                               #address-cells =3D <1>;
> >+                               #size-cells =3D <0>;
> >                                compatible =3D "ibm,iic-440epx", =
"ibm,iic";
> >                                reg =3D <0xef600700 0x00000014>;
> >                                interrupt-parent =3D <&UIC0>;
> >                                interrupts =3D <0x2 0x4>;
> >+
> >+                               hwmon@48 {
> >+                                       device_type =3D "hwmon";
>=20
> We don't need device_type.  Particularly not a new one like this.
I will remove that.
>=20
> >+                                       compatible =3D =
"analog,ad7414";
>=20
> Perhaps 'compatible =3D "analog,ad7417", "amcc,hwmon-440epx";'
It has nothing to do with either AMCC or 440EPx.

Patch is on the way.

Matthias
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc/44x: Add hwmon support to Sequoia device tree
  2008-09-05 10:19       ` Stefan Roese
@ 2008-09-05 14:58         ` Matthias Fuchs
  2008-09-05 16:00         ` Scott Wood
  1 sibling, 0 replies; 18+ messages in thread
From: Matthias Fuchs @ 2008-09-05 14:58 UTC (permalink / raw)
  To: Stefan Roese; +Cc: linuxppc-dev

Hi,

I was inspired by some I2C RTC node (tqm5200.dts). Those nodes
are named rtc@... But to be in common I can change it. Also
the vendor is differnet in warp's dts file. adi (analog device inc.) against
"analog".

So I will update my patch to be compatible with warp.dts.

I keep your ack, Stefan.

Matthias

On Friday 05 September 2008 12:19, Stefan Roese wrote:
> > diff --git a/arch/powerpc/boot/dts/sequoia.dts
> > b/arch/powerpc/boot/dts/sequoia.dts index 72d15f0..9ba5def 100644
> > --- a/arch/powerpc/boot/dts/sequoia.dts
> > +++ b/arch/powerpc/boot/dts/sequoia.dts
> > @@ -246,13 +246,22 @@
> >  	   		};
> >
> >  			IIC0: i2c@ef600700 {
> > +				#address-cells = <1>;
> > +				#size-cells = <0>;
> >  				compatible = "ibm,iic-440epx", "ibm,iic";
> >  				reg = <0xef600700 0x00000014>;
> >  				interrupt-parent = <&UIC0>;
> >  				interrupts = <0x2 0x4>;
> > +
> > +				hwmon@48 {
> 
> Not sure if we shouldn't use
> 
>                                 ad7414@48 {
> 
> here. This is the way it is already done in warp.dts.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc/44x: Add hwmon support to Sequoia device tree
  2008-09-05 10:19       ` Stefan Roese
  2008-09-05 14:58         ` Matthias Fuchs
@ 2008-09-05 16:00         ` Scott Wood
  2008-09-06  0:17           ` Sean MacLennan
  1 sibling, 1 reply; 18+ messages in thread
From: Scott Wood @ 2008-09-05 16:00 UTC (permalink / raw)
  To: Stefan Roese; +Cc: linuxppc-dev

On Fri, Sep 05, 2008 at 12:19:43PM +0200, Stefan Roese wrote:
> > +
> > +				hwmon@48 {
> 
> Not sure if we shouldn't use
> 
>                                 ad7414@48 {
> 
> here. This is the way it is already done in warp.dts.

We shouldn't.  Node names are supposed to be generic:
http://playground.sun.com/1275/practice/gnames/gnamv14a.html

-Scott

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc/44x: Add hwmon support to Sequoia device tree
  2008-09-05 16:00         ` Scott Wood
@ 2008-09-06  0:17           ` Sean MacLennan
  2008-09-06 12:07             ` Josh Boyer
  2008-09-06 12:40             ` [PATCH] " Matthias Fuchs
  0 siblings, 2 replies; 18+ messages in thread
From: Sean MacLennan @ 2008-09-06  0:17 UTC (permalink / raw)
  To: linuxppc-dev

On Fri, 5 Sep 2008 11:00:18 -0500
"Scott Wood" <scottwood@freescale.com> wrote:

> On Fri, Sep 05, 2008 at 12:19:43PM +0200, Stefan Roese wrote:
> > > +
> > > +				hwmon@48 {
> > 
> > Not sure if we shouldn't use
> > 
> >                                 ad7414@48 {
> > 
> > here. This is the way it is already done in warp.dts.
> 
> We shouldn't.  Node names are supposed to be generic:
> http://playground.sun.com/1275/practice/gnames/gnamv14a.html

Damn. Where were you a year ago when I first introduced this? ;)

And if it is really supposed to be generic, would temp@48 be a
better name since this is basically a generic temperature chip?

Now that the i2c driver is a full of platform driver, I think I
can change the name with no repercussions. So I can live with whatever
decision is made. Can't do anything about the systems that are out in
the field though....

Cheers,
   Sean

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc/44x: Add hwmon support to Sequoia device tree
  2008-09-06 12:40             ` [PATCH] " Matthias Fuchs
@ 2008-09-06 11:49               ` Sean MacLennan
  2008-09-06 15:07               ` Wolfgang Grandegger
  1 sibling, 0 replies; 18+ messages in thread
From: Sean MacLennan @ 2008-09-06 11:49 UTC (permalink / raw)
  To: Matthias Fuchs; +Cc: linuxppc-dev

On Sat, 6 Sep 2008 14:40:41 +0200
"Matthias Fuchs" <matthias.fuchs@esd-electronics.com> wrote:

> Sean, I can take your "adi" instead of "analog" for this special
> sensor.

I think I was told to use adi because it is the stock market symbol for
analog devices.

Cheers,
   Sean

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc/44x: Add hwmon support to Sequoia device tree
  2008-09-06  0:17           ` Sean MacLennan
@ 2008-09-06 12:07             ` Josh Boyer
  2008-09-08  7:57               ` [PATCH V2] " Matthias Fuchs
  2008-09-06 12:40             ` [PATCH] " Matthias Fuchs
  1 sibling, 1 reply; 18+ messages in thread
From: Josh Boyer @ 2008-09-06 12:07 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev

On Fri, Sep 05, 2008 at 08:17:03PM -0400, Sean MacLennan wrote:
>On Fri, 5 Sep 2008 11:00:18 -0500
>"Scott Wood" <scottwood@freescale.com> wrote:
>
>> On Fri, Sep 05, 2008 at 12:19:43PM +0200, Stefan Roese wrote:
>> > > +
>> > > +				hwmon@48 {
>> > 
>> > Not sure if we shouldn't use
>> > 
>> >                                 ad7414@48 {
>> > 
>> > here. This is the way it is already done in warp.dts.
>> 
>> We shouldn't.  Node names are supposed to be generic:
>> http://playground.sun.com/1275/practice/gnames/gnamv14a.html
>
>Damn. Where were you a year ago when I first introduced this? ;)
>
>And if it is really supposed to be generic, would temp@48 be a
>better name since this is basically a generic temperature chip?
>
>Now that the i2c driver is a full of platform driver, I think I
>can change the name with no repercussions. So I can live with whatever
>decision is made. Can't do anything about the systems that are out in
>the field though....

It's just the unit-name that should be generic, not the compatible.  The
only thing unit-name is used for is path lookup and distinguishing between
similar hardware units.  I don't think either is a problem in this case.

josh

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc/44x: Add hwmon support to Sequoia device tree
  2008-09-06  0:17           ` Sean MacLennan
  2008-09-06 12:07             ` Josh Boyer
@ 2008-09-06 12:40             ` Matthias Fuchs
  2008-09-06 11:49               ` Sean MacLennan
  2008-09-06 15:07               ` Wolfgang Grandegger
  1 sibling, 2 replies; 18+ messages in thread
From: Matthias Fuchs @ 2008-09-06 12:40 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Sean MacLennan

Hi,

I have chosen "hwmon" because those drivers are placed in the kernel's
drivers/hwmon subdirectory. "temp" sounds to much like "temporary" for
me :-)

We can name it "sensor" - inspired by the lm-sensors projects that 
takes care of such sensors. Because these type of devices are not always
used to monitor the whatever hardware  ... sensor could even be better.

So my favorites are sensor@ or hwmon@.

Sean, I can take your "adi" instead of "analog" for this special sensor.

Matthias

On Saturday 06 September 2008 02:17:03 Sean MacLennan wrote:
> On Fri, 5 Sep 2008 11:00:18 -0500
>
> "Scott Wood" <scottwood@freescale.com> wrote:
> > On Fri, Sep 05, 2008 at 12:19:43PM +0200, Stefan Roese wrote:
> > > > +
> > > > +				hwmon@48 {
> > >
> > > Not sure if we shouldn't use
> > >
> > >                                 ad7414@48 {
> > >
> > > here. This is the way it is already done in warp.dts.
> >
> > We shouldn't.  Node names are supposed to be generic:
> > http://playground.sun.com/1275/practice/gnames/gnamv14a.html
>
> Damn. Where were you a year ago when I first introduced this? ;)
>
> And if it is really supposed to be generic, would temp@48 be a
> better name since this is basically a generic temperature chip?
>
> Now that the i2c driver is a full of platform driver, I think I
> can change the name with no repercussions. So I can live with whatever
> decision is made. Can't do anything about the systems that are out in
> the field though....
>
> Cheers,
>    Sean
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc/44x: Add hwmon support to Sequoia device tree
  2008-09-06 12:40             ` [PATCH] " Matthias Fuchs
  2008-09-06 11:49               ` Sean MacLennan
@ 2008-09-06 15:07               ` Wolfgang Grandegger
  2008-09-08 16:03                 ` Scott Wood
  1 sibling, 1 reply; 18+ messages in thread
From: Wolfgang Grandegger @ 2008-09-06 15:07 UTC (permalink / raw)
  To: Matthias Fuchs; +Cc: linuxppc-dev, Sean MacLennan

Matthias Fuchs wrote:
> Hi,
> 
> I have chosen "hwmon" because those drivers are placed in the kernel's
> drivers/hwmon subdirectory. "temp" sounds to much like "temporary" for
> me :-)

How about "dtt"? That's what we use in U-Boot for digital temperature
sensors as well.

> We can name it "sensor" - inspired by the lm-sensors projects that 
> takes care of such sensors. Because these type of devices are not always
> used to monitor the whatever hardware  ... sensor could even be better.
> 
> So my favorites are sensor@ or hwmon@.
> 
> Sean, I can take your "adi" instead of "analog" for this special sensor.

"adi" sounds more reasonable, indeed and as the OF software ignores the
vendor field, changing the name should not harm.

Wolfgang.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH V2] powerpc/44x: Add hwmon support to Sequoia device tree
  2008-09-06 12:07             ` Josh Boyer
@ 2008-09-08  7:57               ` Matthias Fuchs
  0 siblings, 0 replies; 18+ messages in thread
From: Matthias Fuchs @ 2008-09-08  7:57 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Stefan Roese, Sean MacLennan

This patch adds support for the AD7414 temperature sensor
on Sequoia PPC440EPx board.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Acked-by: Stefan Roese <sr@denx.de>
---
 arch/powerpc/boot/dts/sequoia.dts |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/boot/dts/sequoia.dts b/arch/powerpc/boot/dts/sequoia.dts
index 72d15f0..3b295e8 100644
--- a/arch/powerpc/boot/dts/sequoia.dts
+++ b/arch/powerpc/boot/dts/sequoia.dts
@@ -246,13 +246,22 @@
 	   		};
 
 			IIC0: i2c@ef600700 {
+				#address-cells = <1>;
+				#size-cells = <0>;
 				compatible = "ibm,iic-440epx", "ibm,iic";
 				reg = <0xef600700 0x00000014>;
 				interrupt-parent = <&UIC0>;
 				interrupts = <0x2 0x4>;
+
+				hwmon@48 {
+					compatible = "adi,ad7414";
+					reg = <0x48>;
+				};
 			};
 
 			IIC1: i2c@ef600800 {
+				#address-cells = <1>;
+				#size-cells = <0>;
 				compatible = "ibm,iic-440epx", "ibm,iic";
 				reg = <0xef600800 0x00000014>;
 				interrupt-parent = <&UIC0>;
-- 
1.5.3

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc/44x: Add hwmon support to Sequoia device tree
  2008-09-06 15:07               ` Wolfgang Grandegger
@ 2008-09-08 16:03                 ` Scott Wood
  2008-09-09 11:52                   ` Matthias Fuchs
  0 siblings, 1 reply; 18+ messages in thread
From: Scott Wood @ 2008-09-08 16:03 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: Sean MacLennan, linuxppc-dev

On Sat, Sep 06, 2008 at 05:07:15PM +0200, Wolfgang Grandegger wrote:
> How about "dtt"? That's what we use in U-Boot for digital temperature
> sensors as well.

I vote against any acronyms that are not very well known.  Even knowing
that it's supposed to be "digital temperature <something>", I can't
figure out what the <something> is.  Not having the context that it
relates to temperature, I wouldn't have a clue what "dtt" is.

hwmon is concise and fairly obvious, and unlike "temp" could be
meaningfully used with chips that also monitor voltages, fan speeds, etc.

-Scott

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc/44x: Add hwmon support to Sequoia device tree
  2008-09-08 16:03                 ` Scott Wood
@ 2008-09-09 11:52                   ` Matthias Fuchs
  2008-09-09 12:15                     ` Josh Boyer
  0 siblings, 1 reply; 18+ messages in thread
From: Matthias Fuchs @ 2008-09-09 11:52 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev, Sean MacLennan

On Monday 08 September 2008 18:03, Scott Wood wrote:
> On Sat, Sep 06, 2008 at 05:07:15PM +0200, Wolfgang Grandegger wrote:
> > How about "dtt"? That's what we use in U-Boot for digital temperature
> > sensors as well.
> 
> I vote against any acronyms that are not very well known.  Even knowing
> that it's supposed to be "digital temperature <something>", I can't
> figure out what the <something> is.  Not having the context that it
> relates to temperature, I wouldn't have a clue what "dtt" is.
> 
> hwmon is concise and fairly obvious, and unlike "temp" could be
> meaningfully used with chips that also monitor voltages, fan speeds, etc.
> 
> -Scott

Uh, thanks Scott. Now we got it. I am fully with you and my "V2" patch
should make everybody happy.

So, let's apply this patch.

Matthias

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc/44x: Add hwmon support to Sequoia device tree
  2008-09-09 11:52                   ` Matthias Fuchs
@ 2008-09-09 12:15                     ` Josh Boyer
  0 siblings, 0 replies; 18+ messages in thread
From: Josh Boyer @ 2008-09-09 12:15 UTC (permalink / raw)
  To: Matthias Fuchs; +Cc: Scott Wood, linuxppc-dev, Sean MacLennan

On Tue, Sep 09, 2008 at 01:52:29PM +0200, Matthias Fuchs wrote:
>On Monday 08 September 2008 18:03, Scott Wood wrote:
>> On Sat, Sep 06, 2008 at 05:07:15PM +0200, Wolfgang Grandegger wrote:
>> > How about "dtt"? That's what we use in U-Boot for digital temperature
>> > sensors as well.
>> 
>> I vote against any acronyms that are not very well known.  Even knowing
>> that it's supposed to be "digital temperature <something>", I can't
>> figure out what the <something> is.  Not having the context that it
>> relates to temperature, I wouldn't have a clue what "dtt" is.
>> 
>> hwmon is concise and fairly obvious, and unlike "temp" could be
>> meaningfully used with chips that also monitor voltages, fan speeds, etc.
>> 
>> -Scott
>
>Uh, thanks Scott. Now we got it. I am fully with you and my "V2" patch
>should make everybody happy.
>
>So, let's apply this patch.

I already have it queued up.

josh

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2008-09-09 12:15 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-04  9:55 [RFC] adding hwmon support to sequoia device tree Matthias Fuchs
2008-09-04 12:25 ` Josh Boyer
2008-09-04 12:50   ` Stefan Roese
2008-09-04 14:28   ` Matthias Fuchs
2008-09-04 14:41     ` [PATCH] powerpc/44x: Add hwmon support to Sequoia " Matthias Fuchs
2008-09-05 10:19       ` Stefan Roese
2008-09-05 14:58         ` Matthias Fuchs
2008-09-05 16:00         ` Scott Wood
2008-09-06  0:17           ` Sean MacLennan
2008-09-06 12:07             ` Josh Boyer
2008-09-08  7:57               ` [PATCH V2] " Matthias Fuchs
2008-09-06 12:40             ` [PATCH] " Matthias Fuchs
2008-09-06 11:49               ` Sean MacLennan
2008-09-06 15:07               ` Wolfgang Grandegger
2008-09-08 16:03                 ` Scott Wood
2008-09-09 11:52                   ` Matthias Fuchs
2008-09-09 12:15                     ` Josh Boyer
2008-09-05 14:27     ` [RFC] adding hwmon support to sequoia " Sean MacLennan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).