Re: [PATCH 1/1] : hwmon - new chip driver for TI ADS7828 A-D
> As far as I know boolean parameters take values 0 and 1, not N and Y. Not on the systems I am testing on (2.6.24-rc6) - the sysfs interface displays boolean parameters as Y/N, and will accept boot parameters as either Y/N or 0/1. Below is a snippet from a test proving this point : [EMAIL PROTECTED]:~$ cat /sys/module/ads7828/parameters/se_input Y [EMAIL PROTECTED]:~$ cat /sys/module/ads7828/parameters/int_vref Y after appending the ads7828.int_vref=N parameter to the kernel command-line : Linux 2.6.24-rc6 (shtest) (16:53 on Saturday, 05 January 2002) login: test [EMAIL PROTECTED]:~$ cat /sys/module/ads7828/parameters/int_vref N Is it more "correct" to refer to 1/0 in the documentation? I just naturally used the same syntax provided by the sysfs nodes -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/1] : hwmon - new chip driver for TI ADS7828 A-D
As far as I know boolean parameters take values 0 and 1, not N and Y. Not on the systems I am testing on (2.6.24-rc6) - the sysfs interface displays boolean parameters as Y/N, and will accept boot parameters as either Y/N or 0/1. Below is a snippet from a test proving this point : [EMAIL PROTECTED]:~$ cat /sys/module/ads7828/parameters/se_input Y [EMAIL PROTECTED]:~$ cat /sys/module/ads7828/parameters/int_vref Y after appending the ads7828.int_vref=N parameter to the kernel command-line : Linux 2.6.24-rc6 (shtest) (16:53 on Saturday, 05 January 2002) login: test [EMAIL PROTECTED]:~$ cat /sys/module/ads7828/parameters/int_vref N Is it more correct to refer to 1/0 in the documentation? I just naturally used the same syntax provided by the sysfs nodes -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/1] : hwmon - new chip driver for TI ADS7828 A-D
Andrew/Jean, Sorry for the delay - christmas & getting mutt working delayed my revised patch. Here is an updated patch against 2.6.24-rc6, which hopefully addresses all comments made so far. Jean - you mentioned declaring the devices as platform data & writing a new-style I2C driver - are there any examples of this approach I can refer to? I simply copied what is/was currently in-tree for this driver, which seems to work well with the hardware I'm working with (a COTS CPCI carrier) Since I've dropped Thunderbird I hope the patch mangling will be fixed. Any problem, please let me know. Regards, Steve Signed-Off by Steve Hardy <[EMAIL PROTECTED]> --- diff -uprN -X linux-2.6.24-rc6/Documentation/dontdiff linux-2.6.24-rc6/Documentation/hwmon/ads7828 linux-2.6.24-rc6-ads7828/Documentation/hwmon/ads7828 --- linux-2.6.24-rc6/Documentation/hwmon/ads78281970-01-01 01:00:00.0 +0100 +++ linux-2.6.24-rc6-ads7828/Documentation/hwmon/ads78282008-01-02 16:30:39.0 + @@ -0,0 +1,38 @@ +Kernel driver ads7828 += + +Supported chips: + * Texas Instruments/Burr-Brown ADS7828 +Prefix: 'ads7828' +Addresses scanned: I2C 0x48, 0x49, 0x4a, 0x4b +Datasheet: Publicly available at the Texas Instruments website : + http://focus.ti.com/lit/ds/symlink/ads7828.pdf + +Authors: + Steve Hardy <[EMAIL PROTECTED]> + +Module Parameters +- + +* se_input: bool (default Y) + Single ended operation - set to N for differential mode +* int_vref: bool (default Y) + Operate with the internal 2.5v reference - set to N for external reference +* vref_mv: int (default 2500) + If using an external reference, set this to the reference voltage in mv + +Description +--- + +This driver implements support for the Texas Instruments ADS7828. + +This device is a 12bit 8ch A-D converter. + +It can operate in single ended mode (8 +ve inputs) or in differential mode, +when 4 differential pairs can be measured. + +The chip also has the facility to use an external voltage reference. This +may be required if your hardware supplies the ADS7828 from a 5v supply, see +the datasheet for more details. + + diff -uprN -X linux-2.6.24-rc6/Documentation/dontdiff linux-2.6.24-rc6/drivers/hwmon/Kconfig linux-2.6.24-rc6-ads7828/drivers/hwmon/Kconfig --- linux-2.6.24-rc6/drivers/hwmon/Kconfig 2008-01-02 16:37:43.0 + +++ linux-2.6.24-rc6-ads7828/drivers/hwmon/Kconfig 2008-01-02 16:49:42.0 + @@ -588,6 +588,16 @@ config SENSORS_SMSC47B397 This driver can also be built as a module. If so, the module will be called smsc47b397. +config SENSORS_ADS7828 + tristate "Texas Instruments ADS7828" + depends on I2C + help + If you say yes here you get support for Texas Instruments ADS7828 + 12-bit 8-channel ADC device. + + This driver can also be built as a module. If so, the module + will be called ads7828. + config SENSORS_THMC50 tristate "Texas Instruments THMC50 / Analog Devices ADM1022" depends on I2C && EXPERIMENTAL diff -uprN -X linux-2.6.24-rc6/Documentation/dontdiff linux-2.6.24-rc6/drivers/hwmon/Makefile linux-2.6.24-rc6-ads7828/drivers/hwmon/Makefile --- linux-2.6.24-rc6/drivers/hwmon/Makefile 2008-01-02 16:37:43.0 + +++ linux-2.6.24-rc6-ads7828/drivers/hwmon/Makefile 2008-01-02 16:35:27.0 + @@ -22,6 +22,7 @@ obj-$(CONFIG_SENSORS_ADM1026) += adm1026 obj-$(CONFIG_SENSORS_ADM1029) += adm1029.o obj-$(CONFIG_SENSORS_ADM1031) += adm1031.o obj-$(CONFIG_SENSORS_ADM9240) += adm9240.o +obj-$(CONFIG_SENSORS_ADS7828) += ads7828.o obj-$(CONFIG_SENSORS_ADT7470) += adt7470.o obj-$(CONFIG_SENSORS_APPLESMC) += applesmc.o obj-$(CONFIG_SENSORS_AMS) += ams/ diff -uprN -X linux-2.6.24-rc6/Documentation/dontdiff linux-2.6.24-rc6/drivers/hwmon/ads7828.c linux-2.6.24-rc6-ads7828/drivers/hwmon/ads7828.c --- linux-2.6.24-rc6/drivers/hwmon/ads7828.c1970-01-01 01:00:00.0 +0100 +++ linux-2.6.24-rc6-ads7828/drivers/hwmon/ads7828.c2008-01-02 16:35:27.0 + @@ -0,0 +1,296 @@ +/* + ads7828.c - lm_sensors driver for ads7828 12bit 8ch ADC + (C) 2007 EADS Astrium + + This driver is based on the lm75 and other lm_sensors/hwmon drivers + + Written by Steve Hardy <[EMAIL PROTECTED]> + + Datasheet available at : http://focus.ti.com/lit/ds/symlink/ads7828.pdf + + 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. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PAR
Re: [PATCH 1/1] : hwmon - new chip driver for TI ADS7828 A-D
Andrew/Jean, Sorry for the delay - christmas getting mutt working delayed my revised patch. Here is an updated patch against 2.6.24-rc6, which hopefully addresses all comments made so far. Jean - you mentioned declaring the devices as platform data writing a new-style I2C driver - are there any examples of this approach I can refer to? I simply copied what is/was currently in-tree for this driver, which seems to work well with the hardware I'm working with (a COTS CPCI carrier) Since I've dropped Thunderbird I hope the patch mangling will be fixed. Any problem, please let me know. Regards, Steve Signed-Off by Steve Hardy [EMAIL PROTECTED] --- diff -uprN -X linux-2.6.24-rc6/Documentation/dontdiff linux-2.6.24-rc6/Documentation/hwmon/ads7828 linux-2.6.24-rc6-ads7828/Documentation/hwmon/ads7828 --- linux-2.6.24-rc6/Documentation/hwmon/ads78281970-01-01 01:00:00.0 +0100 +++ linux-2.6.24-rc6-ads7828/Documentation/hwmon/ads78282008-01-02 16:30:39.0 + @@ -0,0 +1,38 @@ +Kernel driver ads7828 += + +Supported chips: + * Texas Instruments/Burr-Brown ADS7828 +Prefix: 'ads7828' +Addresses scanned: I2C 0x48, 0x49, 0x4a, 0x4b +Datasheet: Publicly available at the Texas Instruments website : + http://focus.ti.com/lit/ds/symlink/ads7828.pdf + +Authors: +Steve Hardy [EMAIL PROTECTED] + +Module Parameters +- + +* se_input: bool (default Y) + Single ended operation - set to N for differential mode +* int_vref: bool (default Y) + Operate with the internal 2.5v reference - set to N for external reference +* vref_mv: int (default 2500) + If using an external reference, set this to the reference voltage in mv + +Description +--- + +This driver implements support for the Texas Instruments ADS7828. + +This device is a 12bit 8ch A-D converter. + +It can operate in single ended mode (8 +ve inputs) or in differential mode, +when 4 differential pairs can be measured. + +The chip also has the facility to use an external voltage reference. This +may be required if your hardware supplies the ADS7828 from a 5v supply, see +the datasheet for more details. + + diff -uprN -X linux-2.6.24-rc6/Documentation/dontdiff linux-2.6.24-rc6/drivers/hwmon/Kconfig linux-2.6.24-rc6-ads7828/drivers/hwmon/Kconfig --- linux-2.6.24-rc6/drivers/hwmon/Kconfig 2008-01-02 16:37:43.0 + +++ linux-2.6.24-rc6-ads7828/drivers/hwmon/Kconfig 2008-01-02 16:49:42.0 + @@ -588,6 +588,16 @@ config SENSORS_SMSC47B397 This driver can also be built as a module. If so, the module will be called smsc47b397. +config SENSORS_ADS7828 + tristate Texas Instruments ADS7828 + depends on I2C + help + If you say yes here you get support for Texas Instruments ADS7828 + 12-bit 8-channel ADC device. + + This driver can also be built as a module. If so, the module + will be called ads7828. + config SENSORS_THMC50 tristate Texas Instruments THMC50 / Analog Devices ADM1022 depends on I2C EXPERIMENTAL diff -uprN -X linux-2.6.24-rc6/Documentation/dontdiff linux-2.6.24-rc6/drivers/hwmon/Makefile linux-2.6.24-rc6-ads7828/drivers/hwmon/Makefile --- linux-2.6.24-rc6/drivers/hwmon/Makefile 2008-01-02 16:37:43.0 + +++ linux-2.6.24-rc6-ads7828/drivers/hwmon/Makefile 2008-01-02 16:35:27.0 + @@ -22,6 +22,7 @@ obj-$(CONFIG_SENSORS_ADM1026) += adm1026 obj-$(CONFIG_SENSORS_ADM1029) += adm1029.o obj-$(CONFIG_SENSORS_ADM1031) += adm1031.o obj-$(CONFIG_SENSORS_ADM9240) += adm9240.o +obj-$(CONFIG_SENSORS_ADS7828) += ads7828.o obj-$(CONFIG_SENSORS_ADT7470) += adt7470.o obj-$(CONFIG_SENSORS_APPLESMC) += applesmc.o obj-$(CONFIG_SENSORS_AMS) += ams/ diff -uprN -X linux-2.6.24-rc6/Documentation/dontdiff linux-2.6.24-rc6/drivers/hwmon/ads7828.c linux-2.6.24-rc6-ads7828/drivers/hwmon/ads7828.c --- linux-2.6.24-rc6/drivers/hwmon/ads7828.c1970-01-01 01:00:00.0 +0100 +++ linux-2.6.24-rc6-ads7828/drivers/hwmon/ads7828.c2008-01-02 16:35:27.0 + @@ -0,0 +1,296 @@ +/* + ads7828.c - lm_sensors driver for ads7828 12bit 8ch ADC + (C) 2007 EADS Astrium + + This driver is based on the lm75 and other lm_sensors/hwmon drivers + + Written by Steve Hardy [EMAIL PROTECTED] + + Datasheet available at : http://focus.ti.com/lit/ds/symlink/ads7828.pdf + + 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. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the + GNU General Public License
Re: [PATCH 1/1] : hwmon - new chip driver for TI ADS7828 A-D
Andrew, Thanks your your comments, I'm currently preparing/testing a revised patch based on your suggestions, which I will post later this week. A couple of comments inline. Steve I wouldn't bother with EXPERIMENTAL personally. It seems a farily pointless thing. OK, I copied one of the other hwmon drivers, many of which are marked experimental. +static int ads7828_attach_adapter(struct i2c_adapter *adapter); +static int ads7828_detect(struct i2c_adapter *adapter, int address, int kind); +static void ads7828_init_client(struct i2c_client *client); +static int ads7828_detach_client(struct i2c_client *client); +static struct ads7828_data *ads7828_update_device(struct device *dev); +static u16 ads7828_read_value(struct i2c_client *client, u8 reg); I do dislike all these forward declarations, but they're all needed here give the order of the functions. Maybe from my Pascal-on-pdp11 days.. OK, this is due to re-using the driver structure/style of other hwmon drivers, will try to improve. +static int ads7828_attach_adapter(struct i2c_adapter *adapter) +{ +if (!(adapter->class & I2C_CLASS_HWMON)) +return 0; Can this happen? Hmmm, this code exists in pretty much all of the other hwmon drivers, so I will leave it in. I think it relates to I2C vs ISA connected devices, to avoid detecting something with the correct ID on the wrong bus? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/1] : hwmon - new chip driver for TI ADS7828 A-D
Andrew, Thanks your your comments, I'm currently preparing/testing a revised patch based on your suggestions, which I will post later this week. A couple of comments inline. Steve I wouldn't bother with EXPERIMENTAL personally. It seems a farily pointless thing. OK, I copied one of the other hwmon drivers, many of which are marked experimental. +static int ads7828_attach_adapter(struct i2c_adapter *adapter); +static int ads7828_detect(struct i2c_adapter *adapter, int address, int kind); +static void ads7828_init_client(struct i2c_client *client); +static int ads7828_detach_client(struct i2c_client *client); +static struct ads7828_data *ads7828_update_device(struct device *dev); +static u16 ads7828_read_value(struct i2c_client *client, u8 reg); I do dislike all these forward declarations, but they're all needed here give the order of the functions. Maybe from my Pascal-on-pdp11 days.. OK, this is due to re-using the driver structure/style of other hwmon drivers, will try to improve. +static int ads7828_attach_adapter(struct i2c_adapter *adapter) +{ +if (!(adapter-class I2C_CLASS_HWMON)) +return 0; Can this happen? Hmmm, this code exists in pretty much all of the other hwmon drivers, so I will leave it in. I think it relates to I2C vs ISA connected devices, to avoid detecting something with the correct ID on the wrong bus? -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] : hwmon - new chip driver for TI ADS7828 A-D
Hi, Here is a patch against 2.6.23.9 which adds support for the Burr-Brown/Texas-Instruments ADS7828 12-bit 8-channel A-D converter. The chip is used for voltage monitoring on the COTS processor card I am currently working with. The driver simply outputs the current input voltages (in mv as specified in the lm-sensors sysfs interface documentation). Any scaling required for a specific board is handled by user-space. Hopefully this makes the driver generic enough to be generally useful. The driver is basically a simple rehash of existing code - I used lm75 as the starting point, with some inspiration from other existing drivers. Please let me know if there are any problems with the patch. Regards, Steve Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Steve Hardy <[EMAIL PROTECTED]> --- diff -uprN -X linux-2.6.23.9/Documentation/dontdiff linux-2.6.23.9/drivers/hwmon/Kconfig linux-2.6.23.9-ads7828/drivers/hwmon/Kconfig --- linux-2.6.23.9/drivers/hwmon/Kconfig2007-11-26 17:51:43.0 + +++ linux-2.6.23.9-ads7828/drivers/hwmon/Kconfig2007-11-28 10:02:02.0 + @@ -530,6 +530,16 @@ config SENSORS_THMC50 This driver can also be built as a module. If so, the module will be called thmc50. +config SENSORS_ADS7828 +tristate "Texas Instruments ADS7828" +depends on I2C && EXPERIMENTAL +help + If you say yes here you get support for Texas Instruments ADS7828 + 12-bit 8-channel ADC device + + This driver can also be built as a module. If so, the module + will be called ads7828 + config SENSORS_VIA686A tristate "VIA686A" depends on PCI diff -uprN -X linux-2.6.23.9/Documentation/dontdiff linux-2.6.23.9/drivers/hwmon/Makefile linux-2.6.23.9-ads7828/drivers/hwmon/Makefile --- linux-2.6.23.9/drivers/hwmon/Makefile2007-11-26 17:51:43.0 + +++ linux-2.6.23.9-ads7828/drivers/hwmon/Makefile2007-11-28 10:02:02.0 + @@ -22,6 +22,7 @@ obj-$(CONFIG_SENSORS_ADM1026)+= adm1026 obj-$(CONFIG_SENSORS_ADM1029)+= adm1029.o obj-$(CONFIG_SENSORS_ADM1031)+= adm1031.o obj-$(CONFIG_SENSORS_ADM9240)+= adm9240.o +obj-$(CONFIG_SENSORS_ADS7828)+= ads7828.o obj-$(CONFIG_SENSORS_APPLESMC)+= applesmc.o obj-$(CONFIG_SENSORS_AMS)+= ams/ obj-$(CONFIG_SENSORS_ATXP1)+= atxp1.o diff -uprN -X linux-2.6.23.9/Documentation/dontdiff linux-2.6.23.9/drivers/hwmon/ads7828.c linux-2.6.23.9-ads7828/drivers/hwmon/ads7828.c --- linux-2.6.23.9/drivers/hwmon/ads7828.c1970-01-01 01:00:00.0 +0100 +++ linux-2.6.23.9-ads7828/drivers/hwmon/ads7828.c2007-11-28 10:02:02.0 + @@ -0,0 +1,304 @@ +/* +ads7828.c - lm_sensors driver for ads7828 12bit 8ch ADC +(C) 2007 EADS Astrium + +This driver is based on the lm75 and other lm_sensors/hwmon drivers + +Written by Steve Hardy <[EMAIL PROTECTED]> + +Datasheet available at : http://focus.ti.com/lit/ds/symlink/ads7828.pdf + +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. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* Addresses to scan */ +static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0
[PATCH 1/1] : hwmon - new chip driver for TI ADS7828 A-D
Hi, Here is a patch against 2.6.23.9 which adds support for the Burr-Brown/Texas-Instruments ADS7828 12-bit 8-channel A-D converter. The chip is used for voltage monitoring on the COTS processor card I am currently working with. The driver simply outputs the current input voltages (in mv as specified in the lm-sensors sysfs interface documentation). Any scaling required for a specific board is handled by user-space. Hopefully this makes the driver generic enough to be generally useful. The driver is basically a simple rehash of existing code - I used lm75 as the starting point, with some inspiration from other existing drivers. Please let me know if there are any problems with the patch. Regards, Steve Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Steve Hardy [EMAIL PROTECTED] --- diff -uprN -X linux-2.6.23.9/Documentation/dontdiff linux-2.6.23.9/drivers/hwmon/Kconfig linux-2.6.23.9-ads7828/drivers/hwmon/Kconfig --- linux-2.6.23.9/drivers/hwmon/Kconfig2007-11-26 17:51:43.0 + +++ linux-2.6.23.9-ads7828/drivers/hwmon/Kconfig2007-11-28 10:02:02.0 + @@ -530,6 +530,16 @@ config SENSORS_THMC50 This driver can also be built as a module. If so, the module will be called thmc50. +config SENSORS_ADS7828 +tristate Texas Instruments ADS7828 +depends on I2C EXPERIMENTAL +help + If you say yes here you get support for Texas Instruments ADS7828 + 12-bit 8-channel ADC device + + This driver can also be built as a module. If so, the module + will be called ads7828 + config SENSORS_VIA686A tristate VIA686A depends on PCI diff -uprN -X linux-2.6.23.9/Documentation/dontdiff linux-2.6.23.9/drivers/hwmon/Makefile linux-2.6.23.9-ads7828/drivers/hwmon/Makefile --- linux-2.6.23.9/drivers/hwmon/Makefile2007-11-26 17:51:43.0 + +++ linux-2.6.23.9-ads7828/drivers/hwmon/Makefile2007-11-28 10:02:02.0 + @@ -22,6 +22,7 @@ obj-$(CONFIG_SENSORS_ADM1026)+= adm1026 obj-$(CONFIG_SENSORS_ADM1029)+= adm1029.o obj-$(CONFIG_SENSORS_ADM1031)+= adm1031.o obj-$(CONFIG_SENSORS_ADM9240)+= adm9240.o +obj-$(CONFIG_SENSORS_ADS7828)+= ads7828.o obj-$(CONFIG_SENSORS_APPLESMC)+= applesmc.o obj-$(CONFIG_SENSORS_AMS)+= ams/ obj-$(CONFIG_SENSORS_ATXP1)+= atxp1.o diff -uprN -X linux-2.6.23.9/Documentation/dontdiff linux-2.6.23.9/drivers/hwmon/ads7828.c linux-2.6.23.9-ads7828/drivers/hwmon/ads7828.c --- linux-2.6.23.9/drivers/hwmon/ads7828.c1970-01-01 01:00:00.0 +0100 +++ linux-2.6.23.9-ads7828/drivers/hwmon/ads7828.c2007-11-28 10:02:02.0 + @@ -0,0 +1,304 @@ +/* +ads7828.c - lm_sensors driver for ads7828 12bit 8ch ADC +(C) 2007 EADS Astrium + +This driver is based on the lm75 and other lm_sensors/hwmon drivers + +Written by Steve Hardy [EMAIL PROTECTED] + +Datasheet available at : http://focus.ti.com/lit/ds/symlink/ads7828.pdf + +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. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include linux/module.h +#include linux/init.h +#include linux/slab.h +#include linux/jiffies.h +#include linux/i2c.h +#include linux/hwmon.h +#include linux/hwmon-sysfs.h +#include linux/err.h +#include linux/mutex.h + +/* Addresses