* AD7418 support
@ 2005-05-19 6:25 Togg
2005-05-19 6:25 ` AW: " Jean Delvare
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Togg @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
Hi,
I have a Gateworks Avila Platform (IXP425 Xscale) with an AD7418
Voltage/Temperature Sensor (Datasheet:
http://www.analog.com/UploadedFiles/Data_Sheets/5632736AD7416_7_8_g.pdf)
I didn't found any driver anywhere, so I wonder how difficult it would be to
implement a driver. On my platform the chip is connected via I2C, base
address 0x29. Voltages should be multiplied by 23.1
I don't have any experience on writing I2C drivers. Anyone knows if there
are good reference drivers which could be used? Best solution for me would
be if someone would implement this in a free minute :)
Regards,
Togg
Btw: I am not on this mailinglist, so please CC me directly.
^ permalink raw reply [flat|nested] 7+ messages in thread
* AW: AD7418 support
2005-05-19 6:25 AD7418 support Togg
` (3 preceding siblings ...)
2005-05-19 6:25 ` Jean Delvare
@ 2005-05-19 6:25 ` Togg
2005-05-19 6:25 ` AW: " Togg
5 siblings, 0 replies; 7+ messages in thread
From: Togg @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
Hi Jean,
I just took my information from the manual:
http://www.gateworks.com/manuals/avila_man.pdf
I will have look at the driver and ask u if I get bigger problems.
Togg
-----Urspr?ngliche Nachricht-----
Von: Jean Delvare [mailto:khali@linux-fr.org]
Gesendet: Donnerstag, 9. September 2004 12:07
An: Togg
Cc: sensors@Stimpy.netroedge.com
Betreff: Re: AD7418 support
> On Thu, 9 Sep 2004 08:42:22 +0200, Togg wrote
> I have a Gateworks Avila Platform (IXP425 Xscale) with an AD7418
> Voltage/Temperature Sensor (Datasheet:
> http://www.analog.com/UploadedFiles/Data_Sheets/5632736AD7416_7_8_g.pdf)
>
> I didn't found any driver anywhere, so I wonder how difficult it
> would be to implement a driver. On my platform the chip is connected
> via I2C, base address 0x29. Voltages should be multiplied by 23.1
On Thu, 9 Sep 2004 10:20:46 +0100, Jean Delvare wrote
> We don't support this family of chips yet. However, these chips look
> rather simple and writing a driver for them should be straightforward.
Hm, I guess I spoke too fast. These chips are not that simple. At a given
time, they are updating only one of their measurement channels (either the
temperature or one of the voltages). This means that the driver would have
to
change channels by itself, making it "active". By contrast, all our drivers
so
far (except the gl518sm in for 2.4) are passive (i.e. they only run at init
time and then when one reads from/writes to /proc or /sys). Another
possibility is to insert delays when reading the values. After all, there
are
only up to 5 (AD7417) or 2 (AD7418) channels, so it shouldn't be too long.
Conversion times are 30us for the temperature channel, 15us for the voltage
channels.
I'd also have a few questions:
1* The datasheet says that the AD7418 has its address hardcoded to 0x28. You
pretend yours is at 0x29. Are you sure it is an AD7418, and not an AD7417
(or
yet another chip)?
2* How should voltages be multiplied by 23.1? The datasheet says the 10-bit
ADC has a 2.5V range. This means a LSB of 2.44mV, not 23.1mV.
As a side note, it looks like the AD7416/7/8 are mostly LM75-compatible for
the temperature part. So, providing you don't care too much about the extra
resolution bit, and you force the chip address, you should at least have
temperature readings out of the box.
--
Jean Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* AD7418 support
2005-05-19 6:25 AD7418 support Togg
2005-05-19 6:25 ` AW: " Jean Delvare
@ 2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Jean Delvare @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
On Thu, 9 Sep 2004 08:42:22 +0200, Togg wrote
> I have a Gateworks Avila Platform (IXP425 Xscale) with an AD7418
> Voltage/Temperature Sensor (Datasheet:
> http://www.analog.com/UploadedFiles/Data_Sheets/5632736AD7416_7_8_g.pdf)
>
> I didn't found any driver anywhere, so I wonder how difficult it
> would be to implement a driver. On my platform the chip is connected
> via I2C, base address 0x29. Voltages should be multiplied by 23.1
We don't support this family of chips yet. However, these chips look rather
simple and writing a driver for them should be straightforward.
> I don't have any experience on writing I2C drivers. Anyone knows if there
> are good reference drivers which could be used? Best solution for me
> would be if someone would implement this in a free minute :)
I think you could start from the adm1025 driver for the general structure. The
AD7416/7/8 have some 16-bit registers, you could take a look at the lm75
driver for how this should be handled.
A single driver should support the three chips. However, until we actually
meet an AD7416 or an AD7417, supporting only the AD7418 is fine.
We have a document explaining how one can write a driver to support a new chip:
http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/doc/developers/new_drivers
This is for 2.4. For 2.6 there is a porting guide in the kernel sources:
Documentation/i2c/porting-clients
Good luck.
--
Jean Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* AD7418 support
2005-05-19 6:25 AD7418 support Togg
2005-05-19 6:25 ` AW: " Jean Delvare
2005-05-19 6:25 ` Jean Delvare
@ 2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Jean Delvare @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
> On Thu, 9 Sep 2004 08:42:22 +0200, Togg wrote
> I have a Gateworks Avila Platform (IXP425 Xscale) with an AD7418
> Voltage/Temperature Sensor (Datasheet:
> http://www.analog.com/UploadedFiles/Data_Sheets/5632736AD7416_7_8_g.pdf)
>
> I didn't found any driver anywhere, so I wonder how difficult it
> would be to implement a driver. On my platform the chip is connected
> via I2C, base address 0x29. Voltages should be multiplied by 23.1
On Thu, 9 Sep 2004 10:20:46 +0100, Jean Delvare wrote
> We don't support this family of chips yet. However, these chips look
> rather simple and writing a driver for them should be straightforward.
Hm, I guess I spoke too fast. These chips are not that simple. At a given
time, they are updating only one of their measurement channels (either the
temperature or one of the voltages). This means that the driver would have to
change channels by itself, making it "active". By contrast, all our drivers so
far (except the gl518sm in for 2.4) are passive (i.e. they only run at init
time and then when one reads from/writes to /proc or /sys). Another
possibility is to insert delays when reading the values. After all, there are
only up to 5 (AD7417) or 2 (AD7418) channels, so it shouldn't be too long.
Conversion times are 30us for the temperature channel, 15us for the voltage
channels.
I'd also have a few questions:
1* The datasheet says that the AD7418 has its address hardcoded to 0x28. You
pretend yours is at 0x29. Are you sure it is an AD7418, and not an AD7417 (or
yet another chip)?
2* How should voltages be multiplied by 23.1? The datasheet says the 10-bit
ADC has a 2.5V range. This means a LSB of 2.44mV, not 23.1mV.
As a side note, it looks like the AD7416/7/8 are mostly LM75-compatible for
the temperature part. So, providing you don't care too much about the extra
resolution bit, and you force the chip address, you should at least have
temperature readings out of the box.
--
Jean Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* AW: AW: AD7418 support
2005-05-19 6:25 AD7418 support Togg
` (4 preceding siblings ...)
2005-05-19 6:25 ` AW: " Togg
@ 2005-05-19 6:25 ` Togg
5 siblings, 0 replies; 7+ messages in thread
From: Togg @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
I allready got RTC and EEPROM already work with 2.4. this was relatively
easy work. I2cdetect is a good starting point, thank you for the hints.
I'll post the driver when its done.
Regards
-----Urspr?ngliche Nachricht-----
Von: Jean Delvare [mailto:khali@linux-fr.org]
Gesendet: Donnerstag, 9. September 2004 13:23
An: Togg
Cc: sensors@Stimpy.netroedge.com
Betreff: Re: AW: AD7418 support
On Thu, 9 Sep 2004 11:18:30 +0200, Togg wrote
> I just took my information from the manual:
> http://www.gateworks.com/manuals/avila_man.pdf
Oh, I see.
BTW, you will also need a bus driver. I think that there is a driver for
some
Intel IXP series in the latest 2.6 kernels. Care to give it a try? You
should
then be able to scan the bus using i2cdetect. This would confirm the address
of the monitoring chip. According to the docs you should also find an eeprom
and a real-time clock on the I2C bus.
--
Jean Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* AW: AD7418 support
2005-05-19 6:25 AD7418 support Togg
@ 2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Jean Delvare @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
On Thu, 9 Sep 2004 11:18:30 +0200, Togg wrote
> I just took my information from the manual:
> http://www.gateworks.com/manuals/avila_man.pdf
Oh, I see.
BTW, you will also need a bus driver. I think that there is a driver for some
Intel IXP series in the latest 2.6 kernels. Care to give it a try? You should
then be able to scan the bus using i2cdetect. This would confirm the address
of the monitoring chip. According to the docs you should also find an eeprom
and a real-time clock on the I2C bus.
--
Jean Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* AD7418 support
2005-05-19 6:25 AD7418 support Togg
` (2 preceding siblings ...)
2005-05-19 6:25 ` Jean Delvare
@ 2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` AW: " Togg
2005-05-19 6:25 ` AW: " Togg
5 siblings, 0 replies; 7+ messages in thread
From: Jean Delvare @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
Hi Togg,
Maybe you could try a visual inspection of the board looking for the hardware
monitoring chip?
You could also use i2cdetect to confirm whether the address is 0x28 or 0x29
(or something different). And while you're at it, you could try to i2cdump the
chip to see what's inside.
Thanks.
--
Jean Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-05-19 6:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19 6:25 AD7418 support Togg
2005-05-19 6:25 ` AW: " Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` AW: " Togg
2005-05-19 6:25 ` AW: " Togg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.