I2C patches for 2.6.11
Subsystems (10)
PATCH 1/1 I2C patches for 2.6.11
Hi,
Here is a I2C update for 2.6.11. It includes a number of fixes, and some new i2c drivers. All of these patches have been in the past few -mm releases.
Please pull from:
bk://kernel.bkbits.net/gregkh/linux/i2c-2.6
Patches will be posted to linux-kernel and sensors as a follow-up thread for those who want to see them.
thanks,
greg k-h
Documentation/i2c/porting-clients | 6 Documentation/i2c/writing-clients | 6 MAINTAINERS | 4 drivers/acorn/char/i2c.c | 2 drivers/acorn/char/pcf8583.c | 1 drivers/i2c/algos/i2c-algo-ite.c | 4 drivers/i2c/algos/i2c-algo-pca.c | 30 drivers/i2c/algos/i2c-algo-pcf.c | 2 drivers/i2c/algos/i2c-algo-sgi.c | 2 drivers/i2c/busses/Kconfig | 12 drivers/i2c/busses/Makefile | 1 drivers/i2c/busses/i2c-au1550.c | 2 drivers/i2c/busses/i2c-elektor.c | 1 drivers/i2c/busses/i2c-ibm_iic.c | 2 drivers/i2c/busses/i2c-iop3xx.c | 2 drivers/i2c/busses/i2c-ixp4xx.c | 4 drivers/i2c/busses/i2c-keywest.c | 2 drivers/i2c/busses/i2c-mpc.c | 2 drivers/i2c/busses/i2c-mv64xxx.c | 596 ++++++++++++++++ drivers/i2c/busses/i2c-nforce2.c | 6 drivers/i2c/busses/i2c-s3c2410.c | 5 drivers/i2c/chips/Kconfig | 46 + drivers/i2c/chips/Makefile | 4 drivers/i2c/chips/adm1021.c | 9 drivers/i2c/chips/adm1025.c | 12 drivers/i2c/chips/adm1026.c | 87 -- drivers/i2c/chips/adm1031.c | 9 drivers/i2c/chips/asb100.c | 9 drivers/i2c/chips/ds1621.c | 9 drivers/i2c/chips/eeprom.c | 4 drivers/i2c/chips/fscher.c | 11 drivers/i2c/chips/fscpos.c | 643 +++++++++++++++++ drivers/i2c/chips/gl518sm.c | 12 drivers/i2c/chips/gl520sm.c | 754 ++++++++++++++++++++ drivers/i2c/chips/isp1301_omap.c | 1 drivers/i2c/chips/it87.c | 76 +- drivers/i2c/chips/lm63.c | 5 drivers/i2c/chips/lm75.c | 9 drivers/i2c/chips/lm77.c | 9 drivers/i2c/chips/lm78.c | 58 - drivers/i2c/chips/lm80.c | 30 drivers/i2c/chips/lm83.c | 12 drivers/i2c/chips/lm85.c | 14 drivers/i2c/chips/lm87.c | 12 drivers/i2c/chips/lm90.c | 12 drivers/i2c/chips/m41t00.c | 247 ++++++ drivers/i2c/chips/max1619.c | 13 drivers/i2c/chips/pc87360.c | 4 drivers/i2c/chips/pcf8574.c | 4 drivers/i2c/chips/pcf8591.c | 4 drivers/i2c/chips/rtc8564.c | 18 drivers/i2c/chips/sis5595.c | 794 ++++++++++++++++++++++ drivers/i2c/chips/smsc47b397.c | 5 drivers/i2c/chips/smsc47m1.c | 9 drivers/i2c/chips/via686a.c | 6 drivers/i2c/chips/w83627hf.c | 26 drivers/i2c/chips/w83781d.c | 29 drivers/i2c/chips/w83l785ts.c | 12 drivers/i2c/i2c-core.c | 81 +- drivers/i2c/i2c-dev.c | 9 drivers/i2c/i2c-sensor-detect.c | 7 drivers/macintosh/therm_windtunnel.c | 4 drivers/media/common/saa7146_i2c.c | 8 drivers/media/dvb/b2c2/skystar2.c | 2 drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c | 2 drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 2 drivers/media/video/adv7170.c | 5 drivers/media/video/adv7175.c | 5 drivers/media/video/bt819.c | 11 drivers/media/video/bt856.c | 5 drivers/media/video/bttv-i2c.c | 3 drivers/media/video/cx88/cx88-i2c.c | 1 drivers/media/video/ovcamchip/ovcamchip_core.c | 1 drivers/media/video/saa5246a.c | 1 drivers/media/video/saa5249.c | 1 drivers/media/video/saa7110.c | 5 drivers/media/video/saa7111.c | 5 drivers/media/video/saa7114.c | 5 drivers/media/video/saa7134/saa7134-i2c.c | 3 drivers/media/video/saa7185.c | 5 drivers/media/video/tda7432.c | 1 drivers/media/video/tda9840.c | 4 drivers/media/video/tda9875.c | 1 drivers/media/video/tea6415c.c | 4 drivers/media/video/tea6420.c | 4 drivers/media/video/tuner-3036.c | 1 drivers/media/video/vpx3220.c | 19 include/linux/i2c-id.h | 18 include/linux/i2c.h | 63 - include/linux/mv643xx.h | 17 include/linux/pci_ids.h | 1 include/media/saa7146.h | 4 sound/oss/dmasound/dac3550a.c | 4 sound/ppc/keywest.c | 2 94 files changed, 3503 insertions(+), 521 deletions(-)
-----
<hfvogt:gmx.net>:
o I2C i2c-nforce2: add support for nForce4 (patch against 2.6.11-rc4)
<maartendeprez:scarlet.be>:
o I2C: add GL520SM Sensor Chip driver
<shawn.starr:rogers.com>:
o I2C: lm80 driver improvement
<stefan:desire.ch>:
o I2C: fix for fscpos voltage values
o I2C: add fscpos chip driver
<yekkim:pacbell.net>:
o I2C: Fix some gcc 4.0 compile failures and warnings
Adrian Bunk:
o i2c-core.c: make some code static
Alexey Dobriyan:
o I2C: use time_after instead of comparing jiffies
Andrew Morton:
o I2C: saa7146 build fix
Aurelien Jarno:
o I2C: New chip driver: sis5595
o I2C: lm78 driver improvement
Ben Dooks:
o I2C: S3C2410 missing I2C_CLASS_HWMON
Corey Minyard:
o I2C: minor I2C cleanups
Greg Kroah-Hartman:
o I2C: fixed up the i2c-id.h algo ids
o I2C: just delete the id field, let's not delay it any longer
o I2C: Fix up some build warnings in the fscpos driver
Ian Campbell:
o I2C: fix typo in drivers/i2c/busses/i2c-ixp4xx.c
o I2C: improve debugging output
Jean Delvare:
o I2C: Trivial indentation fix in i2c/chips/Kconfig
o I2C: Change of i2c co-maintainer
o I2C: w83627hf needs i2c-isa
o Add class definition to the elektor bus driver
o I2C: Make i2c list terminators explicitely unsigned
o I2C: Remove NULL client checks in rtc8564 driver
o I2C: Kill unused includes in i2c-sensor-detect.c
o I2C: Enable w83781d and w83627hf temperature channels
o I2C: Kill i2c_client.id (5/5)
o I2C: Kill i2c_client.id (4/5)
o I2C: Kill i2c_client.id (3/5)
o I2C: Kill i2c_client.id (2/5)
o I2C: Kill i2c_client.id (1/5)
o I2C: Allow it87 pwm reconfiguration
Maciej W. Rozycki:
o I2C: Enable I2C_PIIX4 for 64-bit platforms
Mark A. Greer:
o I2C: add Marvell mv64xxx i2c driver
o I2C: add ST M41T00 I2C RTC chip driver
Mark M. Hoffman:
o I2C: unnecessary #includes in asb100.c
o I2C: i2c-dev namespace cleanup
PATCH 1/1 I2C: add fscpos chip driver
ChangeSet 1.2080, 2005/03/02 11:04:17-08:00, [email protected]
[PATCH] I2C: add fscpos chip driver
This patch against 2.6.11-rc1 contains a driver for fscpos sensors.
drivers/i2c/chips/Kconfig | 11 drivers/i2c/chips/Makefile | 1 drivers/i2c/chips/fscpos.c | 633 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 645 insertions(+)
drivers/i2c/chips/Kconfig +11 -0
@@ -84,6 +84,17 @@ This driver can also be built as a module. If so, the module will be called fscher. +config SENSORS_FSCPOS + tristate "FSC Poseidon" + depends on I2C && EXPERIMENTAL + select I2C_SENSOR + help + If you say yes here you get support for Fujitsu Siemens + Computers Poseidon sensor chips. + + This driver can also be built as a module. If so, the module + will be called fscpos. + config SENSORS_GL518SM tristate "Genesys Logic GL518SM" depends on I2C && EXPERIMENTAL
drivers/i2c/chips/Makefile +1 -0
@@ -14,6 +14,7 @@ obj-$(CONFIG_SENSORS_DS1621) += ds1621.o obj-$(CONFIG_SENSORS_EEPROM) += eeprom.o obj-$(CONFIG_SENSORS_FSCHER) += fscher.o +obj-$(CONFIG_SENSORS_FSCPOS) += fscpos.o obj-$(CONFIG_SENSORS_GL518SM) += gl518sm.o obj-$(CONFIG_SENSORS_IT87) += it87.o obj-$(CONFIG_SENSORS_LM63) += lm63.o
drivers/i2c/chips/fscpos.c new file +633 -0
633 lines not on this page · raw message
PATCH 1/1 I2C: Allow it87 pwm reconfiguration
ChangeSet 1.2081, 2005/03/02 11:50:10-08:00, [email protected]
[PATCH] I2C: Allow it87 pwm reconfiguration
Quoting myself:
Quoted 5 lines
As soon as you will have confirmed that everything worked as expected, Jonas and I will provide a patch adding a pwm polarity reconfiguration module parameter for you to test. This should give you access to the PWM features of your it87 chip again, but in a safe way for a change ;)
Here comes this patch. The new "fix_pwm_polarity" module parameter allows one to force the it87 chip reconfiguration. This is only supported in the case the original PWM configuration is suspected to be bogus, and only if we think that reconfiguring the chip is safe.
I wish to thank Rudolf Marek and Jonas Munsin again for their testing and review of my code.
drivers/i2c/chips/it87.c | 71 +++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 59 insertions(+), 12 deletions(-)
drivers/i2c/chips/it87.c +59 -12
@@ -104,6 +104,9 @@/* Update battery voltage after every reading if true */ static int update_vbat; +/* Not all BIOSes properly configure the PWM registers */ +static int fix_pwm_polarity; +/* Chip Type */ static u16 chip_type;
@@ -224,6 +227,7 @@static int it87_write_value (struct i2c_client *client,u8 register,u8 value);static struct it87_data *it87_update_device (struct device *dev); +static int it87_check_pwm (struct i2c_client *client);static void it87_init_client (struct i2c_client *client,struct it87_data *data);
@@ -718,7 +722,6 @@const char *name ="" ;int is_isa =i2c_is_isa_adapter (adapter);int enable_pwm_interface; -int tmp;if (!is_isa && !i2c_check_functionality (adapter,I2C_FUNC_SMBUS_BYTE_DATA ))
@@ -822,20 +825,12 @@if ((err =i2c_attach_client (new_client))) goto ERROR2; +/* Check PWM configuration */ + enable_pwm_interface =it87_check_pwm (new_client); +/* Initialize the IT87 chip */ it87_init_client (new_client, data); -/* Some BIOSes fail to correctly configure the IT87 fans. All fans off -* and polarity set to active low is sign that this is the case so we -* disable pwm control to protect the user. */ - enable_pwm_interface =1 ; - tmp =it87_read_value (new_client,IT87_REG_FAN_CTL ); -if ((tmp &0x87 ) ==0 ) { - enable_pwm_interface =0 ; -dev_info (&new_client->dev, -"detected broken BIOS defaults, disabling pwm interface" ); - } -/* Register sysfs hooks */ device_create_file (&new_client->dev, &dev_attr_in0_input);device_create_file (&new_client->dev, &dev_attr_in1_input);
@@ -966,6 +961,56 @@return i2c_smbus_write_byte_data (client, reg, value); } +/* Return 1 if and only if the PWM interface is safe to use */ +static int it87_check_pwm (struct i2c_client *client) +{ +/* Some BIOSes fail to correctly configure the IT87 fans. All fans off +* and polarity set to active low is sign that this is the case so we +* disable pwm control to protect the user. */ +int tmp =it87_read_value (client,IT87_REG_FAN_CTL ); +if ((tmp &0x87 ) ==0 ) { +if (fix_pwm_polarity) { +/* The user asks us to attempt a chip reconfiguration. +* This means switching to active high polarity and +* inverting all fan speed values. */ +int i; +u8 pwm[3 ]; + +for (i =0 ; i <3 ; i++) + pwm[i] =it87_read_value (client, +IT87_REG_PWM (i)); + +/* If any fan is in automatic pwm mode, the polarity +* might be correct, as suspicious as it seems, so we +* better don't change anything (but still disable the +* PWM interface). */ +if (!((pwm[0 ] | pwm[1 ] | pwm[2 ]) &0x80 )) { +dev_info (&client->dev,"Reconfiguring PWM to " +"active high polarity\n" ); +it87_write_value (client,IT87_REG_FAN_CTL , + tmp |0x87 ); +for (i =0 ; i <3 ; i++) +it87_write_value (client, +IT87_REG_PWM (i), +0x7f & ~pwm[i]); +return 1 ; + } + +dev_info (&client->dev,"PWM configuration is " +"too broken to be fixed\n" ); + } + +dev_info (&client->dev,"Detected broken BIOS " +"defaults, disabling PWM interface\n" ); +return 0 ; + }else if (fix_pwm_polarity) { +dev_info (&client->dev,"PWM configuration looks " +"sane, won't touch\n" ); + } + +return 1 ; +} +/* Called when we have found a new IT87. */ static void it87_init_client (struct i2c_client *client,struct it87_data *data) {
@@ -1126,6 +1171,8 @@MODULE_DESCRIPTION ("IT8705F, IT8712F, Sis950 driver" );module_param (update_vbat, bool,0 );MODULE_PARM_DESC (update_vbat,"Update vbat if set else return powerup value" ); +module_param (fix_pwm_polarity, bool,0 ); +MODULE_PARM_DESC (fix_pwm_polarity,"Force PWM polarity to active high (DANGEROUS)" );MODULE_LICENSE ("GPL" );module_init (sm_it87_init);
PATCH 1/1 I2C: Fix up some build warnings in the fscpos driver.
ChangeSet 1.2082, 2005/03/02 11:51:21-08:00, [email protected]
[PATCH] I2C: Fix up some build warnings in the fscpos driver.
drivers/i2c/chips/fscpos.c | 4 +--- 1 files changed, 1 insertion(+), 3 deletions(-)
drivers/i2c/chips/fscpos.c +1 -3
@@ -51,8 +51,6 @@* The FSCPOS registers */ -#define DEBUG -/* chip identification */ #define FSCPOS_REG_IDENT_0 0x00#define FSCPOS_REG_IDENT_1 0x01
@@ -566,10 +564,10 @@if ((jiffies - data->last_updated >2 *HZ ) || (jiffies < data->last_updated) || !data->valid) { +int i;dev_dbg (&client->dev,"Starting fscpos update\n" ); -int i;for (i =0 ; i <3 ; i++) { data->temp_act[i] =fscpos_read_value (client,FSCPOS_REG_TEMP_ACT [i]);
PATCH 1/1 I2C: Kill i2c_client.id (1/5)
ChangeSet 1.2083, 2005/03/02 11:51:51-08:00, [email protected]
[PATCH] I2C: Kill i2c_client.id (1/5)
(1/5) Stop using i2c_client.id in i2c/chips drivers (mostly hardware
monitoring drivers).
Drivers affected:
* adm1021
* adm1025
* adm1026
* adm1031
* ds1621
* fscher
* gl518sm
* isp1301_omap
* lm75
* lm77
* lm80
* lm83
* lm85
* lm87
* lm90
* max1619
* pcf8574
* pcf8591
* rtc8564
* smsc47m1
* w83l785ts
The vast majority of these drivers simply defined the i2c_client id struct member but never used it, so they are not affected at all by the change. Exceptions are:
* lm85 and rtc8564, which would at least display the id in a debug message when assigning it. Not really useful though, as the id was then never used.
* adm1026, which used the assigned id in all driver messages. However, since dev_* calls will append the bus number and client address to these messages, the id information is redundant and can go away. Also, the driver would allow some GPIO reprogramming on the first client only (id=0) and removing the id doesn't allow that anymore. I would restore a similar functionality if needed, but the ADM1026 chip is found on very few motherboards and none of these has more than one ADM1026 chip AFAIK, so it doesn't seem to be worth the effort.
drivers/i2c/chips/adm1021.c | 4 - drivers/i2c/chips/adm1025.c | 7 --- drivers/i2c/chips/adm1026.c | 80 +++++++++++++++------------------------ drivers/i2c/chips/adm1031.c | 4 - drivers/i2c/chips/ds1621.c | 4 - drivers/i2c/chips/fscher.c | 7 --- drivers/i2c/chips/gl518sm.c | 7 --- drivers/i2c/chips/isp1301_omap.c | 1 drivers/i2c/chips/lm75.c | 4 - drivers/i2c/chips/lm77.c | 4 - drivers/i2c/chips/lm80.c | 8 --- drivers/i2c/chips/lm83.c | 7 --- drivers/i2c/chips/lm85.c | 9 ---- drivers/i2c/chips/lm87.c | 7 --- drivers/i2c/chips/lm90.c | 7 --- drivers/i2c/chips/max1619.c | 7 --- drivers/i2c/chips/pcf8574.c | 4 - drivers/i2c/chips/pcf8591.c | 4 - drivers/i2c/chips/rtc8564.c | 2 drivers/i2c/chips/smsc47m1.c | 5 -- drivers/i2c/chips/w83l785ts.c | 7 --- 21 files changed, 32 insertions(+), 157 deletions(-)
drivers/i2c/chips/adm1021.c +0 -4
@@ -147,8 +147,6 @@ .detach_client = adm1021_detach_client, }; -static int adm1021_id; -#define show (value) \ static ssize_t show_##value(struct device *dev, char *buf) \ { \
@@ -299,8 +297,6 @@/* Fill in the remaining client fields and put it into the global list */ strlcpy (new_client->name, type_name,I2C_NAME_SIZE ); data->type = kind; - - new_client->id = adm1021_id++; data->valid =0 ;init_MUTEX (&data->update_lock);
drivers/i2c/chips/adm1025.c +0 -7
@@ -148,12 +148,6 @@ };/* -* Internal variables -*/ - -static int adm1025_id; - -/* * Sysfs stuff */
@@ -397,7 +391,6 @@/* We can fill in the remaining client fields */ strlcpy (new_client->name, name,I2C_NAME_SIZE ); - new_client->id = adm1025_id++; data->valid =0 ;init_MUTEX (&data->update_lock);
drivers/i2c/chips/adm1026.c +32 -48
179 lines not on this page · raw message
drivers/i2c/chips/adm1031.c +0 -4
@@ -110,8 +110,6 @@ .detach_client = adm1031_detach_client, }; -static int adm1031_id; -static inline u8 adm1031_read_value (struct i2c_client *client,u8 reg) {return i2c_smbus_read_byte_data (client, reg);
@@ -781,8 +779,6 @@ data->chip_type = kind;strlcpy (new_client->name, name,I2C_NAME_SIZE ); - - new_client->id = adm1031_id++; data->valid =0 ;init_MUTEX (&data->update_lock);
drivers/i2c/chips/ds1621.c +0 -4
@@ -95,8 +95,6 @@ .detach_client = ds1621_detach_client, }; -static int ds1621_id; -/* All registers are word-sized, except for the configuration register. DS1621 uses a high-byte first convention, which is exactly opposite to the usual practice. */
@@ -236,8 +234,6 @@/* Fill in remaining client fields and put it into the global list */ strlcpy (new_client->name,"ds1621" ,I2C_NAME_SIZE ); - - new_client->id = ds1621_id++; data->valid =0 ;init_MUTEX (&data->update_lock);
drivers/i2c/chips/fscher.c +0 -7
@@ -151,12 +151,6 @@ };/* -* Internal variables -*/ - -static int fscher_id; - -/* * Sysfs stuff */
@@ -337,7 +331,6 @@/* Fill in the remaining client fields and put it into the * global list */ strlcpy (new_client->name,"fscher" ,I2C_NAME_SIZE ); - new_client->id = fscher_id++; data->valid =0 ;init_MUTEX (&data->update_lock);
drivers/i2c/chips/gl518sm.c +0 -7
@@ -159,12 +159,6 @@ };/* -* Internal variables -*/ - -static int gl518_id; - -/* * Sysfs stuff */
@@ -396,7 +390,6 @@/* Fill in the remaining client fields */ strlcpy (new_client->name,"gl518sm" ,I2C_NAME_SIZE ); - new_client->id = gl518_id++; data->type = kind; data->valid =0 ;init_MUTEX (&data->update_lock);
drivers/i2c/chips/isp1301_omap.c +0 -1
@@ -1503,7 +1503,6 @@ isp->client.addr = address;i2c_set_clientdata (&isp->client, isp); isp->client.adapter = bus; - isp->client.id =1301 ; isp->client.driver = &isp1301_driver;strlcpy (isp->client.name,DRIVER_NAME ,I2C_NAME_SIZE ); i2c = &isp->client;
drivers/i2c/chips/lm75.c +0 -4
@@ -73,8 +73,6 @@ .detach_client = lm75_detach_client, }; -static int lm75_id; -#define show (value) \ static ssize_t show_##value(struct device *dev, char *buf) \ { \
@@ -196,8 +194,6 @@/* Fill in the remaining client fields and put it into the global list */ strlcpy (new_client->name, name,I2C_NAME_SIZE ); - - new_client->id = lm75_id++; data->valid =0 ;init_MUTEX (&data->update_lock);
drivers/i2c/chips/lm77.c +0 -4
@@ -81,8 +81,6 @@ .detach_client = lm77_detach_client, }; -static int lm77_id; -/* straight from the datasheet */ #define LM77_TEMP_MIN (-55000)#define LM77_TEMP_MAX 125000
@@ -295,8 +293,6 @@/* Fill in the remaining client fields and put it into the global list */ strlcpy (new_client->name, name,I2C_NAME_SIZE ); - - new_client->id = lm77_id++; data->valid =0 ;init_MUTEX (&data->update_lock);
drivers/i2c/chips/lm80.c +0 -8
@@ -141,12 +141,6 @@static int lm80_write_value (struct i2c_client *client,u8 reg,u8 value);/* -* Internal variables -*/ - -static int lm80_id; - -/* * Driver data (common to all clients) */
@@ -425,8 +419,6 @@/* Fill in the remaining client fields and put it into the global list */ strlcpy (new_client->name, name,I2C_NAME_SIZE ); - - new_client->id = lm80_id++; data->valid =0 ;init_MUTEX (&data->update_lock);
drivers/i2c/chips/lm83.c +0 -7
@@ -150,12 +150,6 @@ };/* -* Internal variables -*/ - -static int lm83_id; - -/* * Sysfs stuff */
@@ -312,7 +306,6 @@/* We can fill in the remaining client fields */ strlcpy (new_client->name, name,I2C_NAME_SIZE ); - new_client->id = lm83_id++; data->valid =0 ;init_MUTEX (&data->update_lock);
drivers/i2c/chips/lm85.c +0 -9
@@ -389,9 +389,6 @@ .detach_client = lm85_detach_client, }; -/* Unique ID assigned to each LM85 detected */ -static int lm85_id; -/* 4 Fans */ static ssize_t show_fan (struct device *dev,char *buf,int nr)
@@ -1148,15 +1145,9 @@strlcpy (new_client->name, type_name,I2C_NAME_SIZE );/* Fill in the remaining client fields */ - new_client->id = lm85_id++; data->type = kind; data->valid =0 ;init_MUTEX (&data->update_lock); - -dev_dbg (&adapter->dev,"Assigning ID %d to %s at %d,0x%02x\n" , - new_client->id, new_client->name, -i2c_adapter_id (new_client->adapter), - new_client->addr);/* Tell the I2C layer a new client has arrived */ if ((err =i2c_attach_client (new_client)))
drivers/i2c/chips/lm87.c +0 -7
@@ -203,12 +203,6 @@ };/* -* Internal variables -*/ - -static int lm87_id; - -/* * Sysfs stuff */
@@ -569,7 +563,6 @@/* We can fill in the remaining client fields */ strlcpy (new_client->name,"lm87" ,I2C_NAME_SIZE ); - new_client->id = lm87_id++; data->valid =0 ;init_MUTEX (&data->update_lock);
drivers/i2c/chips/lm90.c +0 -7
@@ -190,12 +190,6 @@ };/* -* Internal variables -*/ - -static int lm90_id; - -/* * Sysfs stuff */
@@ -427,7 +421,6 @@/* We can fill in the remaining client fields */ strlcpy (new_client->name, name,I2C_NAME_SIZE ); - new_client->id = lm90_id++; data->valid =0 ;init_MUTEX (&data->update_lock);
drivers/i2c/chips/max1619.c +0 -7
@@ -117,12 +117,6 @@ };/* -* Internal variables -*/ - -static int max1619_id; - -/* * Sysfs stuff */
@@ -267,7 +261,6 @@/* We can fill in the remaining client fields */ strlcpy (new_client->name, name,I2C_NAME_SIZE ); - new_client->id = max1619_id++; data->valid =0 ;init_MUTEX (&data->update_lock);
drivers/i2c/chips/pcf8574.c +0 -4
@@ -77,8 +77,6 @@ .detach_client = pcf8574_detach_client, }; -static int pcf8574_id; -/* following are the sysfs callback functions */ static ssize_t show_read (struct device *dev,char *buf) {
@@ -159,8 +157,6 @@/* Fill in the remaining client fields and put it into the global list */ strlcpy (new_client->name, client_name,I2C_NAME_SIZE ); - - new_client->id = pcf8574_id++;init_MUTEX (&data->update_lock);/* Tell the I2C layer a new client has arrived */
drivers/i2c/chips/pcf8591.c +0 -4
@@ -98,8 +98,6 @@ .detach_client = pcf8591_detach_client, }; -static int pcf8591_id; -/* following are the sysfs callback functions */ #define show_in_channel (channel) \ static ssize_t show_in##channel##_input(struct device *dev, char *buf) \
@@ -201,8 +199,6 @@/* Fill in the remaining client fields and put it into the global list */ strlcpy (new_client->name,"pcf8591" ,I2C_NAME_SIZE ); - - new_client->id = pcf8591_id++;init_MUTEX (&data->update_lock);/* Tell the I2C layer a new client has arrived */
drivers/i2c/chips/rtc8564.c +0 -2
@@ -163,14 +163,12 @@strlcpy (new_client->name,"RTC8564" ,I2C_NAME_SIZE );i2c_set_clientdata (new_client, d); - new_client->id = rtc8564_driver.id; new_client->flags =I2C_CLIENT_ALLOW_USE |I2C_DF_NOTIFY ; new_client->addr = addr; new_client->adapter = adap; new_client->driver = &rtc8564_driver;_DBG (1 ,"client=%p" , new_client); -_DBG (1 ,"client.id=%d" , new_client->id);/* init ctrl1 reg */ data[0 ] =0 ;
drivers/i2c/chips/smsc47m1.c +0 -5
@@ -108,7 +108,6 @@struct smsc47m1_data {struct i2c_client client;struct semaphore lock; -int sysctl_id;struct semaphore update_lock;unsigned long last_updated;/* In jiffies */
@@ -133,8 +132,6 @@ int init); -static int smsc47m1_id; -static struct i2c_driver smsc47m1_driver = { .owner =THIS_MODULE , .name ="smsc47m1" ,
@@ -420,8 +417,6 @@ new_client->flags =0 ;strlcpy (new_client->name,"smsc47m1" ,I2C_NAME_SIZE ); - - new_client->id = smsc47m1_id++;init_MUTEX (&data->update_lock);/* If no function is properly configured, there's no point in
drivers/i2c/chips/w83l785ts.c +0 -7
@@ -114,12 +114,6 @@ };/* -* Internal variables -*/ - -static int w83l785ts_id =0 ; - -/* * Sysfs stuff */
@@ -229,7 +223,6 @@/* We can fill in the remaining client fields. */ strlcpy (new_client->name,"w83l785ts" ,I2C_NAME_SIZE ); - new_client->id = w83l785ts_id++; data->valid =0 ;init_MUTEX (&data->update_lock);
PATCH 1/1 I2C: Kill i2c_client.id (2/5)
ChangeSet 1.2084, 2005/03/02 11:52:15-08:00, [email protected]
[PATCH] I2C: Kill i2c_client.id (2/5)
(2/5) Stop using i2c_client.id in media/video drivers.
Affected drivers:
* adv7170
* adv7175
* bt819
* bt856
* bttv
* cx88
* ovcamchip
* saa5246a
* saa5249
* saa7110
* saa7111
* saa7114
* saa7134
* saa7185
* tda7432
* tda9840
* tda9875
* tea6415c
* tea6420
* tuner-3036
* vpx3220
Most drivers here would include the id as part of their i2c client name (e.g. adv7170[0]). This looks more like an habit than something really needed, so I replaced the various printf by strlcpy, which should be slightly faster. As said earlier, clients can be differenciated thanks to their bus id and address if needed, so I don't think that including this information in the client name is wise anyway.
Other drivers would either set the id to -1 or to a unique value but then never use it. These drivers are unaffected by the changes.
drivers/media/video/adv7170.c | 5 +---- drivers/media/video/adv7175.c | 5 +---- drivers/media/video/bt819.c | 11 +++-------- drivers/media/video/bt856.c | 5 +---- drivers/media/video/bttv-i2c.c | 1 - drivers/media/video/cx88/cx88-i2c.c | 1 - drivers/media/video/ovcamchip/ovcamchip_core.c | 1 - drivers/media/video/saa5246a.c | 1 - drivers/media/video/saa5249.c | 1 - drivers/media/video/saa7110.c | 5 +---- drivers/media/video/saa7111.c | 5 +---- drivers/media/video/saa7114.c | 5 +---- drivers/media/video/saa7134/saa7134-i2c.c | 1 - drivers/media/video/saa7185.c | 5 +---- drivers/media/video/tda7432.c | 1 - drivers/media/video/tda9840.c | 4 ---- drivers/media/video/tda9875.c | 1 - drivers/media/video/tea6415c.c | 4 ---- drivers/media/video/tea6420.c | 4 ---- drivers/media/video/tuner-3036.c | 1 - drivers/media/video/vpx3220.c | 19 ++++++++----------- 21 files changed, 18 insertions(+), 68 deletions(-)
drivers/media/video/adv7170.c +1 -4
@@ -402,7 +402,6 @@ .force = force }; -static int adv7170_i2c_id =0 ;static struct i2c_driver i2c_driver_adv7170; static int
@@ -432,7 +431,6 @@ client->adapter = adapter; client->driver = &i2c_driver_adv7170; client->flags =I2C_CLIENT_ALLOW_USE ; - client->id = adv7170_i2c_id++;if ((client->addr ==I2C_ADV7170 >>1 ) || (client->addr == (I2C_ADV7170 >>1 ) +1 )) { dname = adv7170_name;
@@ -444,8 +442,7 @@kfree (client);return 0 ; } -snprintf (I2C_NAME (client),sizeof (I2C_NAME (client)) -1 , -"%s[%d]" , dname, client->id); +strlcpy (I2C_NAME (client), dname,sizeof (I2C_NAME (client))); encoder =kmalloc (sizeof (struct adv7170 ),GFP_KERNEL );if (encoder ==NULL ) {
drivers/media/video/adv7175.c +1 -4
@@ -452,7 +452,6 @@ .force = force }; -static int adv7175_i2c_id =0 ;static struct i2c_driver i2c_driver_adv7175; static int
@@ -482,7 +481,6 @@ client->adapter = adapter; client->driver = &i2c_driver_adv7175; client->flags =I2C_CLIENT_ALLOW_USE ; - client->id = adv7175_i2c_id++;if ((client->addr ==I2C_ADV7175 >>1 ) || (client->addr == (I2C_ADV7175 >>1 ) +1 )) { dname = adv7175_name;
@@ -494,8 +492,7 @@kfree (client);return 0 ; } -snprintf (I2C_NAME (client),sizeof (I2C_NAME (client)) -1 , -"%s[%d]" , dname, client->id); +strlcpy (I2C_NAME (client), dname,sizeof (I2C_NAME (client))); encoder =kmalloc (sizeof (struct adv7175 ),GFP_KERNEL );if (encoder ==NULL ) {
drivers/media/video/bt819.c +3 -8
@@ -517,7 +517,6 @@ .force = force }; -static int bt819_i2c_id =0 ;static struct i2c_driver i2c_driver_bt819; static int
@@ -546,7 +545,6 @@ client->adapter = adapter; client->driver = &i2c_driver_bt819; client->flags =I2C_CLIENT_ALLOW_USE ; - client->id = bt819_i2c_id++; decoder =kmalloc (sizeof (struct bt819 ),GFP_KERNEL );if (decoder ==NULL ) {
@@ -568,16 +566,13 @@ id =bt819_read (client,0x17 );switch (id &0xf0 ) {case 0x70 : -snprintf (I2C_NAME (client),sizeof (I2C_NAME (client)) -1 , -"bt819a[%d]" , client->id); +strlcpy (I2C_NAME (client),"bt819a" ,sizeof (I2C_NAME (client)));break ;case 0x60 : -snprintf (I2C_NAME (client),sizeof (I2C_NAME (client)) -1 , -"bt817a[%d]" , client->id); +strlcpy (I2C_NAME (client),"bt817a" ,sizeof (I2C_NAME (client)));break ;case 0x20 : -snprintf (I2C_NAME (client),sizeof (I2C_NAME (client)) -1 , -"bt815a[%d]" , client->id); +strlcpy (I2C_NAME (client),"bt815a" ,sizeof (I2C_NAME (client)));break ;default : dprintk(1,
drivers/media/video/bt856.c +1 -4
@@ -306,7 +306,6 @@ .force = force }; -static int bt856_i2c_id =0 ;static struct i2c_driver i2c_driver_bt856; static int
@@ -335,9 +334,7 @@ client->adapter = adapter; client->driver = &i2c_driver_bt856; client->flags =I2C_CLIENT_ALLOW_USE ; - client->id = bt856_i2c_id++; -snprintf (I2C_NAME (client),sizeof (I2C_NAME (client)) -1 , -"bt856[%d]" , client->id); +strlcpy (I2C_NAME (client),"bt856" ,sizeof (I2C_NAME (client))); encoder =kmalloc (sizeof (struct bt856 ),GFP_KERNEL );if (encoder ==NULL ) {
drivers/media/video/bttv-i2c.c +0 -1
@@ -330,7 +330,6 @@static struct i2c_client bttv_i2c_client_template = {I2C_DEVNAME ("bttv internal" ), - .id =-1 , };
drivers/media/video/cx88/cx88-i2c.c +0 -1
@@ -141,7 +141,6 @@static struct i2c_client cx8800_i2c_client_template = {I2C_DEVNAME ("cx88xx internal" ), - .id =-1 , };static char *i2c_devs[128 ] = {
drivers/media/video/ovcamchip/ovcamchip_core.c +0 -1
@@ -422,7 +422,6 @@static struct i2c_client client_template = {I2C_DEVNAME ("(unset)" ), - .id =-1 , .driver = &driver, };
drivers/media/video/saa5246a.c +0 -1
@@ -185,7 +185,6 @@ };static struct i2c_client client_template = { - .id =-1 , .driver = &i2c_driver_videotext, .name ="(unset)" , };
drivers/media/video/saa5249.c +0 -1
@@ -258,7 +258,6 @@ };static struct i2c_client client_template = { - .id =-1 , .driver = &i2c_driver_videotext, .name ="(unset)" , };
drivers/media/video/saa7110.c +1 -4
@@ -476,7 +476,6 @@ .force = force }; -static int saa7110_i2c_id =0 ;static struct i2c_driver i2c_driver_saa7110; static int
@@ -507,9 +506,7 @@ client->adapter = adapter; client->driver = &i2c_driver_saa7110; client->flags =I2C_CLIENT_ALLOW_USE ; - client->id = saa7110_i2c_id++; -snprintf (I2C_NAME (client),sizeof (I2C_NAME (client)) -1 , -"saa7110[%d]" , client->id); +strlcpy (I2C_NAME (client),"saa7110" ,sizeof (I2C_NAME (client))); decoder =kmalloc (sizeof (struct saa7110 ),GFP_KERNEL );if (decoder ==0 ) {
drivers/media/video/saa7111.c +1 -4
@@ -500,7 +500,6 @@ .force = force }; -static int saa7111_i2c_id =0 ;static struct i2c_driver i2c_driver_saa7111; static int
@@ -530,9 +529,7 @@ client->adapter = adapter; client->driver = &i2c_driver_saa7111; client->flags =I2C_CLIENT_ALLOW_USE ; - client->id = saa7111_i2c_id++; -snprintf (I2C_NAME (client),sizeof (I2C_NAME (client)) -1 , -"saa7111[%d]" , client->id); +strlcpy (I2C_NAME (client),"saa7111" ,sizeof (I2C_NAME (client))); decoder =kmalloc (sizeof (struct saa7111 ),GFP_KERNEL );if (decoder ==NULL ) {
drivers/media/video/saa7114.c +1 -4
@@ -838,7 +838,6 @@ .force = force }; -static int saa7114_i2c_id =0 ;static struct i2c_driver i2c_driver_saa7114; static int
@@ -871,9 +870,7 @@ client->adapter = adapter; client->driver = &i2c_driver_saa7114; client->flags =I2C_CLIENT_ALLOW_USE ; - client->id = saa7114_i2c_id++; -snprintf (I2C_NAME (client),sizeof (I2C_NAME (client)) -1 , -"saa7114[%d]" , client->id); +strlcpy (I2C_NAME (client),"saa7114" ,sizeof (I2C_NAME (client))); decoder =kmalloc (sizeof (struct saa7114 ),GFP_KERNEL );if (decoder ==NULL ) {
drivers/media/video/saa7134/saa7134-i2c.c +0 -1
@@ -362,7 +362,6 @@static struct i2c_client saa7134_client_template = {I2C_DEVNAME ("saa7134 internal" ), - .id =-1 , };/* ----------------------------------------------------------- */
drivers/media/video/saa7185.c +1 -4
@@ -398,7 +398,6 @@ .force = force }; -static int saa7185_i2c_id =0 ;static struct i2c_driver i2c_driver_saa7185; static int
@@ -427,9 +426,7 @@ client->adapter = adapter; client->driver = &i2c_driver_saa7185; client->flags =I2C_CLIENT_ALLOW_USE ; - client->id = saa7185_i2c_id++; -snprintf (I2C_NAME (client),sizeof (I2C_NAME (client)) -1 , -"saa7185[%d]" , client->id); +strlcpy (I2C_NAME (client),"saa7185" ,sizeof (I2C_NAME (client))); encoder =kmalloc (sizeof (struct saa7185 ),GFP_KERNEL );if (encoder ==NULL ) {
drivers/media/video/tda7432.c +0 -1
@@ -528,7 +528,6 @@static struct i2c_client client_template = {I2C_DEVNAME ("tda7432" ), - .id =-1 , .driver = &driver, };
drivers/media/video/tda9840.c +0 -4
@@ -51,9 +51,6 @@static struct i2c_driver driver;static struct i2c_client client_template; -/* unique ID allocation */ -static int tda9840_id =0 ; -static int command (struct i2c_client *client,unsigned int cmd,void *arg) {int result;
@@ -179,7 +176,6 @@/* fill client structure */ memcpy (client, &client_template,sizeof (struct i2c_client )); - client->id = tda9840_id++; client->addr = address; client->adapter = adapter;
drivers/media/video/tda9875.c +0 -1
@@ -399,7 +399,6 @@static struct i2c_client client_template = {I2C_DEVNAME ("tda9875" ), - .id =-1 , .driver = &driver, };
drivers/media/video/tea6415c.c +0 -4
@@ -51,9 +51,6 @@static struct i2c_driver driver;static struct i2c_client client_template; -/* unique ID allocation */ -static int tea6415c_id =0 ; -/* this function is called by i2c_probe */ static int detect (struct i2c_adapter *adapter,int address,int kind) {
@@ -73,7 +70,6 @@/* fill client structure */ memcpy (client, &client_template,sizeof (struct i2c_client )); - client->id = tea6415c_id++; client->addr = address; client->adapter = adapter;
drivers/media/video/tea6420.c +0 -4
@@ -48,9 +48,6 @@static struct i2c_driver driver;static struct i2c_client client_template; -/* unique ID allocation */ -static int tea6420_id =0 ; -/* make a connection between the input 'i' and the output 'o' with gain 'g' for the tea6420-client 'client' (note: i = 6 means 'mute') */ static int tea6420_switch (struct i2c_client *client,int i,int o,int g)
@@ -111,7 +108,6 @@/* fill client structure */ memcpy (client, &client_template,sizeof (struct i2c_client )); - client->id = tea6420_id++; client->addr = address; client->adapter = adapter;
drivers/media/video/tuner-3036.c +0 -1
@@ -192,7 +192,6 @@static struct i2c_client client_template = { - .id =-1 , .driver = &i2c_driver_tuner, .name ="SAB3036" , };
drivers/media/video/vpx3220.c +8 -11
@@ -587,7 +587,6 @@ .force = force }; -static int vpx3220_i2c_id =0 ;static struct i2c_driver vpx3220_i2c_driver; static int
@@ -634,7 +633,6 @@ client->adapter = adapter; client->driver = &vpx3220_i2c_driver; client->flags =I2C_CLIENT_ALLOW_USE ; - client->id = vpx3220_i2c_id++;/* Check for manufacture ID and part number */ if (kind <0 ) {
@@ -655,16 +653,16 @@vpx3220_read (client,0x01 );switch (pn) {case 0x4680 : -snprintf (I2C_NAME (client),sizeof (I2C_NAME (client)) -1 , -"vpx3220a[%d]" , client->id); +strlcpy (I2C_NAME (client),"vpx3220a" , +sizeof (I2C_NAME (client)));break ;case 0x4260 : -snprintf (I2C_NAME (client),sizeof (I2C_NAME (client)) -1 , -"vpx3216b[%d]" , client->id); +strlcpy (I2C_NAME (client),"vpx3216b" , +sizeof (I2C_NAME (client)));break ;case 0x4280 : -snprintf (I2C_NAME (client),sizeof (I2C_NAME (client)) -1 , -"vpx3214c[%d]" , client->id); +strlcpy (I2C_NAME (client),"vpx3214c" , +sizeof (I2C_NAME (client)));break ;default : dprintk(1,
@@ -675,9 +673,8 @@return 0 ; } }else { -snprintf (I2C_NAME (client),sizeof (I2C_NAME (client)) -1 , -"forced vpx32xx[%d]" , - client->id); +strlcpy (I2C_NAME (client),"forced vpx32xx" , +sizeof (I2C_NAME (client))); } decoder =kmalloc (sizeof (struct vpx3220 ),GFP_KERNEL );
PATCH 1/1 I2C: Kill i2c_client.id (3/5)
ChangeSet 1.2085, 2005/03/02 11:52:31-08:00, [email protected]
[PATCH] I2C: Kill i2c_client.id (3/5)
(3/5) Stop using i2c_client.id in misc drivers.
Affected drivers:
* acorn/char/pcf8583
* acorn/char/i2c
* i2c/i2c-dev
* macintosh/therm_windtunnel
* sound/oss/dmasound/dac3550a
* sound/ppc/keywest
The Acorn pcf8583 driver would give the i2c_client id the same value as the i2c_driver id, and later test that client id (in i2c). I changed it to test the client's driver id instead. The result is the same and the client id is then useless and can be removed.
All other drivers here would allocate the client id to some value and then never use it. They are unaffected by the change.
drivers/acorn/char/i2c.c | 2 +- drivers/acorn/char/pcf8583.c | 1 - drivers/i2c/i2c-dev.c | 1 - drivers/macintosh/therm_windtunnel.c | 4 ---- sound/oss/dmasound/dac3550a.c | 4 ---- sound/ppc/keywest.c | 2 -- 6 files changed, 1 insertion(+), 13 deletions(-)
drivers/acorn/char/i2c.c +1 -1
@@ -313,7 +313,7 @@static int ioc_client_reg (struct i2c_client *client) { -if (client->id ==I2C_DRIVERID_PCF8583 && +if (client->driver->id ==I2C_DRIVERID_PCF8583 && client->addr ==0x50 ) {struct rtc_tm rtctm;unsigned int year;
drivers/acorn/char/pcf8583.c +0 -1
@@ -51,7 +51,6 @@return -ENOMEM ;memset (c,0 ,sizeof (*c)); - c->id = pcf8583_driver.id; c->addr = addr; c->adapter = adap; c->driver = &pcf8583_driver;
drivers/i2c/i2c-dev.c +0 -1
@@ -507,7 +507,6 @@static struct i2c_client i2cdev_client_template = { .name ="I2C /dev entry" , - .id =1 , .addr =-1 , .driver = &i2cdev_driver, };
drivers/macintosh/therm_windtunnel.c +0 -4
@@ -47,8 +47,6 @@#define LOG_TEMP 0/* continously log temperature */ #define I2C_DRIVERID_G4FAN 0x9001/* fixme */ -#define THERMOSTAT_CLIENT_ID 1 -#define FAN_CLIENT_ID 2static int do_probe (struct i2c_adapter *adapter,int addr,int kind);
@@ -372,7 +370,6 @@ goto out;printk ("ADM1030 fan controller [@%02x]\n" , cl->addr ); - cl->id =FAN_CLIENT_ID ;strlcpy ( cl->name,"ADM1030 fan controller" ,sizeof (cl->name) );if ( !i2c_attach_client (cl) )
@@ -412,7 +409,6 @@ x.overheat_temp = os_temp; x.overheat_hyst = hyst_temp; - cl->id =THERMOSTAT_CLIENT_ID ;strlcpy ( cl->name,"DS1775 thermostat" ,sizeof (cl->name) );if ( !i2c_attach_client (cl) )
sound/oss/dmasound/dac3550a.c +0 -4
@@ -40,9 +40,6 @@static int daca_detect_client (struct i2c_adapter *adapter,int address);static int daca_detach_client (struct i2c_client *client); -/* Unique ID allocation */ -static int daca_id; -struct i2c_driver daca_driver = { .owner =THIS_MODULE , .name ="DAC3550A driver V " DACA_VERSION ,
@@ -176,7 +173,6 @@ new_client->driver = &daca_driver; new_client->flags =0 ;strcpy (new_client->name, client_name); - new_client->id = daca_id++;/* racy... */ if (daca_init_client (new_client)) goto bail;
sound/ppc/keywest.c +0 -2
@@ -76,8 +76,6 @@ new_client->flags =0 ;strcpy (i2c_device_name (new_client), keywest_ctx->name); - - new_client->id = keywest_ctx->id++;/* Automatically unique */ keywest_ctx->client = new_client;/* Tell the i2c layer a new client has arrived */
PATCH 1/1 I2C: Kill i2c_client.id (4/5)
ChangeSet 1.2086, 2005/03/02 11:52:48-08:00, [email protected]
[PATCH] I2C: Kill i2c_client.id (4/5)
Quoted 1 line
(4/5) Deprecate i2c_client.id.
Now that i2c_client.id has no more users in the kernel (none that I could find at least) we could remove that struct member. I however think that it's better to only deprecate it at the moment, in case I missed users or any of the other patches are delayed for some reason. We could then delete the id member definitely in a month or so.
include/linux/i2c.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
include/linux/i2c.h +1 -1
@@ -144,7 +144,7 @@* function is mainly used for lookup & other admin. functions. */ struct i2c_client { -int id; + __attribute__ ((deprecated))int id;unsigned int flags;/* div., see below */ unsigned int addr;/* chip address - NOTE: 7bit */ /* addresses are stored in the */
PATCH 1/1 I2C: Kill i2c_client.id (5/5)
ChangeSet 1.2087, 2005/03/02 11:58:29-08:00, [email protected]
[PATCH] I2C: Kill i2c_client.id (5/5)
Quoted 1 line
(5/5) Documentation update.
Finally, updates are required to the i2c/writing-client and i2c/porting-client documents. Remove any reference to i2c_client id and invite porters to discard that struct member.
Documentation/i2c/porting-clients | 6 +++--- Documentation/i2c/writing-clients | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-)
Documentation/i2c/porting-clients +3 -3
@@ -49,9 +49,8 @@ static void lm75_update_client(struct i2c_client *client); * [Sysctl] All sysctl stuff is of course gone (defines, ctl_table - and functions). Instead, right after the static id definition - line, you have to define show and set functions for each sysfs - file. Only define set for writable values. Take a look at an + and functions). Instead, you have to define show and set functions for + each sysfs file. Only define set for writable values. Take a look at an existing 2.6 driver for details (lm78 for example). Don't forget to define the attributes for each file (this is that step that links callback functions). Use the file names specified in
@@ -86,6 +85,7 @@ Replace the sysctl directory registration by calls to device_create_file. Move the driver initialization before any sysfs file creation. + Drop client->id. * [Init] Limits must not be set by the driver (can be done later in user-space). Chip should not be reset default (although a module
Documentation/i2c/writing-clients +0 -4
@@ -344,9 +344,6 @@ For now, you can ignore the `flags' parameter. It is there for future use. - /* Unique ID allocation */ - static int foo_id = 0; - int foo_detect_client(struct i2c_adapter *adapter, int address, unsigned short flags, int kind) {
@@ -482,7 +479,6 @@ data->type = kind; /* SENSORS ONLY END */ - new_client->id = foo_id++; /* Automatically unique */ data->valid = 0; /* Only if you use this field */ init_MUTEX(&data->update_lock); /* Only if you use this field */
PATCH 1/1 I2C: just delete the id field, let's not delay it any longer
ChangeSet 1.2088, 2005/03/02 11:58:47-08:00, [email protected]
[PATCH] I2C: just delete the id field, let's not delay it any longer
Becides, sparse keeps complaining when it sees this attribute within a structure...
include/linux/i2c.h | 1 - 1 files changed, 1 deletion(-)
include/linux/i2c.h +0 -1
@@ -144,7 +144,6 @@* function is mainly used for lookup & other admin. functions. */ struct i2c_client { - __attribute__ ((deprecated))int id;unsigned int flags;/* div., see below */ unsigned int addr;/* chip address - NOTE: 7bit */ /* addresses are stored in the */
PATCH 1/1 I2C: fix for fscpos voltage values
ChangeSet 1.2089, 2005/03/02 11:59:41-08:00, [email protected]
[PATCH] I2C: fix for fscpos voltage values
Multiplied the voltage multipliers by 10 in order to comply with the sysfs guidelines.
drivers/i2c/chips/fscpos.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/i2c/chips/fscpos.c +3 -3
@@ -244,19 +244,19 @@static ssize_t show_volt_12 (struct device *dev,char *buf) {struct fscpos_data *data =fscpos_update_device (dev); -return sprintf (buf,"%u\n" ,VOLT_FROM_REG (data->volt[0 ],1420 )); +return sprintf (buf,"%u\n" ,VOLT_FROM_REG (data->volt[0 ],14200 )); }static ssize_t show_volt_5 (struct device *dev,char *buf) {struct fscpos_data *data =fscpos_update_device (dev); -return sprintf (buf,"%u\n" ,VOLT_FROM_REG (data->volt[1 ],660 )); +return sprintf (buf,"%u\n" ,VOLT_FROM_REG (data->volt[1 ],6600 )); }static ssize_t show_volt_batt (struct device *dev,char *buf) {struct fscpos_data *data =fscpos_update_device (dev); -return sprintf (buf,"%u\n" ,VOLT_FROM_REG (data->volt[2 ],330 )); +return sprintf (buf,"%u\n" ,VOLT_FROM_REG (data->volt[2 ],3300 )); }/* Watchdog */
PATCH 1/1 I2C: i2c-dev namespace cleanup
ChangeSet 1.2090, 2005/03/02 12:04:12-08:00, [email protected]
[PATCH] I2C: i2c-dev namespace cleanup
This patch is namespace cleanup for the i2c-dev module. Please apply.
Signed-off-by Mark M. Hoffman <[email protected]>
drivers/i2c/i2c-dev.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/i2c/i2c-dev.c +4 -4
@@ -55,7 +55,7 @@static struct i2c_dev *i2c_dev_array[I2C_MINORS ];static DEFINE_SPINLOCK (i2c_dev_array_lock); -struct i2c_dev *i2c_dev_get_by_minor (unsigned index) +static struct i2c_dev *i2c_dev_get_by_minor (unsigned index) {struct i2c_dev *i2c_dev;
@@ -65,7 +65,7 @@return i2c_dev; } -struct i2c_dev *i2c_dev_get_by_adapter (struct i2c_adapter *adap) +static struct i2c_dev *i2c_dev_get_by_adapter (struct i2c_adapter *adap) {struct i2c_dev *i2c_dev =NULL ;
@@ -173,8 +173,8 @@return ret; } -int i2cdev_ioctl (struct inode *inode,struct file *file,unsigned int cmd, -unsigned long arg) +static int i2cdev_ioctl (struct inode *inode,struct file *file, +unsigned int cmd,unsigned long arg) {struct i2c_client *client = (struct i2c_client *)file->private_data;struct i2c_rdwr_ioctl_data rdwr_arg;
PATCH 1/1 I2C: lm78 driver improvement
ChangeSet 1.2091, 2005/03/02 12:04:28-08:00, [email protected]
[PATCH] I2C: lm78 driver improvement
The following patch against kernel 2.6.11-rc2-mm1 improves the lm78 driver. I used it as a model to port the sis5595 driver to the 2.6 kernel, and I then applied the changes suggested by Jean Delvare on the sis5595 driver to this one.
drivers/i2c/chips/lm78.c | 53 +++++++++++++++++++++-------------------------- 1 files changed, 24 insertions(+), 29 deletions(-)
drivers/i2c/chips/lm78.c +24 -29
@@ -81,9 +81,8 @@static inline u8 FAN_TO_REG (long rpm,int div) { -if (rpm ==0 ) +if (rpm <=0 )return 255 ; - rpm =SENSORS_LIMIT (rpm,1 ,1000000 );return SENSORS_LIMIT ((1350000 + rpm * div /2 ) / (rpm * div),1 ,254 ); }
@@ -94,15 +93,15 @@/* TEMP: mC (-128C to +127C) REG: 1C/bit, two's complement */ -static inline u8 TEMP_TO_REG (int val) +static inline s8 TEMP_TO_REG (int val) {int nval =SENSORS_LIMIT (val,-128000 ,127000 ) ; -return nval<0 ? (nval-500 )/1000 +0x100 : (nval+500 )/1000 ; +return nval<0 ? (nval-500 )/1000 : (nval+500 )/1000 ; } -static inline int TEMP_FROM_REG (u8 val) +static inline int TEMP_FROM_REG (s8 val) { -return (val>=0x80 ? val-0x100 : val) *1000 ; +return val *1000 ; }/* VID: mV
@@ -112,16 +111,6 @@return val==0x1f ?0 : val>=0x10 ?5100 -val*100 :2050 -val*50 ; } -/* ALARMS: chip-specific bitmask -REG: (same) */ -#define ALARMS_FROM_REG (val) (val) - -/* FAN DIV: 1, 2, 4, or 8 (defaults to 2) -REG: 0, 1, 2, or 3 (respectively) (defaults to 1) */ -static inline u8 DIV_TO_REG (int val) -{ -return val==8 ?3 : val==4 ?2 : val==1 ?0 :1 ; -}#define DIV_FROM_REG (val) (1 << (val))/* There are some complications in a module like this. First off, LM78 chips
@@ -157,9 +146,9 @@u8 in_min[7 ];/* Register value */ u8 fan[3 ];/* Register value */ u8 fan_min[3 ];/* Register value */ -u8 temp;/* Register value */ -u8 temp_over;/* Register value */ -u8 temp_hyst;/* Register value */ +s8 temp;/* Register value */ +s8 temp_over;/* Register value */ +s8 temp_hyst;/* Register value */ u8 fan_div[3 ];/* Register encoding, shifted right */ u8 vid;/* Register encoding, combined */ u16 alarms;/* Register encoding, combined */
@@ -357,7 +346,17 @@ DIV_FROM_REG(data->fan_div[nr]));unsigned long val =simple_strtoul (buf,NULL ,10 );int reg =lm78_read_value (client,LM78_REG_VID_FANDIV ); - data->fan_div[nr] =DIV_TO_REG (val); +switch (val) { +case 1 : data->fan_div[nr] =0 ;break ; +case 2 : data->fan_div[nr] =1 ;break ; +case 4 : data->fan_div[nr] =2 ;break ; +case 8 : data->fan_div[nr] =3 ;break ; +default : +dev_err (&client->dev,"fan_div value %ld not " +"supported. Choose one of 1, 2, 4 or 8!\n" , val); +return -EINVAL ; + } +switch (nr) {case 0 : reg = (reg &0xcf ) | (data->fan_div[nr] <<4 );
@@ -430,7 +429,7 @@static ssize_t show_alarms (struct device *dev,char *buf) {struct lm78_data *data =lm78_update_device (dev); -return sprintf (buf,"%d\n" ,ALARMS_FROM_REG (data->alarms)); +return sprintf (buf,"%u\n" , data->alarms); } static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL);
@@ -633,17 +632,15 @@ {int err; -/* release ISA region first */ -if (i2c_is_isa_client (client)) -release_region (client->addr,LM78_EXTENT ); - -/* now it's safe to scrap the rest */ if ((err =i2c_detach_client (client))) {dev_err (&client->dev,"Client deregistration failed, client not detached.\n" );return err; } +if (i2c_is_isa_client (client)) +release_region (client->addr,LM78_EXTENT ); +kfree (i2c_get_clientdata (client));return 0 ;
@@ -653,9 +650,7 @@We don't want to lock the whole ISA bus, so we lock each client separately. We ignore the LM78 BUSY flag at this moment - it could lead to deadlocks, -would slow down the LM78 access and should not be necessary. -There are some ugly typecasts here, but the good new is - they should -nowhere else be necessary! */ +would slow down the LM78 access and should not be necessary. */ static int lm78_read_value (struct i2c_client *client,u8 reg) {int res;
PATCH 1/1 I2C: Enable w83781d and w83627hf temperature channels
ChangeSet 1.2092, 2005/03/02 12:09:28-08:00, [email protected]
[PATCH] I2C: Enable w83781d and w83627hf temperature channels
The chips supported by the w83781d and w83627hf drivers might come up with their temperature channels disabled. Currently, the w83781d driver does so for temp3 but omits temp2, while the w83627hf driver omits both. The following patch fixes that, and prints warning messages when the driver has to enable the channels (normally the BIOS should do it for us). We also skip this initialization step for the AS99127F chips, for which we have no documentation.
This should hopefully solve the problem reported here:
http://archives.andrew.net.au/lm-sensors/msg29150.html
drivers/i2c/chips/w83627hf.c | 21 +++++++++++++++++++++ drivers/i2c/chips/w83781d.c | 23 ++++++++++++++++++++--- 2 files changed, 41 insertions(+), 3 deletions(-)
drivers/i2c/chips/w83627hf.c +21 -0
@@ -1321,6 +1321,27 @@ data->pwmenable[2 ] =1 ;if (init) { +/* Enable temp2 */ + tmp =w83627hf_read_value (client,W83781D_REG_TEMP2_CONFIG ); +if (tmp &0x01 ) { +dev_warn (&client->dev,"Enabling temp2, readings " +"might not make sense\n" ); +w83627hf_write_value (client,W83781D_REG_TEMP2_CONFIG , + tmp &0xfe ); + } + +/* Enable temp3 */ +if (type != w83697hf) { + tmp =w83627hf_read_value (client, +W83781D_REG_TEMP3_CONFIG ); +if (tmp &0x01 ) { +dev_warn (&client->dev,"Enabling temp3, " +"readings might not make sense\n" ); +w83627hf_write_value (client, +W83781D_REG_TEMP3_CONFIG , tmp &0xfe ); + } + } +if (type == w83627hf) {/* enable PWM2 control (can't hurt since PWM reg should have been reset to 0xff) */
drivers/i2c/chips/w83781d.c +20 -3
@@ -1562,11 +1562,28 @@ }#endif /* W83781D_RT */ -if (init) { +if (init && type != as99127f) { +/* Enable temp2 */ + tmp =w83781d_read_value (client,W83781D_REG_TEMP2_CONFIG ); +if (tmp &0x01 ) { +dev_warn (&client->dev,"Enabling temp2, readings " +"might not make sense\n" ); +w83781d_write_value (client,W83781D_REG_TEMP2_CONFIG , + tmp &0xfe ); + } + +/* Enable temp3 */ if (type != w83783s && type != w83697hf) { -w83781d_write_value (client,W83781D_REG_TEMP3_CONFIG , -0x00 ); + tmp =w83781d_read_value (client, +W83781D_REG_TEMP3_CONFIG ); +if (tmp &0x01 ) { +dev_warn (&client->dev,"Enabling temp3, " +"readings might not make sense\n" ); +w83781d_write_value (client, +W83781D_REG_TEMP3_CONFIG , tmp &0xfe ); + } } +if (type != w83781d) {/* enable comparator mode for temp2 and temp3 so alarm indication will work correctly */
PATCH 1/1 I2C: Kill unused includes in i2c-sensor-detect.c
ChangeSet 1.2093, 2005/03/02 12:09:45-08:00, [email protected]
[PATCH] I2C: Kill unused includes in i2c-sensor-detect.c
Looks to me like i2c-sensor-detect.c includes a handful of headers it doesn't need at all. This patch removes them.
drivers/i2c/i2c-sensor-detect.c | 7 ------- 1 files changed, 7 deletions(-)
drivers/i2c/i2c-sensor-detect.c +0 -7
@@ -19,17 +19,10 @@Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <linux/config.h> #include <linux/module.h> #include <linux/kernel.h> -#include <linux/slab.h> -#include <linux/ctype.h> -#include <linux/sysctl.h> -#include <linux/init.h> -#include <linux/ioport.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h> -#include <asm/uaccess.h> static unsigned short empty[] = {I2C_CLIENT_END };static unsigned int empty_isa[] = {I2C_CLIENT_ISA_END };
PATCH 1/1 I2C: unnecessary #includes in asb100.c
ChangeSet 1.2094, 2005/03/02 12:10:01-08:00, [email protected]
[PATCH] I2C: unnecessary #includes in asb100.c
Quoted 5 lines · Jean Delvare
Any reson why
asb100.c(in linux 2.6.11-rc2) includeslinux/ioport.handasm/io.h? As an i2c-only chip driver, I don't think it needs these.As a side note, I also wonder what the inclusions of
linux/config.h,linux/types.handasm/errno.hare there for.
Because they look pretty? Here's a patch Greg, please apply...
drivers/i2c/chips/asb100.c | 5 ----- 1 files changed, 5 deletions(-)
drivers/i2c/chips/asb100.c +0 -5
@@ -36,17 +36,12 @@asb100 7 3 1 4 0x31 0x0694 yes no */ -#include <linux/config.h> #include <linux/module.h> #include <linux/slab.h> -#include <linux/ioport.h> -#include <linux/types.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h> #include <linux/i2c-vid.h> #include <linux/init.h> -#include <asm/errno.h> -#include <asm/io.h> #include "lm75.h" /*
PATCH 1/1 I2C: lm80 driver improvement
ChangeSet 1.2095, 2005/03/02 12:10:18-08:00, [email protected]
[PATCH] I2C: lm80 driver improvement
Description: Cleanup some cluttered macros, add error checking for fan divisor value set.
drivers/i2c/chips/lm80.c | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-)
drivers/i2c/chips/lm80.c +12 -5
@@ -99,10 +99,7 @@#define TEMP_LIMIT_TO_REG (val) SENSORS_LIMIT((val)<0?\ ((val)-500)/1000:((val)+500)/1000,0,255) -#define ALARMS_FROM_REG (val) (val) -#define DIV_FROM_REG (val) (1 << (val)) -#define DIV_TO_REG (val) ((val)==8?3:(val)==4?2:(val)==1?0:1)/* * Client data (each client gets its own)
@@ -263,7 +260,17 @@ DIV_FROM_REG(data->fan_div[nr])); val =simple_strtoul (buf,NULL ,10 ); - data->fan_div[nr] =DIV_TO_REG (val); + +switch (val) { +case 1 : data->fan_div[nr] =0 ;break ; +case 2 : data->fan_div[nr] =1 ;break ; +case 4 : data->fan_div[nr] =2 ;break ; +case 8 : data->fan_div[nr] =3 ;break ; +default : +dev_err (&client->dev,"fan_div value %ld not " +"supported. Choose one of 1, 2, 4 or 8!\n" , val); +return -EINVAL ; + } reg = (lm80_read_value (client,LM80_REG_FANDIV ) & ~(3 << (2 * (nr +1 )))) | (data->fan_div[nr] << (2 * (nr +1 )));
@@ -321,7 +328,7 @@static ssize_t show_alarms (struct device *dev,char *buf) {struct lm80_data *data =lm80_update_device (dev); -return sprintf (buf,"%d\n" ,ALARMS_FROM_REG (data->alarms)); +return sprintf (buf,"%u\n" , data->alarms); } static DEVICE_ATTR(in0_min, S_IWUSR | S_IRUGO, show_in_min0, set_in_min0);
PATCH 1/1 i2c-core.c: make some code static
ChangeSet 1.2096, 2005/03/02 12:12:54-08:00, [email protected]
[PATCH] i2c-core.c: make some code static
This patch makes some needlessly global code static.
drivers/i2c/i2c-core.c | 79 ++++++++++++++++++++++++------------------------- include/linux/i2c.h | 2 - 2 files changed, 39 insertions(+), 42 deletions(-)
drivers/i2c/i2c-core.c +39 -40
@@ -38,12 +38,43 @@static DECLARE_MUTEX (core_lists);static DEFINE_IDR (i2c_adapter_idr); -int i2c_device_probe (struct device *dev) +/* match always succeeds, as we want the probe() to tell if we really accept this match */ +static int i2c_device_match (struct device *dev,struct device_driver *drv) +{ +return 1 ; +} + +static int i2c_bus_suspend (struct device * dev,pm_message_t state) +{ +int rc =0 ; + +if (dev->driver && dev->driver->suspend) + rc = dev->driver->suspend (dev,state,0 ); +return rc; +} + +static int i2c_bus_resume (struct device * dev) +{ +int rc =0 ; + +if (dev->driver && dev->driver->resume) + rc = dev->driver->resume (dev,0 ); +return rc; +} + +static struct bus_type i2c_bus_type = { + .name ="i2c" , + .match = i2c_device_match, + .suspend = i2c_bus_suspend, + .resume = i2c_bus_resume, +}; + +static int i2c_device_probe (struct device *dev) {return -ENODEV ; } -int i2c_device_remove (struct device *dev) +static int i2c_device_remove (struct device *dev) {return 0 ; }
@@ -523,38 +554,6 @@up (&adap->clist_lock); } - -/* match always succeeds, as we want the probe() to tell if we really accept this match */ -static int i2c_device_match (struct device *dev,struct device_driver *drv) -{ -return 1 ; -} - -static int i2c_bus_suspend (struct device * dev,u32 state) -{ -int rc =0 ; - -if (dev->driver && dev->driver->suspend) - rc = dev->driver->suspend (dev,state,0 ); -return rc; -} - -static int i2c_bus_resume (struct device * dev) -{ -int rc =0 ; - -if (dev->driver && dev->driver->resume) - rc = dev->driver->resume (dev,0 ); -return rc; -} - -struct bus_type i2c_bus_type = { - .name ="i2c" , - .match = i2c_device_match, - .suspend = i2c_bus_suspend, - .resume = i2c_bus_resume, -}; -static int __init i2c_init (void ) {int retval;
@@ -860,7 +859,7 @@/* CRC over count bytes in the first array plus the bytes in the rest array if it is non-null. rest[0] is the (length of rest) - 1 and is included. */ -u8 i2c_smbus_partial_pec (u8 crc,int count,u8 *first,u8 *rest) +static u8 i2c_smbus_partial_pec (u8 crc,int count,u8 *first,u8 *rest) {int i;
@@ -872,7 +871,7 @@return crc; } -u8 i2c_smbus_pec (int count,u8 *first,u8 *rest) +static u8 i2c_smbus_pec (int count,u8 *first,u8 *rest) {return i2c_smbus_partial_pec (0 , count, first, rest); }
@@ -880,8 +879,8 @@/* Returns new "size" (transaction type) Note that we convert byte to byte_data and byte_data to word_data rather than invent new xxx_PEC transactions. */ -int i2c_smbus_add_pec (u16 addr,u8 command,int size, -union i2c_smbus_data *data) +static int i2c_smbus_add_pec (u16 addr,u8 command,int size, +union i2c_smbus_data *data) {u8 buf[3 ];
@@ -910,8 +909,8 @@return size; } -int i2c_smbus_check_pec (u16 addr,u8 command,int size,u8 partial, -union i2c_smbus_data *data) +static int i2c_smbus_check_pec (u16 addr,u8 command,int size,u8 partial, +union i2c_smbus_data *data) {u8 buf[3 ], rpec, cpec;
include/linux/i2c.h +0 -2
@@ -134,8 +134,6 @@ };#define to_i2c_driver (d) container_of(d, struct i2c_driver, driver) -extern struct bus_type i2c_bus_type; -#define I2C_NAME_SIZE 50/*
PATCH 1/1 I2C: use time_after instead of comparing jiffies
ChangeSet 1.2097, 2005/03/02 12:16:37-08:00, [email protected]
[PATCH] I2C: use time_after instead of comparing jiffies
drivers/i2c/chips/adm1021.c | 5 +++-- drivers/i2c/chips/adm1025.c | 5 ++--- drivers/i2c/chips/adm1026.c | 7 ++++--- drivers/i2c/chips/adm1031.c | 5 +++-- drivers/i2c/chips/asb100.c | 4 ++-- drivers/i2c/chips/ds1621.c | 5 +++-- drivers/i2c/chips/eeprom.c | 4 ++-- drivers/i2c/chips/fscher.c | 4 ++-- drivers/i2c/chips/gl518sm.c | 5 +++-- drivers/i2c/chips/it87.c | 5 +++-- drivers/i2c/chips/lm63.c | 5 ++--- drivers/i2c/chips/lm75.c | 5 +++-- drivers/i2c/chips/lm77.c | 5 +++-- drivers/i2c/chips/lm78.c | 5 +++-- drivers/i2c/chips/lm80.c | 5 ++--- drivers/i2c/chips/lm83.c | 5 ++--- drivers/i2c/chips/lm85.c | 5 +++-- drivers/i2c/chips/lm87.c | 5 ++--- drivers/i2c/chips/lm90.c | 5 ++--- drivers/i2c/chips/max1619.c | 6 ++---- drivers/i2c/chips/pc87360.c | 4 ++-- drivers/i2c/chips/smsc47b397.c | 5 ++--- drivers/i2c/chips/smsc47m1.c | 4 ++-- drivers/i2c/chips/via686a.c | 6 +++--- drivers/i2c/chips/w83627hf.c | 5 +++-- drivers/i2c/chips/w83781d.c | 6 +++--- drivers/i2c/chips/w83l785ts.c | 5 ++--- 27 files changed, 68 insertions(+), 67 deletions(-)
drivers/i2c/chips/adm1021.c +3 -2
@@ -23,6 +23,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h>
@@ -369,8 +370,8 @@down (&data->update_lock); -if ((jiffies - data->last_updated >HZ +HZ /2 ) || - (jiffies < data->last_updated) || !data->valid) { +if (time_after (jiffies, data->last_updated +HZ +HZ /2 ) + || !data->valid) {dev_dbg (&client->dev,"Starting adm1021 update\n" ); data->temp_input =adm1021_read_value (client,ADM1021_REG_TEMP );
drivers/i2c/chips/adm1025.c +2 -3
@@ -49,6 +49,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h> #include <linux/i2c-vid.h>
@@ -505,9 +506,7 @@down (&data->update_lock); -if ((jiffies - data->last_updated >HZ *2 ) || - (jiffies < data->last_updated) || - !data->valid) { +if (time_after (jiffies, data->last_updated +HZ *2 ) || !data->valid) {int i;dev_dbg (&client->dev,"Updating data.\n" );
drivers/i2c/chips/adm1026.c +4 -3
@@ -27,6 +27,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h> #include <linux/i2c-vid.h>
@@ -573,7 +574,7 @@down (&data->update_lock);if (!data->valid - || (jiffies - data->last_reading >ADM1026_DATA_INTERVAL )) { + ||time_after (jiffies, data->last_reading +ADM1026_DATA_INTERVAL )) {/* Things that change quickly */ dev_dbg (&client->dev,"Reading sensor values\n" );for (i =0 ;i <=16 ;++i) {
@@ -620,8 +621,8 @@ data->last_reading = jiffies; };/* last_reading */ -if (!data->valid || (jiffies - data->last_config > -ADM1026_CONFIG_INTERVAL )) { +if (!data->valid || +time_after (jiffies, data->last_config +ADM1026_CONFIG_INTERVAL )) {/* Things that don't change often */ dev_dbg (&client->dev,"Reading config values\n" );for (i =0 ;i <=16 ;++i) {
drivers/i2c/chips/adm1031.c +3 -2
@@ -24,6 +24,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h>
@@ -884,8 +885,8 @@down (&data->update_lock); -if ((jiffies - data->last_updated >HZ +HZ /2 ) || - (jiffies < data->last_updated) || !data->valid) { +if (time_after (jiffies, data->last_updated +HZ +HZ /2 ) + || !data->valid) {dev_dbg (&client->dev,"Starting adm1031 update\n" ); for (chan = 0;
drivers/i2c/chips/asb100.c +2 -2
@@ -965,8 +965,8 @@down (&data->update_lock); -if (time_after (jiffies - data->last_updated, (unsigned long )(HZ +HZ /2 )) - ||time_before (jiffies, data->last_updated) || !data->valid) { +if (time_after (jiffies, data->last_updated +HZ +HZ /2 ) + || !data->valid) {dev_dbg (&client->dev,"starting device update...\n" );
drivers/i2c/chips/ds1621.c +3 -2
@@ -24,6 +24,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h> #include "lm75.h"
@@ -284,8 +285,8 @@down (&data->update_lock); -if ((jiffies - data->last_updated >HZ +HZ /2 ) || - (jiffies < data->last_updated) || !data->valid) { +if (time_after (jiffies, data->last_updated +HZ +HZ /2 ) + || !data->valid) {dev_dbg (&client->dev,"Starting ds1621 update\n" );
drivers/i2c/chips/eeprom.c +2 -2
@@ -32,6 +32,7 @@#include <linux/module.h> #include <linux/slab.h> #include <linux/sched.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h>
@@ -86,8 +87,7 @@down (&data->update_lock);if (!(data->valid & (1 << slice)) || - (jiffies - data->last_updated[slice] >300 *HZ ) || - (jiffies < data->last_updated[slice])) { +time_after (jiffies, data->last_updated[slice] +300 *HZ )) {dev_dbg (&client->dev,"Starting eeprom update, slice %u\n" , slice);if (i2c_check_functionality (client->adapter,I2C_FUNC_SMBUS_READ_I2C_BLOCK )) {
drivers/i2c/chips/fscher.c +2 -2
@@ -30,6 +30,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h>
@@ -411,8 +412,7 @@down (&data->update_lock); -if ((jiffies - data->last_updated >2 *HZ ) || - (jiffies < data->last_updated) || !data->valid) { +if (time_after (jiffies, data->last_updated +2 *HZ ) || !data->valid) {dev_dbg (&client->dev,"Starting fscher update\n" );
drivers/i2c/chips/gl518sm.c +3 -2
@@ -40,6 +40,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h>
@@ -505,8 +506,8 @@down (&data->update_lock); -if ((jiffies - data->last_updated >HZ +HZ /2 ) || - (jiffies < data->last_updated) || !data->valid) { +if (time_after (jiffies, data->last_updated +HZ +HZ /2 ) + || !data->valid) {dev_dbg (&client->dev,"Starting gl518 update\n" ); data->alarms =gl518_read_value (client,GL518_REG_INT );
drivers/i2c/chips/it87.c +3 -2
@@ -35,6 +35,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h> #include <linux/i2c-vid.h>
@@ -1083,8 +1084,8 @@down (&data->update_lock); -if ((jiffies - data->last_updated >HZ +HZ /2 ) || - (jiffies < data->last_updated) || !data->valid) { +if (time_after (jiffies, data->last_updated +HZ +HZ /2 ) + || !data->valid) {if (update_vbat) {/* Cleared after each update, so reenable. Value
drivers/i2c/chips/lm63.c +2 -3
@@ -41,6 +41,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h>
@@ -492,9 +493,7 @@down (&data->update_lock); -if ((jiffies - data->last_updated >HZ ) || - (jiffies < data->last_updated) || - !data->valid) { +if (time_after (jiffies, data->last_updated +HZ ) || !data->valid) {if (data->config &0x04 ) {/* tachometer enabled */ /* order matters for fan1_input */ data->fan1_input = i2c_smbus_read_byte_data(client,
drivers/i2c/chips/lm75.c +3 -2
@@ -22,6 +22,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h> #include "lm75.h"
@@ -259,8 +260,8 @@down (&data->update_lock); -if ((jiffies - data->last_updated >HZ +HZ /2 ) || - (jiffies < data->last_updated) || !data->valid) { +if (time_after (jiffies, data->last_updated +HZ +HZ /2 ) + || !data->valid) {dev_dbg (&client->dev,"Starting lm75 update\n" ); data->temp_input =lm75_read_value (client,LM75_REG_TEMP );
drivers/i2c/chips/lm77.c +3 -2
@@ -29,6 +29,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h>
@@ -360,8 +361,8 @@down (&data->update_lock); -if ((jiffies - data->last_updated >HZ +HZ /2 ) || - (jiffies < data->last_updated) || !data->valid) { +if (time_after (jiffies, data->last_updated +HZ +HZ /2 ) + || !data->valid) {dev_dbg (&client->dev,"Starting lm77 update\n" ); data->temp_input = LM77_TEMP_FROM_REG(lm77_read_value(client,
drivers/i2c/chips/lm78.c +3 -2
@@ -22,6 +22,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h> #include <asm/io.h>
@@ -704,8 +705,8 @@down (&data->update_lock); -if ((jiffies - data->last_updated >HZ +HZ /2 ) || - (jiffies < data->last_updated) || !data->valid) { +if (time_after (jiffies, data->last_updated +HZ +HZ /2 ) + || !data->valid) {dev_dbg (&client->dev,"Starting lm78 update\n" );
drivers/i2c/chips/lm80.c +2 -3
@@ -25,6 +25,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h>
@@ -529,9 +530,7 @@down (&data->update_lock); -if ((jiffies - data->last_updated >2 *HZ ) || - (jiffies < data->last_updated) || !data->valid) { - +if (time_after (jiffies, data->last_updated +2 *HZ ) || !data->valid) {dev_dbg (&client->dev,"Starting lm80 update\n" );for (i =0 ; i <=6 ; i++) { data->in[i] =
drivers/i2c/chips/lm83.c +2 -3
@@ -31,6 +31,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h>
@@ -362,9 +363,7 @@down (&data->update_lock); -if ((jiffies - data->last_updated >HZ *2 ) || - (jiffies < data->last_updated) || - !data->valid) { +if (time_after (jiffies, data->last_updated +HZ *2 ) || !data->valid) {int nr;dev_dbg (&client->dev,"Updating lm83 data.\n" );
drivers/i2c/chips/lm85.c +3 -2
@@ -27,6 +27,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h> #include <linux/i2c-vid.h>
@@ -1354,7 +1355,7 @@down (&data->update_lock);if ( !data->valid || - (jiffies - data->last_reading >LM85_DATA_INTERVAL ) ) { +time_after (jiffies, data->last_reading +LM85_DATA_INTERVAL ) ) {/* Things that change quickly */ dev_dbg (&client->dev,"Reading sensor values\n" );
@@ -1408,7 +1409,7 @@ };/* last_reading */ if ( !data->valid || - (jiffies - data->last_config >LM85_CONFIG_INTERVAL ) ) { +time_after (jiffies, data->last_config +LM85_CONFIG_INTERVAL ) ) {/* Things that don't change often */ dev_dbg (&client->dev,"Reading config values\n" );
drivers/i2c/chips/lm87.c +2 -3
@@ -56,6 +56,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h> #include <linux/i2c-vid.h>
@@ -713,9 +714,7 @@down (&data->update_lock); -if (jiffies - data->last_updated >HZ - || jiffies < data->last_updated - || !data->valid) { +if (time_after (jiffies, data->last_updated +HZ ) || !data->valid) {int i, j;dev_dbg (&client->dev,"Updating data.\n" );
drivers/i2c/chips/lm90.c +2 -3
@@ -66,6 +66,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h>
@@ -488,9 +489,7 @@down (&data->update_lock); -if ((jiffies - data->last_updated >HZ *2 ) || - (jiffies < data->last_updated) || - !data->valid) { +if (time_after (jiffies, data->last_updated +HZ *2 ) || !data->valid) {u8 oldh, newh;dev_dbg (&client->dev,"Updating lm90 data.\n" );
drivers/i2c/chips/max1619.c +2 -4
@@ -30,6 +30,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h>
@@ -324,10 +325,7 @@down (&data->update_lock); -if ((jiffies - data->last_updated >HZ *2 ) || - (jiffies < data->last_updated) || - !data->valid) { - +if (time_after (jiffies, data->last_updated +HZ *2 ) || !data->valid) {dev_dbg (&client->dev,"Updating max1619 data.\n" ); data->temp_input1 =i2c_smbus_read_byte_data (client,MAX1619_REG_R_LOCAL_TEMP );
drivers/i2c/chips/pc87360.c +2 -2
@@ -37,6 +37,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h> #include <linux/i2c-vid.h>
@@ -1174,8 +1175,7 @@down (&data->update_lock); -if ((jiffies - data->last_updated >HZ *2 ) - || (jiffies < data->last_updated) || !data->valid) { +if (time_after (jiffies, data->last_updated +HZ *2 ) || !data->valid) {dev_dbg (&client->dev,"Data update\n" );/* Fans */
drivers/i2c/chips/smsc47b397.c +2 -3
@@ -29,6 +29,7 @@#include <linux/module.h> #include <linux/slab.h> #include <linux/ioport.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h> #include <linux/init.h>
@@ -130,9 +131,7 @@down (&data->update_lock); -if (time_after (jiffies - data->last_updated, (unsigned long )HZ ) - ||time_before (jiffies, data->last_updated) || !data->valid) { - +if (time_after (jiffies, data->last_updated +HZ ) || !data->valid) {dev_dbg (&client->dev,"starting device update...\n" );/* 4 temperature inputs, 4 fan inputs */
drivers/i2c/chips/smsc47m1.c +2 -2
@@ -28,6 +28,7 @@#include <linux/module.h> #include <linux/slab.h> #include <linux/ioport.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h> #include <linux/init.h>
@@ -527,8 +528,7 @@down (&data->update_lock); -if ((jiffies - data->last_updated >HZ +HZ /2 ) || - (jiffies < data->last_updated) || init) { +if (time_after (jiffies, data->last_updated +HZ +HZ /2 ) || init) {int i;for (i =0 ; i <2 ; i++) {
drivers/i2c/chips/via686a.c +3 -3
@@ -35,6 +35,7 @@#include <linux/slab.h> #include <linux/pci.h> #include <linux/delay.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h> #include <linux/init.h>
@@ -726,9 +727,8 @@down (&data->update_lock); -if ((jiffies - data->last_updated >HZ +HZ /2 ) || - (jiffies < data->last_updated) || !data->valid) { - +if (time_after (jiffies, data->last_updated +HZ +HZ /2 ) + || !data->valid) {for (i =0 ; i <=4 ; i++) { data->in[i] =via686a_read_value (client,VIA686A_REG_IN (i));
drivers/i2c/chips/w83627hf.c +3 -2
@@ -40,6 +40,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h> #include <linux/i2c-vid.h>
@@ -1371,8 +1372,8 @@down (&data->update_lock); -if ((jiffies - data->last_updated >HZ +HZ /2 ) || - (jiffies < data->last_updated) || !data->valid) { +if (time_after (jiffies, data->last_updated +HZ +HZ /2 ) + || !data->valid) {for (i =0 ; i <=8 ; i++) {/* skip missing sensors */ if (((data->type == w83697hf) && (i == 1)) ||
drivers/i2c/chips/w83781d.c +3 -3
@@ -39,6 +39,7 @@#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h> #include <linux/i2c-vid.h>
@@ -1609,9 +1610,8 @@down (&data->update_lock); -if (time_after - (jiffies - data->last_updated, (unsigned long ) (HZ +HZ /2 )) - ||time_before (jiffies, data->last_updated) || !data->valid) { +if (time_after (jiffies, data->last_updated +HZ +HZ /2 ) + || !data->valid) {dev_dbg (dev,"Starting device update\n" );for (i =0 ; i <=8 ; i++) {
drivers/i2c/chips/w83l785ts.c +2 -3
@@ -35,6 +35,7 @@#include <linux/delay.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h>
@@ -294,9 +295,7 @@down (&data->update_lock); -if (!data->valid - || (jiffies - data->last_updated >HZ *2 ) - || (jiffies < data->last_updated)) { +if (!data->valid ||time_after (jiffies, data->last_updated +HZ *2 )) {dev_dbg (&client->dev,"Updating w83l785ts data.\n" ); data->temp =w83l785ts_read_value (client,W83L785TS_REG_TEMP , data->temp);
PATCH 1/1 I2C: add ST M41T00 I2C RTC chip driver
ChangeSet 1.2098, 2005/03/02 12:16:55-08:00, [email protected]
[PATCH] I2C: add ST M41T00 I2C RTC chip driver
This patch adds support for the ST M41T00 I2C RTC chip.
This rtc chip has no mechanism to freeze it's registers while being read; however, it will delay updating the external values of the registers for 250ms after a register is read. To ensure that a sane time value is read, the driver verifies that the same registers values were read twice before returning.
Also, when setting the rtc from an interrupt handler, a tasklet is used to provide the context required by the i2c core code.
drivers/i2c/chips/Kconfig | 9 + drivers/i2c/chips/Makefile | 1 drivers/i2c/chips/m41t00.c | 247 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 257 insertions(+)
drivers/i2c/chips/Kconfig +9 -0
@@ -382,4 +382,13 @@ This driver can also be built as a module. If so, the module will be called isp1301_omap. +config SENSORS_M41T00 + tristate "ST M41T00 RTC chip" + depends on I2C && PPC32 + help + If you say yes here you get support for the ST M41T00 RTC chip. + + This driver can also be built as a module. If so, the module + will be called m41t00. + endmenu
drivers/i2c/chips/Makefile +1 -0
@@ -27,6 +27,7 @@ obj-$(CONFIG_SENSORS_LM87) += lm87.o obj-$(CONFIG_SENSORS_LM90) += lm90.o obj-$(CONFIG_SENSORS_MAX1619) += max1619.o +obj-$(CONFIG_SENSORS_M41T00) += m41t00.o obj-$(CONFIG_SENSORS_PC87360) += pc87360.o obj-$(CONFIG_SENSORS_PCF8574) += pcf8574.o obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o
drivers/i2c/chips/m41t00.c new file +247 -0
247 lines not on this page · raw message
PATCH 1/1 I2C: New chip driver: sis5595
ChangeSet 1.2099, 2005/03/02 12:17:12-08:00, [email protected]
[PATCH] I2C: New chip driver: sis5595
Please find below the new version of the patch against kernel 2.6.11-rc3-mm1 to add the sis5595 driver (sensor part).
As you suggested, I have changed the PCI part of the driver, taking the via686a driver as an example. I have also changed the comparison of jiffies by using time_after.
drivers/i2c/chips/Kconfig | 12 drivers/i2c/chips/Makefile | 1 drivers/i2c/chips/sis5595.c | 794 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 807 insertions(+)
drivers/i2c/chips/Kconfig +12 -0
@@ -262,6 +262,18 @@ This driver can also be built as a module. If so, the module will be called smsc47b397. +config SENSORS_SIS5595 + tristate "Silicon Integrated Systems Corp. SiS5595" + depends on I2C && PCI && EXPERIMENTAL + select I2C_SENSOR + select I2C_ISA + help + If you say yes here you get support for the integrated sensors in + SiS5595 South Bridges. + + This driver can also be built as a module. If so, the module + will be called sis5595. + config SENSORS_SMSC47M1 tristate "SMSC LPC47M10x and compatibles" depends on I2C && EXPERIMENTAL
drivers/i2c/chips/Makefile +1 -0
@@ -32,6 +32,7 @@ obj-$(CONFIG_SENSORS_PCF8574) += pcf8574.o obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o obj-$(CONFIG_SENSORS_RTC8564) += rtc8564.o +obj-$(CONFIG_SENSORS_SIS5595) += sis5595.o obj-$(CONFIG_SENSORS_SMSC47B397)+= smsc47b397.o obj-$(CONFIG_SENSORS_SMSC47M1) += smsc47m1.o obj-$(CONFIG_SENSORS_VIA686A) += via686a.o
drivers/i2c/chips/sis5595.c new file +794 -0
794 lines not on this page · raw message
PATCH 1/1 I2C: add Marvell mv64xxx i2c driver
ChangeSet 1.2100, 2005/03/02 12:17:29-08:00, [email protected]
[PATCH] I2C: add Marvell mv64xxx i2c driver
Marvell makes a line of host bridge for PPC and MIPS systems. On those bridges is an i2c controller. This patch adds the driver for that i2c controller.
Please apply.
Depends on patch submitted by Jean Delvare:
http://archives.andrew.net.au/lm-sensors/msg29405.html
drivers/i2c/busses/Kconfig | 10 drivers/i2c/busses/Makefile | 1 drivers/i2c/busses/i2c-mv64xxx.c | 596 +++++++++++++++++++++++++++++++++++++++ include/linux/i2c-id.h | 3 include/linux/mv643xx.h | 17 - 5 files changed, 621 insertions(+), 6 deletions(-)
drivers/i2c/busses/Kconfig +10 -0
@@ -486,4 +486,14 @@ This driver can also be built as a module. If so, the module will be called i2c-pca-isa. +config I2C_MV64XXX + tristate "Marvell mv64xxx I2C Controller" + depends on I2C && MV64X60 && EXPERIMENTAL + help + If you say yes to this option, support will be included for the + built-in I2C interface on the Marvell 64xxx line of host bridges. + + This driver can also be built as a module. If so, the module + will be called i2c-mv64xxx. + endmenu
drivers/i2c/busses/Makefile +1 -0
@@ -21,6 +21,7 @@ obj-$(CONFIG_I2C_IXP4XX) += i2c-ixp4xx.o obj-$(CONFIG_I2C_KEYWEST) += i2c-keywest.o obj-$(CONFIG_I2C_MPC) += i2c-mpc.o +obj-$(CONFIG_I2C_MV64XXX) += i2c-mv64xxx.o obj-$(CONFIG_I2C_NFORCE2) += i2c-nforce2.o obj-$(CONFIG_I2C_PARPORT) += i2c-parport.o obj-$(CONFIG_I2C_PARPORT_LIGHT) += i2c-parport-light.o
drivers/i2c/busses/i2c-mv64xxx.c new file +596 -0
596 lines not on this page · raw message
include/linux/i2c-id.h +3 -0
@@ -310,4 +310,7 @@/* --- MCP107 adapter */ #define I2C_HW_MPC107 0x00 +/* --- Marvell mv64xxx i2c adapter */ +#define I2C_HW_MV64XXX 0x00 +#endif /* LINUX_I2C_ID_H */
include/linux/mv643xx.h +11 -6
@@ -977,12 +977,9 @@/* I2C Registers */ /****************************************/ -#define MV64340_I2C_SLAVE_ADDR 0xc000 -#define MV64340_I2C_EXTENDED_SLAVE_ADDR 0xc010 -#define MV64340_I2C_DATA 0xc004 -#define MV64340_I2C_CONTROL 0xc008 -#define MV64340_I2C_STATUS_BAUDE_RATE 0xc00C -#define MV64340_I2C_SOFT_RESET 0xc01c +#define MV64XXX_I2C_CTLR_NAME "mv64xxx i2c" +#define MV64XXX_I2C_OFFSET 0xc000 +#define MV64XXX_I2C_REG_BLOCK_SIZE 0x0020/****************************************/ /* GPP Interface Registers */
@@ -1083,6 +1080,14 @@u8 brg_can_tune;u8 brg_clk_src; u32 brg_clk_freq; +}; + +/* i2c Platform Device, Driver Data */ +struct mv64xxx_i2c_pdata { +u32 freq_m; +u32 freq_n; +u32 timeout;/* In milliseconds */ +u32 retries; };#endif /* __ASM_MV64340_H */
PATCH 1/1 I2C: add GL520SM Sensor Chip driver
ChangeSet 1.2101, 2005/03/02 12:17:46-08:00, [email protected]
[PATCH] I2C: add GL520SM Sensor Chip driver
Port of the Genesys Logic 520SM sensor chip driver from linux 2.4
drivers/i2c/chips/Kconfig | 11 drivers/i2c/chips/Makefile | 1 drivers/i2c/chips/gl520sm.c | 754 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 766 insertions(+)
drivers/i2c/chips/Kconfig +11 -0
@@ -106,6 +106,17 @@ This driver can also be built as a module. If so, the module will be called gl518sm. +config SENSORS_GL520SM + tristate "Genesys Logic GL520SM" + depends on I2C && EXPERIMENTAL + select I2C_SENSOR + help + If you say yes here you get support for Genesys Logic GL520SM + sensor chips. + + This driver can also be built as a module. If so, the module + will be called gl520sm. + config SENSORS_IT87 tristate "ITE IT87xx and compatibles" depends on I2C && EXPERIMENTAL
drivers/i2c/chips/Makefile +1 -0
@@ -16,6 +16,7 @@ obj-$(CONFIG_SENSORS_FSCHER) += fscher.o obj-$(CONFIG_SENSORS_FSCPOS) += fscpos.o obj-$(CONFIG_SENSORS_GL518SM) += gl518sm.o +obj-$(CONFIG_SENSORS_GL520SM) += gl520sm.o obj-$(CONFIG_SENSORS_IT87) += it87.o obj-$(CONFIG_SENSORS_LM63) += lm63.o obj-$(CONFIG_SENSORS_LM75) += lm75.o
drivers/i2c/chips/gl520sm.c new file +754 -0
754 lines not on this page · raw message
PATCH 1/1 I2C: improve debugging output
ChangeSet 1.2102, 2005/03/02 12:18:03-08:00, [email protected]
[PATCH] I2C: improve debugging output
Rework the pca_xfer() function to always print the number of successfully completed transfers in a series when debugging, even when exiting with an error.
drivers/i2c/algos/i2c-algo-pca.c | 28 ++++++++++++++++------------ 1 files changed, 16 insertions(+), 12 deletions(-)
drivers/i2c/algos/i2c-algo-pca.c +16 -12
@@ -186,6 +186,7 @@int curmsg;int numbytes =0 ;int state; +int ret; state =pca_status (adap);if ( state !=0xF8 ) {
@@ -218,6 +219,7 @@ } curmsg =0 ; + ret = -EREMOTEIO ;while (curmsg < num) { state =pca_status (adap);
@@ -251,7 +253,7 @@case 0x20 :/* SLA+W has been transmitted; NOT ACK has been received */ DEB2 ("NOT ACK received after SLA+W\n" );pca_stop (adap); -return -EREMOTEIO ; + goto out;case 0x40 :/* SLA+R has been transmitted; ACK has been received */ pca_rx_ack (adap, msg->len >1 );
@@ -263,7 +265,7 @@ numbytes++;pca_rx_ack (adap, numbytes < msg->len -1 );break ; - } + } curmsg++; numbytes =0 ;if (curmsg == num)pca_stop (adap);
@@ -274,15 +276,15 @@case 0x48 :/* SLA+R has been transmitted; NOT ACK has been received */ DEB2 ("NOT ACK received after SLA+R\n" );pca_stop (adap); -return -EREMOTEIO ; + goto out;case 0x30 :/* Data byte in I2CDAT has been transmitted; NOT ACK has been received */ DEB2 ("NOT ACK received after data byte\n" ); -return -EREMOTEIO ; + goto out;case 0x38 :/* Arbitration lost during SLA+W, SLA+R or data bytes */ DEB2 ("Arbitration lost\n" ); -return -EREMOTEIO ; + goto out;case 0x58 :/* Data byte has been received; NOT ACK has been returned */ if ( numbytes == msg->len -1 ) {
@@ -297,21 +299,21 @@"Not final byte. numbytes %d. len %d\n" , numbytes, msg->len);pca_stop (adap); -return -EREMOTEIO ; + goto out; }break ;case 0x70 :/* Bus error - SDA stuck low */ DEB2 ("BUS ERROR - SDA Stuck low\n" );pca_reset (adap); -return -EREMOTEIO ; + goto out;case 0x90 :/* Bus error - SCL stuck low */ DEB2 ("BUS ERROR - SCL Stuck low\n" );pca_reset (adap); -return -EREMOTEIO ; + goto out;case 0x00 :/* Bus error during master or slave mode due to illegal START or STOP condition */ DEB2 ("BUS ERROR - Illegal START or STOP\n" );pca_reset (adap); -return -EREMOTEIO ; + goto out;default : printk(KERN_ERR DRIVER ": unhandled SIO state 0x%02x\n", state);break ;
@@ -319,11 +321,13 @@ } -DEB1 (KERN_CRIT "}}} transfered %d messages. " + ret = curmsg; + out: +DEB1 (KERN_CRIT "}}} transfered %d/%d messages. " "status is %#04x. control is %#04x\n" , - num,pca_status (adap), + curmsg, num,pca_status (adap),pca_get_con (adap)); -return curmsg; +return ret; }static u32 pca_func (struct i2c_adapter *adap)
PATCH 1/1 I2C: Enable I2C_PIIX4 for 64-bit platforms
ChangeSet 1.2103, 2005/03/02 12:18:19-08:00, [email protected]
[PATCH] I2C: Enable I2C_PIIX4 for 64-bit platforms
Is there any specific reason for the PIIX4 SMBus driver to be disabled on
64-bit platforms? If not, then please apply the following change. The MIPS Technologies Malta development board has the 82371EB chip and supports 64-bit configurations. I've verified the driver to work correctly using 64-bit kernels for both endiannesses.
drivers/i2c/busses/Kconfig | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/Kconfig +1 -1
@@ -287,7 +287,7 @@ config I2C_PIIX4 tristate "Intel PIIX4" - depends on I2C && PCI && EXPERIMENTAL && !64BIT + depends on I2C && PCI && EXPERIMENTAL help If you say yes to this option, support will be included for the Intel PIIX4 family of mainboard I2C interfaces. Specifically, the following
PATCH 1/1 I2C: fix typo in drivers/i2c/busses/i2c-ixp4xx.c
ChangeSet 1.2104, 2005/03/02 12:18:36-08:00, [email protected]
[PATCH] I2C: fix typo in drivers/i2c/busses/i2c-ixp4xx.c
I was looking at your ixp4xx gpio i2c driver for inspiration (for a similar pxa2xx one) and I just happened to notice a tiny typo.
drivers/i2c/busses/i2c-ixp4xx.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-ixp4xx.c +2 -2
@@ -133,8 +133,8 @@ drv_data->algo_data.mdelay =10 ; drv_data->algo_data.timeout =100 ; - drv_data->adapter.id =I2C_HW_B_IXP4XX , - drv_data->adapter.algo_data = &drv_data->algo_data, + drv_data->adapter.id =I2C_HW_B_IXP4XX ; + drv_data->adapter.algo_data = &drv_data->algo_data; drv_data->adapter.dev.parent = &plat_dev->dev;
PATCH 1/1 I2C i2c-nforce2: add support for nForce4 (patch against 2.6.11-rc4)
ChangeSet 1.2105, 2005/03/02 12:18:53-08:00, [email protected]
[PATCH] I2C i2c-nforce2: add support for nForce4 (patch against 2.6.11-rc4)
can you please apply the attached patch (against 2.6.11-rc4, but works as well for 2.6.11-rc3-mm2), that adds support for the two SMBusses of the nForce4 to the i2c-nforce2 i2c bus driver. The patch is reported to work on the standard nForce4 (i.e. non-Ultra, non-SLI), but I expect that it works as well for the other nForce4 chipsets, that seem to have the same PCI-id for the SMBus-device.
This patch was proposed by Chuck <[email protected]>, thanks to him for the information, testing and his patch.
drivers/i2c/busses/i2c-nforce2.c | 6 ++++-- include/linux/pci_ids.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-nforce2.c +4 -2
@@ -29,9 +29,10 @@nForce2 Ultra 400 MCP 0084 nForce3 Pro150 MCP 00D4 nForce3 250Gb MCP 00E4 +nForce4 MCP 0052 -This driver supports the 2 SMBuses that are included in the MCP2 of the -nForce2 chipset. +This driver supports the 2 SMBuses that are included in the MCP of the +nForce2/3/4 chipsets. */ /* Note: we assume there can only be one nForce2, with two SMBus interfaces */
@@ -295,6 +296,7 @@ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_SMBUS) }, { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS) }, { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SMBUS) }, + { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE4_SMBUS) }, { 0 } };
include/linux/pci_ids.h +1 -0
@@ -1098,6 +1098,7 @@#define PCI_DEVICE_ID_NVIDIA_NVENET_10 0x0037#define PCI_DEVICE_ID_NVIDIA_NVENET_11 0x0038#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2 0x003e +#define PCI_DEVICE_ID_NVIDIA_NFORCE4_SMBUS 0x0052#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE 0x0053#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA 0x0054#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2 0x0055
PATCH 1/1 I2C: Remove NULL client checks in rtc8564 driver
ChangeSet 1.2106, 2005/03/02 15:01:52-08:00, [email protected]
[PATCH] I2C: Remove NULL client checks in rtc8564 driver
Several functions in your rtc8564 driver verify the non-NULLity of the i2c client that is passed to them. It doesn't seem to be necessary, as I can't think of any case where these functions could possibly be called with a NULL i2c client. As a matter of fact, I couldn't find any similar driver doing such checks.
My attention was brought on this by Coverity's SWAT which correctly noticed that three of these functions contain explicit or hidden dereferences of the i2c client pointer *before* the NULL check. I guess it wasn't a problem because the NULL case cannot happen (unless I miss something), but this still is confusing code.
Thus I propose the following changes:
drivers/i2c/chips/rtc8564.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-)
drivers/i2c/chips/rtc8564.c +8 -8
@@ -89,7 +89,7 @@_DBG (1 ,"client=%p, adr=%d, buf=%p, len=%d" , client, adr, buf, len); -if (!buf || !client) { +if (!buf) { ret = -EINVAL ; goto done; }
@@ -111,7 +111,7 @@struct i2c_msg wr;int i; -if (!client || !data || len >15 ) { +if (!data || len >15 ) { ret = -EINVAL ; goto done; }
@@ -220,7 +220,7 @@_DBG (1 ,"client=%p, dt=%p" , client, dt); -if (!dt || !client) +if (!dt)return -EINVAL ;memset (buf,0 ,sizeof (buf));
@@ -254,7 +254,7 @@_DBG (1 ,"client=%p, dt=%p" , client, dt); -if (!dt || !client) +if (!dt)return -EINVAL ;_DBGRTCTM (2 , *dt);
@@ -293,7 +293,7 @@ {struct rtc8564_data *data =i2c_get_clientdata (client); -if (!ctrl || !client) +if (!ctrl)return -1 ; *ctrl = data->ctrl;
@@ -305,7 +305,7 @@struct rtc8564_data *data =i2c_get_clientdata (client);unsigned char buf[2 ]; -if (!ctrl || !client) +if (!ctrl)return -1 ; buf[0 ] = *ctrl &0xff ;
@@ -318,7 +318,7 @@static int rtc8564_read_mem (struct i2c_client *client,struct mem *mem) { -if (!mem || !client) +if (!mem)return -EINVAL ;return rtc8564_read (client, mem->loc, mem->data, mem->nr);
@@ -327,7 +327,7 @@static int rtc8564_write_mem (struct i2c_client *client,struct mem *mem) { -if (!mem || !client) +if (!mem)return -EINVAL ;return rtc8564_write (client, mem->loc, mem->data, mem->nr);
PATCH 1/1 I2C: Make i2c list terminators explicitely unsigned
ChangeSet 1.2107, 2005/03/02 15:02:10-08:00, [email protected]
[PATCH] I2C: Make i2c list terminators explicitely unsigned
Shouldn't the i2c list terminators be explicitely declared as unsigned? I'd hope it to help code analysis tools and possibly avoid false positives. Coverity's SWAT pointed my attention to these constants.
include/linux/i2c.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
include/linux/i2c.h +2 -2
@@ -299,8 +299,8 @@ };/* Internal numbers to terminate lists */ -#define I2C_CLIENT_END 0xfffe -#define I2C_CLIENT_ISA_END 0xfffefffe +#define I2C_CLIENT_END 0xfffeU +#define I2C_CLIENT_ISA_END 0xfffefffeU/* The numbers to use to set I2C bus address */ #define ANY_I2C_BUS 0xffff
PATCH 1/1 I2C: Fix some gcc 4.0 compile failures and warnings
ChangeSet 1.2108, 2005/03/02 15:02:27-08:00, [email protected]
[PATCH] I2C: Fix some gcc 4.0 compile failures and warnings
gcc 4.0.x cvs seems to dislike "include/linux/i2c.h file" and others due to a current gcc 4.0.x change having to do with array declarations.
Example error msg: include/linux/i2c.h:{55,194} error: array type has
incomplete element type
A. Daplas has recently done a workaround for this on another header file. A thread discussing this can be found by following the link below:
http://gcc.gnu.org/ml/gcc/2005-02/msg00053.html
The patch changes the array(struct i2c_msg) declaration used by *i2c_transfer and *master_xfer from "struct i2c_msg msg[]" format to "struct i2c_msg *msg".
After some grepping, I came up with about a dozen files that used the format disliked by gcc4 that're addressed by the attached patch. Tested on gcc 3.x & gcc 4.x by configuring kernel with all i2c switches enabled as module, and saw no errors or warnings in i2c.
Documentation/i2c/writing-clients | 2 +- drivers/i2c/algos/i2c-algo-ite.c | 4 ++-- drivers/i2c/algos/i2c-algo-pca.c | 2 +- drivers/i2c/algos/i2c-algo-pcf.c | 2 +- drivers/i2c/algos/i2c-algo-sgi.c | 2 +- drivers/i2c/busses/i2c-au1550.c | 2 +- drivers/i2c/busses/i2c-ibm_iic.c | 2 +- drivers/i2c/busses/i2c-iop3xx.c | 2 +- drivers/i2c/busses/i2c-keywest.c | 2 +- drivers/i2c/busses/i2c-mpc.c | 2 +- drivers/i2c/busses/i2c-s3c2410.c | 4 ++-- drivers/i2c/i2c-core.c | 2 +- drivers/media/common/saa7146_i2c.c | 8 ++++---- drivers/media/dvb/b2c2/skystar2.c | 2 +- drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c | 2 +- drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 2 +- drivers/media/video/bttv-i2c.c | 2 +- drivers/media/video/saa7134/saa7134-i2c.c | 2 +- include/linux/i2c.h | 4 ++-- include/media/saa7146.h | 2 +- 20 files changed, 26 insertions(+), 26 deletions(-)
Documentation/i2c/writing-clients +1 -1
@@ -638,7 +638,7 @@ parameter contains the bytes the read/write, the third the length of the buffer. Returned is the actual number of bytes read/written. - extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], + extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num); This sends a series of messages. Each message can be a read or write,
drivers/i2c/algos/i2c-algo-ite.c +2 -2
@@ -490,7 +490,7 @@* condition. */ #if 0 -static int iic_combined_transaction (struct i2c_adapter *i2c_adap,struct i2c_msg msgs[],int num) +static int iic_combined_transaction (struct i2c_adapter *i2c_adap,struct i2c_msg *msgs,int num) {int i;struct i2c_msg *pmsg;
@@ -600,7 +600,7 @@* verify that the bus is not busy or in some unknown state. */ static int iic_xfer (struct i2c_adapter *i2c_adap, -struct i2c_msg msgs[], +struct i2c_msg *msgs,int num) {struct i2c_algo_iic_data *adap = i2c_adap->algo_data;
drivers/i2c/algos/i2c-algo-pca.c +1 -1
@@ -178,7 +178,7 @@ }static int pca_xfer (struct i2c_adapter *i2c_adap, -struct i2c_msg msgs[], +struct i2c_msg *msgs,int num) {struct i2c_algo_pca_data *adap = i2c_adap->algo_data;
drivers/i2c/algos/i2c-algo-pcf.c +1 -1
@@ -332,7 +332,7 @@ }static int pcf_xfer (struct i2c_adapter *i2c_adap, -struct i2c_msg msgs[], +struct i2c_msg *msgs,int num) {struct i2c_algo_pcf_data *adap = i2c_adap->algo_data;
drivers/i2c/algos/i2c-algo-sgi.c +1 -1
@@ -131,7 +131,7 @@return 0 ; } -static int sgi_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg msgs[], +static int sgi_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg *msgs,int num) {struct i2c_algo_sgi_data *adap = i2c_adap->algo_data;
drivers/i2c/busses/i2c-au1550.c +1 -1
@@ -253,7 +253,7 @@ }static int -au1550_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg msgs[],int num) +au1550_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg *msgs,int num) {struct i2c_au1550_data *adap = i2c_adap->algo_data;struct i2c_msg *p;
drivers/i2c/busses/i2c-ibm_iic.c +1 -1
@@ -549,7 +549,7 @@* Generic master transfer entrypoint. * Returns the number of processed messages or error (<0) */ -static int iic_xfer (struct i2c_adapter *adap,struct i2c_msg msgs[],int num) +static int iic_xfer (struct i2c_adapter *adap,struct i2c_msg *msgs,int num) {struct ibm_iic_private * dev = (struct ibm_iic_private *)(i2c_get_adapdata (adap));volatile struct iic_regs __iomem *iic = dev->vaddr;
drivers/i2c/busses/i2c-iop3xx.c +1 -1
@@ -361,7 +361,7 @@* master_xfer() - main read/write entry */ static int -iop3xx_i2c_master_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg msgs[], +iop3xx_i2c_master_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg *msgs,int num) {struct i2c_algo_iop3xx_data *iop3xx_adap = i2c_adap->algo_data;
drivers/i2c/busses/i2c-keywest.c +1 -1
@@ -399,7 +399,7 @@*/ static int keywest_xfer (struct i2c_adapter *adap, -struct i2c_msg msgs[], +struct i2c_msg *msgs,int num) {struct keywest_chan * chan =i2c_get_adapdata (adap);
drivers/i2c/busses/i2c-mpc.c +1 -1
@@ -233,7 +233,7 @@return length; } -static int mpc_xfer (struct i2c_adapter *adap,struct i2c_msg msgs[],int num) +static int mpc_xfer (struct i2c_adapter *adap,struct i2c_msg *msgs,int num) {struct i2c_msg *pmsg;int i;
drivers/i2c/busses/i2c-s3c2410.c +2 -2
@@ -483,7 +483,7 @@* this starts an i2c transfer */ -static int s3c24xx_i2c_doxfer (struct s3c24xx_i2c *i2c,struct i2c_msg msgs[],int num) +static int s3c24xx_i2c_doxfer (struct s3c24xx_i2c *i2c,struct i2c_msg *msgs,int num) {unsigned long timeout;int ret;
@@ -534,7 +534,7 @@*/ static int s3c24xx_i2c_xfer (struct i2c_adapter *adap, -struct i2c_msg msgs[],int num) +struct i2c_msg *msgs,int num) {struct s3c24xx_i2c *i2c = (struct s3c24xx_i2c *)adap->algo_data;int retry;
drivers/i2c/i2c-core.c +1 -1
@@ -582,7 +582,7 @@* ---------------------------------------------------- */ -int i2c_transfer (struct i2c_adapter * adap,struct i2c_msg msgs[],int num) +int i2c_transfer (struct i2c_adapter * adap,struct i2c_msg *msgs,int num) {int ret;
drivers/media/common/saa7146_i2c.c +4 -4
@@ -25,7 +25,7 @@sent through the saa7146. have a look at the specifications p. 122 ff to understand this. it returns the number of u32s to send, or -1 in case of an error. */ -static int saa7146_i2c_msg_prepare (const struct i2c_msg m[],int num,u32 *op) +static int saa7146_i2c_msg_prepare (const struct i2c_msg *m,int num,u32 *op) {int h1, h2;int i, j, addr;
@@ -89,7 +89,7 @@which bytes were read through the adapter and write them back to the corresponding i2c-message. but instead, we simply write back all bytes. fixme: this could be improved. */ -static int saa7146_i2c_msg_cleanup (const struct i2c_msg m[],int num,u32 *op) +static int saa7146_i2c_msg_cleanup (const struct i2c_msg *m,int num,u32 *op) {int i, j;int op_count =0 ;
@@ -272,7 +272,7 @@return 0 ; } -int saa7146_i2c_transfer (struct saa7146_dev *dev,const struct i2c_msg msgs[],int num,int retries) +int saa7146_i2c_transfer (struct saa7146_dev *dev,const struct i2c_msg *msgs,int num,int retries) {int i =0 , count =0 ;u32 * buffer = dev->d_i2c.cpu_addr;
@@ -372,7 +372,7 @@ }/* utility functions */ -static int saa7146_i2c_xfer (struct i2c_adapter * adapter,struct i2c_msg msg[],int num) +static int saa7146_i2c_xfer (struct i2c_adapter * adapter,struct i2c_msg *msg,int num) {struct saa7146_dev * dev =i2c_get_adapdata (adapter);
drivers/media/dvb/b2c2/skystar2.c +1 -1
@@ -293,7 +293,7 @@return buf - start; } -static int master_xfer (struct i2c_adapter * adapter,struct i2c_msg msgs[],int num) +static int master_xfer (struct i2c_adapter * adapter,struct i2c_msg *msgs,int num) {struct adapter *tmp =i2c_get_adapdata (adapter);int i, ret =0 ;
drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c +1 -1
@@ -38,7 +38,7 @@/* * I2C master xfer function */ -static int dibusb_i2c_xfer (struct i2c_adapter *adap,struct i2c_msg msg[],int num) +static int dibusb_i2c_xfer (struct i2c_adapter *adap,struct i2c_msg *msg,int num) {struct usb_dibusb *dib =i2c_get_adapdata (adap);int i;
drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +1 -1
@@ -252,7 +252,7 @@return rcv_len; } -static int master_xfer (struct i2c_adapter * adapter,struct i2c_msg msg[],int num) +static int master_xfer (struct i2c_adapter * adapter,struct i2c_msg *msg,int num) {struct ttusb *ttusb =i2c_get_adapdata (adapter);int i =0 ;
drivers/media/video/bttv-i2c.c +1 -1
@@ -245,7 +245,7 @@return retval; } -static int bttv_i2c_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg msgs[],int num) +static int bttv_i2c_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg *msgs,int num) {struct bttv *btv =i2c_get_adapdata (i2c_adap);int retval =0 ;
drivers/media/video/saa7134/saa7134-i2c.c +1 -1
@@ -236,7 +236,7 @@ }static int saa7134_i2c_xfer (struct i2c_adapter *i2c_adap, -struct i2c_msg msgs[],int num) +struct i2c_msg *msgs,int num) {struct saa7134_dev *dev = i2c_adap->algo_data;enum i2c_status status;
include/linux/i2c.h +2 -2
@@ -55,7 +55,7 @@/* Transfer num messages. */ -extern int i2c_transfer (struct i2c_adapter *adap,struct i2c_msg msg[],int num); +extern int i2c_transfer (struct i2c_adapter *adap,struct i2c_msg *msgs,int num);/* * Some adapter types (i.e. PCF 8584 based ones) may support slave behaviuor.
@@ -191,7 +191,7 @@to NULL. If an adapter algorithm can do SMBus access, set smbus_xfer. If set to NULL, the SMBus protocol is simulated using common I2C messages */ -int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg msgs[], +int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs,int num); int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr, unsigned short flags, char read_write,
include/media/saa7146.h +1 -1
@@ -157,7 +157,7 @@/* from saa7146_i2c.c */ int saa7146_i2c_adapter_prepare (struct saa7146_dev *dev,struct i2c_adapter *i2c_adapter,u32 bitrate); -int saa7146_i2c_transfer (struct saa7146_dev *saa,const struct i2c_msg msgs[],int num,int retries); +int saa7146_i2c_transfer(struct saa7146_dev *saa, const struct *i2c_msg msgs, int num, int retries);/* from saa7146_core.c */ extern struct list_head saa7146_devices;
PATCH 1/1 I2C: S3C2410 missing I2C_CLASS_HWMON
ChangeSet 1.2109, 2005/03/02 15:02:43-08:00, [email protected]
[PATCH] I2C: S3C2410 missing I2C_CLASS_HWMON
None of the standard sensor drivers currently recognise the s3c24xx I2C controller as it does not have I2C_CLASS_HWMON set in the adapter class field.
The attached patch initialises the adapter class to I2C_CLASS_HWMON
drivers/i2c/busses/i2c-s3c2410.c | 1 + 1 files changed, 1 insertion(+)
drivers/i2c/busses/i2c-s3c2410.c +1 -0
@@ -569,6 +569,7 @@ .name = "s3c2410-i2c", .algo = &s3c24xx_i2c_algorithm, .retries = 2, + .class = I2C_CLASS_HWMON, }, };
PATCH 1/1 I2C: minor I2C cleanups
ChangeSet 1.2110, 2005/03/02 15:03:00-08:00, [email protected]
[PATCH] I2C: minor I2C cleanups
This is one in a series of patches for adding a non-blocking interface to the I2C driver for supporting the IPMI SMBus driver. This patch is a simply some minor cleanups and is in addition to the patch by Mickey Stein (http://marc.theaimsgroup.com/?l=linux-kernel&m=110919738708916&w=2).
Clean up some general I2C things. Fix some grammar and put () around all the #defines that are compound to avoid nasty side-effects.
include/linux/i2c.h | 50 +++++++++++++++++++++++++------------------------- 1 files changed, 25 insertions(+), 25 deletions(-)
include/linux/i2c.h +25 -25
@@ -187,7 +187,7 @@char name[32 ];/* textual description */ unsigned int id; -/* If an adapter algorithm can't to I2C-level access, set master_xfer +/* If an adapter algorithm can't do I2C-level access, set master_xfer to NULL. If an adapter algorithm can do SMBus access, set smbus_xfer. If set to NULL, the SMBus protocol is simulated using common I2C messages */
@@ -420,22 +420,22 @@#define I2C_FUNC_SMBUS_READ_BLOCK_DATA_PEC 0x40000000/* SMBus 2.0 */ #define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC 0x80000000/* SMBus 2.0 */ -#define I2C_FUNC_SMBUS_BYTE I2C_FUNC_SMBUS_READ_BYTE | \ - I2C_FUNC_SMBUS_WRITE_BYTE -#define I2C_FUNC_SMBUS_BYTE_DATA I2C_FUNC_SMBUS_READ_BYTE_DATA | \ - I2C_FUNC_SMBUS_WRITE_BYTE_DATA -#define I2C_FUNC_SMBUS_WORD_DATA I2C_FUNC_SMBUS_READ_WORD_DATA | \ - I2C_FUNC_SMBUS_WRITE_WORD_DATA -#define I2C_FUNC_SMBUS_BLOCK_DATA I2C_FUNC_SMBUS_READ_BLOCK_DATA | \ - I2C_FUNC_SMBUS_WRITE_BLOCK_DATA -#define I2C_FUNC_SMBUS_I2C_BLOCK I2C_FUNC_SMBUS_READ_I2C_BLOCK | \ - I2C_FUNC_SMBUS_WRITE_I2C_BLOCK -#define I2C_FUNC_SMBUS_I2C_BLOCK_2 I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 | \ - I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2 -#define I2C_FUNC_SMBUS_BLOCK_DATA_PEC I2C_FUNC_SMBUS_READ_BLOCK_DATA_PEC | \ - I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC -#define I2C_FUNC_SMBUS_WORD_DATA_PEC I2C_FUNC_SMBUS_READ_WORD_DATA_PEC | \ - I2C_FUNC_SMBUS_WRITE_WORD_DATA_PEC +#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | \ + I2C_FUNC_SMBUS_WRITE_BYTE) +#define I2C_FUNC_SMBUS_BYTE_DATA (I2C_FUNC_SMBUS_READ_BYTE_DATA | \ + I2C_FUNC_SMBUS_WRITE_BYTE_DATA) +#define I2C_FUNC_SMBUS_WORD_DATA (I2C_FUNC_SMBUS_READ_WORD_DATA | \ + I2C_FUNC_SMBUS_WRITE_WORD_DATA) +#define I2C_FUNC_SMBUS_BLOCK_DATA (I2C_FUNC_SMBUS_READ_BLOCK_DATA | \ + I2C_FUNC_SMBUS_WRITE_BLOCK_DATA) +#define I2C_FUNC_SMBUS_I2C_BLOCK (I2C_FUNC_SMBUS_READ_I2C_BLOCK | \ + I2C_FUNC_SMBUS_WRITE_I2C_BLOCK) +#define I2C_FUNC_SMBUS_I2C_BLOCK_2 (I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 | \ + I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2) +#define I2C_FUNC_SMBUS_BLOCK_DATA_PEC (I2C_FUNC_SMBUS_READ_BLOCK_DATA_PEC | \ + I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC) +#define I2C_FUNC_SMBUS_WORD_DATA_PEC (I2C_FUNC_SMBUS_READ_WORD_DATA_PEC | \ + I2C_FUNC_SMBUS_WRITE_WORD_DATA_PEC)#define I2C_FUNC_SMBUS_READ_BYTE_PEC I2C_FUNC_SMBUS_READ_BYTE_DATA#define I2C_FUNC_SMBUS_WRITE_BYTE_PEC I2C_FUNC_SMBUS_WRITE_BYTE_DATA
@@ -444,14 +444,14 @@#define I2C_FUNC_SMBUS_BYTE_PEC I2C_FUNC_SMBUS_BYTE_DATA#define I2C_FUNC_SMBUS_BYTE_DATA_PEC I2C_FUNC_SMBUS_WORD_DATA -#define I2C_FUNC_SMBUS_EMUL I2C_FUNC_SMBUS_QUICK | \ - I2C_FUNC_SMBUS_BYTE | \ - I2C_FUNC_SMBUS_BYTE_DATA | \ - I2C_FUNC_SMBUS_WORD_DATA | \ - I2C_FUNC_SMBUS_PROC_CALL | \ - I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \ - I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC | \ - I2C_FUNC_SMBUS_I2C_BLOCK +#define I2C_FUNC_SMBUS_EMUL (I2C_FUNC_SMBUS_QUICK | \ + I2C_FUNC_SMBUS_BYTE | \ + I2C_FUNC_SMBUS_BYTE_DATA | \ + I2C_FUNC_SMBUS_WORD_DATA | \ + I2C_FUNC_SMBUS_PROC_CALL | \ + I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \ + I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC | \ + I2C_FUNC_SMBUS_I2C_BLOCK)/* * Data for SMBus Messages
PATCH 1/1 Add class definition to the elektor bus driver
ChangeSet 1.2111, 2005/03/02 15:03:15-08:00, [email protected]
[PATCH] Add class definition to the elektor bus driver
Hi Frank, all,
Quoted 13 lines
Quoted 2 lines
Which bus driver are you using? It obviously lacks class declaration, so the correct fix is to add the class there.
The modules that are loading are (in reverse order):
adm1031 ad5321 mic184 pca9540 i2c_sensor i2c_elektor i2c_algo_pcf i2c_core
Quoted 2 lines
So I believe what you are asking for is the
i2c_elektordriver for the PCF8584 ISA to I2C chip.
Correct, I just checked and this one actually lacks its class. Patch follows.
This patch adds a class definition to the elektor i2c bus driver. Without this definition, hardware monitoring chips located on such busses cannot possibly be driven.
drivers/i2c/busses/i2c-elektor.c | 1 + 1 files changed, 1 insertion(+)
drivers/i2c/busses/i2c-elektor.c +1 -0
@@ -183,6 +183,7 @@static struct i2c_adapter pcf_isa_ops = { .owner =THIS_MODULE , + .class =I2C_CLASS_HWMON , .id =I2C_HW_P_ELEK , .algo_data = &pcf_isa_data, .name ="PCF8584 ISA adapter" ,
PATCH 1/1 I2C: saa7146 build fix
ChangeSet 1.2112, 2005/03/02 15:03:32-08:00, [email protected]
[PATCH] I2C: saa7146 build fix
include/media/saa7146.h:160: parse error before `*' include/media/saa7146.h:160: warning: function declaration isn't a prototype
include/media/saa7146.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
include/media/saa7146.h +1 -1
@@ -157,7 +157,7 @@/* from saa7146_i2c.c */ int saa7146_i2c_adapter_prepare (struct saa7146_dev *dev,struct i2c_adapter *i2c_adapter,u32 bitrate); -int saa7146_i2c_transfer(struct saa7146_dev *saa, const struct *i2c_msg msgs, int num, int retries); +int saa7146_i2c_transfer (struct saa7146_dev *saa,const struct i2c_msg *msgs,int num,int retries);/* from saa7146_core.c */ extern struct list_head saa7146_devices;
PATCH 1/1 I2C: w83627hf needs i2c-isa
ChangeSet 1.2113, 2005/03/02 15:03:48-08:00, [email protected]
[PATCH] I2C: w83627hf needs i2c-isa
The w83627hf driver is useless unless i2c-isa is present. All other drivers in this case do select I2C_ISA through Kconfig, so this one should as well do.
drivers/i2c/chips/Kconfig | 1 + 1 files changed, 1 insertion(+)
drivers/i2c/chips/Kconfig +1 -0
@@ -338,6 +338,7 @@ tristate "Winbond W83627HF, W83627THF, W83637HF, W83697HF" depends on I2C && EXPERIMENTAL select I2C_SENSOR + select I2C_ISA help If you say yes here you get support for the Winbond W836X7 series of sensor chips: the W83627HF, W83627THF, W83637HF, and the W83697HF
PATCH 1/1 I2C: fixed up the i2c-id.h algo ids.
ChangeSet 1.2114, 2005/03/02 15:50:42-08:00, [email protected]
[PATCH] I2C: fixed up the i2c-id.h algo ids.
Thanks to Jean Delvare <[email protected]> for the help with this.
include/linux/i2c-id.h | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-)
include/linux/i2c-id.h +9 -6
@@ -20,8 +20,6 @@Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* ------------------------------------------------------------------------- */ -/* $Id: i2c-id.h,v 1.68 2003/02/25 02:55:18 mds Exp $ */ -#ifndef LINUX_I2C_ID_H #define LINUX_I2C_ID_H
@@ -196,11 +194,15 @@#define I2C_ALGO_OCP 0x120000/* IBM or otherwise On-chip I2C algorithm */ #define I2C_ALGO_BITHS 0x130000/* enhanced bit style adapters */ #define I2C_ALGO_IOP3XX 0x140000/* XSCALE IOP3XX On-chip I2C alg */ -#define I2C_ALGO_PCA 0x150000/* PCA 9564 style adapters */ -#define I2C_ALGO_SIBYTE 0x150000/* Broadcom SiByte SOCs */ -#define I2C_ALGO_SGI 0x160000/* SGI algorithm */ -#define I2C_ALGO_AU1550 0x170000/* Au1550 PSC algorithm */ +#define I2C_ALGO_SGI 0x160000/* SGI algorithm */ + +#define I2C_ALGO_USB 0x170000/* USB algorithm */ +#define I2C_ALGO_VIRT 0x180000/* Virtual bus adapter */ + +#define I2C_ALGO_MV64XXX 0x190000/* Marvell mv64xxx i2c ctlr */ +#define I2C_ALGO_PCA 0x1a0000/* PCA 9564 style adapters */ +#define I2C_ALGO_AU1550 0x1b0000/* Au1550 PSC algorithm */ #define I2C_ALGO_EXP 0x800000/* experimental */
@@ -240,6 +242,7 @@#define I2C_HW_B_IXP4XX 0x17/* GPIO on IXP4XX systems */ #define I2C_HW_B_S3VIA 0x18/* S3Via ProSavage adapter */ #define I2C_HW_B_ZR36067 0x19/* Zoran-36057/36067 based boards */ +#define I2C_HW_B_PCILYNX 0x1a/* TI PCILynx I2C adapter */ #define I2C_HW_B_CX2388x 0x1b/* connexant 2388x based tv cards */ /* --- PCF 8584 based algorithms */
PATCH 1/1 I2C: Change of i2c co-maintainer
ChangeSet 1.2115, 2005/03/02 16:13:14-08:00, [email protected]
[PATCH] I2C: Change of i2c co-maintainer
Since I am working more actively than Philip (or anyone else, for that matter) on the i2c subsystem these days, it would probably make sense that I am listed as the co-maintainer instead of him.
MAINTAINERS | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
MAINTAINERS +2 -2
@@ -991,8 +991,8 @@ I2C AND SENSORS DRIVERS P: Greg Kroah-Hartman M: [email protected] -P: Philip Edelbrock -M: [email protected] +P: Jean Delvare +M: [email protected] L: [email protected] W: http://www.lm-sensors.nu/ S: Maintained
PATCH 1/1 I2C: Trivial indentation fix in i2c/chips/Kconfig
ChangeSet 1.2116, 2005/03/02 16:13:45-08:00, [email protected]
[PATCH] I2C: Trivial indentation fix in i2c/chips/Kconfig
Hi Greg,
Quoting myself:
Quoted 3 lines
(...) I also think I see an indentation issue on the "tristate" line, seemingly copied from the
SENSORS_DS1621section which would need to be fixed as well.
Here is the trivial patch fixing that, if you want to apply it.
drivers/i2c/chips/Kconfig | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/chips/Kconfig +1 -1
@@ -63,7 +63,7 @@ will be called asb100. config SENSORS_DS1621 - tristate "Dallas Semiconductor DS1621 and DS1625" + tristate "Dallas Semiconductor DS1621 and DS1625" depends on I2C && EXPERIMENTAL select I2C_SENSOR help
Re: [PATCH] I2C: Fix some gcc 4.0 compile failures and warnings
In reply to Greg KHQuoted 341 lines · Greg KH
ChangeSet 1.2108, 2005/03/02 15:02:27-08:00, [email protected]
[PATCH] I2C: Fix some gcc 4.0 compile failures and warnings
gcc 4.0.x cvs seems to dislike "
include/linux/i2c.hfile" and others due to a current gcc 4.0.x change having to do with array declarations.Example error msg: include/linux/i2c.h:{55,194} error: array type has
incomplete element typeA. Daplas has recently done a workaround for this on another header file. A thread discussing this can be found by following the link below:
http://gcc.gnu.org/ml/gcc/2005-02/msg00053.html
The patch changes the
array(struct i2c_msg)declaration used by*i2c_transferand*master_xferfrom "structi2c_msgmsg[]" format to "structi2c_msg*msg".After some grepping, I came up with about a dozen files that used the format disliked by gcc4 that're addressed by the attached patch. Tested on gcc 3.x & gcc 4.x by configuring kernel with all i2c switches enabled as module, and saw no errors or warnings in i2c.
Signed-off-by Mickey Stein <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>Documentation/i2c/writing-clients | 2 +- drivers/i2c/algos/i2c-algo-ite.c | 4 ++-- drivers/i2c/algos/i2c-algo-pca.c | 2 +- drivers/i2c/algos/i2c-algo-pcf.c | 2 +- drivers/i2c/algos/i2c-algo-sgi.c | 2 +- drivers/i2c/busses/i2c-au1550.c | 2 +- drivers/i2c/busses/i2c-ibm_iic.c | 2 +- drivers/i2c/busses/i2c-iop3xx.c | 2 +- drivers/i2c/busses/i2c-keywest.c | 2 +- drivers/i2c/busses/i2c-mpc.c | 2 +- drivers/i2c/busses/i2c-s3c2410.c | 4 ++-- drivers/i2c/i2c-core.c | 2 +- drivers/media/common/saa7146_i2c.c | 8 ++++---- drivers/media/dvb/b2c2/skystar2.c | 2 +- drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c | 2 +- drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 2 +- drivers/media/video/bttv-i2c.c | 2 +- drivers/media/video/saa7134/saa7134-i2c.c | 2 +- include/linux/i2c.h | 4 ++-- include/media/saa7146.h | 2 +- 20 files changed, 26 insertions(+), 26 deletions(-)diff -Nru a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients
Documentation/i2c/writing-clients +0
-0@@ -638,7 +638,7 @@parameter contains the bytes the read/write, the third the length of the buffer. Returned is the actual number of bytes read/written.
Documentation/i2c/writing-clients +1
-1- extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], + extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num);This sends a series of messages. Each message can be a read or write, diff -Nru
a/drivers/i2c/algos/i2c-algo-ite.cb/drivers/i2c/algos/i2c-algo-ite.cdrivers/i2c/algos/i2c-algo-ite.c +2
-2@@ -490,7 +490,7 @@* condition. */ #if 0 -static int iic_combined_transaction (struct i2c_adapter *i2c_adap,struct i2c_msg msgs[],int num) +static int iic_combined_transaction (struct i2c_adapter *i2c_adap,struct i2c_msg *msgs,int num) {int i;struct i2c_msg *pmsg;@@ -600,7 +600,7 @@* verify that the bus is not busy or in some unknown state. */ static int iic_xfer (struct i2c_adapter *i2c_adap, -struct i2c_msg msgs[], +struct i2c_msg *msgs,int num) {struct i2c_algo_iic_data *adap = i2c_adap->algo_data;diff -Nru
a/drivers/i2c/algos/i2c-algo-pca.cb/drivers/i2c/algos/i2c-algo-pca.cdrivers/i2c/algos/i2c-algo-pca.c +1
-1@@ -178,7 +178,7 @@ }static int pca_xfer (struct i2c_adapter *i2c_adap, -struct i2c_msg msgs[], +struct i2c_msg *msgs,int num) {struct i2c_algo_pca_data *adap = i2c_adap->algo_data;diff -Nru
a/drivers/i2c/algos/i2c-algo-pcf.cb/drivers/i2c/algos/i2c-algo-pcf.cdrivers/i2c/algos/i2c-algo-pcf.c +1
-1@@ -332,7 +332,7 @@ }static int pcf_xfer (struct i2c_adapter *i2c_adap, -struct i2c_msg msgs[], +struct i2c_msg *msgs,int num) {struct i2c_algo_pcf_data *adap = i2c_adap->algo_data;diff -Nru
a/drivers/i2c/algos/i2c-algo-sgi.cb/drivers/i2c/algos/i2c-algo-sgi.cdrivers/i2c/algos/i2c-algo-sgi.c +1
-1@@ -131,7 +131,7 @@return 0 ; } -static int sgi_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg msgs[], +static int sgi_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg *msgs,int num) {struct i2c_algo_sgi_data *adap = i2c_adap->algo_data;diff -Nru
a/drivers/i2c/busses/i2c-au1550.cb/drivers/i2c/busses/i2c-au1550.cdrivers/i2c/busses/i2c-au1550.c +0
-0@@ -253,7 +253,7 @@ }static int
drivers/i2c/busses/i2c-au1550.c +1
-1-au1550_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num) +au1550_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num){ struct i2c_au1550_data *adap = i2c_adap->algo_data; struct i2c_msg *p;diff -Nru
a/drivers/i2c/busses/i2c-ibm_iic.cb/drivers/i2c/busses/i2c-ibm_iic.cdrivers/i2c/busses/i2c-ibm_iic.c +1
-1@@ -549,7 +549,7 @@* Generic master transfer entrypoint. * Returns the number of processed messages or error (<0) */ -static int iic_xfer (struct i2c_adapter *adap,struct i2c_msg msgs[],int num) +static int iic_xfer (struct i2c_adapter *adap,struct i2c_msg *msgs,int num) {struct ibm_iic_private * dev = (struct ibm_iic_private *)(i2c_get_adapdata (adap));volatile struct iic_regs __iomem *iic = dev->vaddr;diff -Nru
a/drivers/i2c/busses/i2c-iop3xx.cb/drivers/i2c/busses/i2c-iop3xx.cdrivers/i2c/busses/i2c-iop3xx.c +0
-0@@ -361,7 +361,7 @@* master_xfer() - main read/write entry */ static int
drivers/i2c/busses/i2c-iop3xx.c +1
-1-iop3xx_i2c_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], +iop3xx_i2c_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs,int num)
{ struct i2c_algo_iop3xx_data *iop3xx_adap = i2c_adap->algo_data;diff -Nru
a/drivers/i2c/busses/i2c-keywest.cb/drivers/i2c/busses/i2c-keywest.cdrivers/i2c/busses/i2c-keywest.c +0
-0@@ -399,7 +399,7 @@*/ static int
keywest_xfer( structi2c_adapter*adap,drivers/i2c/busses/i2c-keywest.c +1
-1- struct i2c_msg msgs[], + struct i2c_msg *msgs,int num)
{ struct keywest_chan* chan = i2c_get_adapdata(adap);diff -Nru
a/drivers/i2c/busses/i2c-mpc.cb/drivers/i2c/busses/i2c-mpc.cdrivers/i2c/busses/i2c-mpc.c +1
-1@@ -233,7 +233,7 @@return length; } -static int mpc_xfer (struct i2c_adapter *adap,struct i2c_msg msgs[],int num) +static int mpc_xfer (struct i2c_adapter *adap,struct i2c_msg *msgs,int num) {struct i2c_msg *pmsg;int i;diff -Nru
a/drivers/i2c/busses/i2c-s3c2410.cb/drivers/i2c/busses/i2c-s3c2410.cdrivers/i2c/busses/i2c-s3c2410.c +2
-2@@ -483,7 +483,7 @@* this starts an i2c transfer */ -static int s3c24xx_i2c_doxfer (struct s3c24xx_i2c *i2c,struct i2c_msg msgs[],int num) +static int s3c24xx_i2c_doxfer (struct s3c24xx_i2c *i2c,struct i2c_msg *msgs,int num) {unsigned long timeout;int ret;@@ -534,7 +534,7 @@*/ static int s3c24xx_i2c_xfer (struct i2c_adapter *adap, -struct i2c_msg msgs[],int num) +struct i2c_msg *msgs,int num) {struct s3c24xx_i2c *i2c = (struct s3c24xx_i2c *)adap->algo_data;int retry;diff -Nru
a/drivers/i2c/i2c-core.cb/drivers/i2c/i2c-core.cdrivers/i2c/i2c-core.c +1
-1@@ -582,7 +582,7 @@* ---------------------------------------------------- */ -int i2c_transfer (struct i2c_adapter * adap,struct i2c_msg msgs[],int num) +int i2c_transfer (struct i2c_adapter * adap,struct i2c_msg *msgs,int num) {int ret;diff -Nru
a/drivers/media/common/saa7146_i2c.cb/drivers/media/common/saa7146_i2c.cdrivers/media/common/saa7146_i2c.c +4
-4@@ -25,7 +25,7 @@sent through the saa7146. have a look at the specifications p. 122 ff to understand this. it returns the number of u32s to send, or -1 in case of an error. */ -static int saa7146_i2c_msg_prepare (const struct i2c_msg m[],int num,u32 *op) +static int saa7146_i2c_msg_prepare (const struct i2c_msg *m,int num,u32 *op) {int h1, h2;int i, j, addr;@@ -89,7 +89,7 @@which bytes were read through the adapter and write them back to the corresponding i2c-message. but instead, we simply write back all bytes. fixme: this could be improved. */ -static int saa7146_i2c_msg_cleanup (const struct i2c_msg m[],int num,u32 *op) +static int saa7146_i2c_msg_cleanup (const struct i2c_msg *m,int num,u32 *op) {int i, j;int op_count =0 ;@@ -272,7 +272,7 @@return 0 ; } -int saa7146_i2c_transfer (struct saa7146_dev *dev,const struct i2c_msg msgs[],int num,int retries) +int saa7146_i2c_transfer (struct saa7146_dev *dev,const struct i2c_msg *msgs,int num,int retries) {int i =0 , count =0 ;u32 * buffer = dev->d_i2c.cpu_addr;@@ -372,7 +372,7 @@ }/* utility functions */ -static int saa7146_i2c_xfer (struct i2c_adapter * adapter,struct i2c_msg msg[],int num) +static int saa7146_i2c_xfer (struct i2c_adapter * adapter,struct i2c_msg *msg,int num) {struct saa7146_dev * dev =i2c_get_adapdata (adapter);diff -Nru
a/drivers/media/dvb/b2c2/skystar2.cb/drivers/media/dvb/b2c2/skystar2.cdrivers/media/dvb/b2c2/skystar2.c +1
-1@@ -293,7 +293,7 @@return buf - start; } -static int master_xfer (struct i2c_adapter * adapter,struct i2c_msg msgs[],int num) +static int master_xfer (struct i2c_adapter * adapter,struct i2c_msg *msgs,int num) {struct adapter *tmp =i2c_get_adapdata (adapter);int i, ret =0 ;diff -Nru
a/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.cb/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.cdrivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c +1
-1@@ -38,7 +38,7 @@/* * I2C master xfer function */ -static int dibusb_i2c_xfer (struct i2c_adapter *adap,struct i2c_msg msg[],int num) +static int dibusb_i2c_xfer (struct i2c_adapter *adap,struct i2c_msg *msg,int num) {struct usb_dibusb *dib =i2c_get_adapdata (adap);int i;diff -Nru
a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.cb/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.cdrivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +1
-1@@ -252,7 +252,7 @@return rcv_len; } -static int master_xfer (struct i2c_adapter * adapter,struct i2c_msg msg[],int num) +static int master_xfer (struct i2c_adapter * adapter,struct i2c_msg *msg,int num) {struct ttusb *ttusb =i2c_get_adapdata (adapter);int i =0 ;diff -Nru
a/drivers/media/video/bttv-i2c.cb/drivers/media/video/bttv-i2c.cdrivers/media/video/bttv-i2c.c +1
-1@@ -245,7 +245,7 @@return retval; } -static int bttv_i2c_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg msgs[],int num) +static int bttv_i2c_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg *msgs,int num) {struct bttv *btv =i2c_get_adapdata (i2c_adap);int retval =0 ;diff -Nru
a/drivers/media/video/saa7134/saa7134-i2c.cb/drivers/media/video/saa7134/saa7134-i2c.cdrivers/media/video/saa7134/saa7134-i2c.c +1
-1@@ -236,7 +236,7 @@ }static int saa7134_i2c_xfer (struct i2c_adapter *i2c_adap, -struct i2c_msg msgs[],int num) +struct i2c_msg *msgs,int num) {struct saa7134_dev *dev = i2c_adap->algo_data;enum i2c_status status;diff -Nru
a/include/linux/i2c.hb/include/linux/i2c.hinclude/linux/i2c.h +2
-2@@ -55,7 +55,7 @@/* Transfer num messages. */ -extern int i2c_transfer (struct i2c_adapter *adap,struct i2c_msg msg[],int num); +extern int i2c_transfer (struct i2c_adapter *adap,struct i2c_msg *msgs,int num);/* * Some adapter types (i.e. PCF 8584 based ones) may support slave behaviuor. @@ -191,7 +191,7 @@to NULL. If an adapter algorithm can do SMBus access, set smbus_xfer. If set to NULL, the SMBus protocol is simulated using common I2C messages */ -int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg msgs[], +int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs,int num); int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr, unsigned short flags, char read_write,diff -Nru
a/include/media/saa7146.hb/include/media/saa7146.h
include/media/saa7146.h line 163
Quoted 8 lines
include/media/saa7146.h +1
-1@@ -157,7 +157,7 @@/* from saa7146_i2c.c */ int saa7146_i2c_adapter_prepare (struct saa7146_dev *dev,struct i2c_adapter *i2c_adapter,u32 bitrate); -int saa7146_i2c_transfer (struct saa7146_dev *saa,const struct i2c_msg msgs[],int num,int retries); +int saa7146_i2c_transfer(struct saa7146_dev *saa, const struct *i2c_msg msgs, int num, int retries);/* from saa7146_core.c */ extern struct list_head saa7146_devices;
Greg,
I was just scanning this email and it looks like you possibly grabbed the first of my patches with a typo because this last little bit I corrected in a prior email to you. It got into the *mm* tree ok. So I'm not sure where this took a wrong turn again.
Its the very last bit of the above patch on saa7146.h, where I'd at first mistakenly managed to
change struct i2c_msg msgs[] to struct *i2c_msg msgs, when it should have been changed to
struct i2c_msg *msgs as below. (Its just a cut and paste below, so it might be easier if you just typed it into whatever version you've got now.
If its left uncorrected it'd give some sort of compiler error (to say the least).
Thanks very much,
Mick
---
include/media/saa7146.h +0 -0
@@ -157,7 +157,7 @@
/* from saa7146_i2c.c */
int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c_adapter, u32 bitrate); -int saa7146_i2c_transfer(struct saa7146_dev *saa, const struct i2c_msg msgs[], int num, int retries); +int saa7146_i2c_transfer(struct saa7146_dev *saa, const struct i2c_msg *msgs, int num, int retries);
/* from saa7146_core.c */
extern struct list_head saa7146_devices;
PS: I'm headed out of town for a week, and the above is only a cut&paste, so the correct patch is attached here once more.
include/linux/i2c.h renamed from include/linux/i2c.h.sav +2 -2
@@ -55,7 +55,7 @@/* Transfer num messages. */ -extern int i2c_transfer (struct i2c_adapter *adap,struct i2c_msg msg[],int num); +extern int i2c_transfer (struct i2c_adapter *adap,struct i2c_msg *msgs,int num);/* * Some adapter types (i.e. PCF 8584 based ones) may support slave behaviuor.
@@ -194,7 +194,7 @@to NULL. If an adapter algorithm can do SMBus access, set smbus_xfer. If set to NULL, the SMBus protocol is simulated using common I2C messages */ -int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg msgs[], +int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs,int num); int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr, unsigned short flags, char read_write,
drivers/i2c/busses/i2c-iop3xx.c renamed from drivers/i2c/busses/i2c-iop3xx.c.sav +1 -1
@@ -361,7 +361,7 @@* master_xfer() - main read/write entry */ static int -iop3xx_i2c_master_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg msgs[], +iop3xx_i2c_master_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg *msgs,int num) {struct i2c_algo_iop3xx_data *iop3xx_adap = i2c_adap->algo_data;
drivers/i2c/i2c-core.c renamed from drivers/i2c/i2c-core.c.sav +1 -1
@@ -583,7 +583,7 @@* ---------------------------------------------------- */ -int i2c_transfer (struct i2c_adapter * adap,struct i2c_msg msgs[],int num) +int i2c_transfer (struct i2c_adapter * adap,struct i2c_msg *msgs,int num) {int ret;
drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c renamed from drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c.sav +1 -1
@@ -252,7 +252,7 @@return rcv_len; } -static int master_xfer (struct i2c_adapter * adapter,struct i2c_msg msg[],int num) +static int master_xfer (struct i2c_adapter * adapter,struct i2c_msg *msg,int num) {struct ttusb *ttusb =i2c_get_adapdata (adapter);int i =0 ;
drivers/media/dvb/b2c2/skystar2.c renamed from drivers/media/dvb/b2c2/skystar2.c.sav +1 -1
@@ -293,7 +293,7 @@return buf - start; } -static int master_xfer (struct i2c_adapter * adapter,struct i2c_msg msgs[],int num) +static int master_xfer (struct i2c_adapter * adapter,struct i2c_msg *msgs,int num) {struct adapter *tmp =i2c_get_adapdata (adapter);int i, ret =0 ;
Documentation/i2c/writing-clients renamed from Documentation/i2c/writing-clients.sav +1 -1
@@ -642,7 +642,7 @@ parameter contains the bytes the read/write, the third the length of the buffer. Returned is the actual number of bytes read/written. - extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], + extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num); This sends a series of messages. Each message can be a read or write,
include/media/saa7146.h renamed from include/media/saa7146.h.sav +1 -1
@@ -157,7 +157,7 @@/* from saa7146_i2c.c */ int saa7146_i2c_adapter_prepare (struct saa7146_dev *dev,struct i2c_adapter *i2c_adapter,u32 bitrate); -int saa7146_i2c_transfer (struct saa7146_dev *saa,const struct i2c_msg msgs[],int num,int retries); +int saa7146_i2c_transfer (struct saa7146_dev *saa,const struct i2c_msg *msgs,int num,int retries);/* from saa7146_core.c */ extern struct list_head saa7146_devices;
drivers/i2c/busses/i2c-s3c2410.c renamed from drivers/i2c/busses/i2c-s3c2410.c.sav +2 -2
@@ -483,7 +483,7 @@* this starts an i2c transfer */ -static int s3c24xx_i2c_doxfer (struct s3c24xx_i2c *i2c,struct i2c_msg msgs[],int num) +static int s3c24xx_i2c_doxfer (struct s3c24xx_i2c *i2c,struct i2c_msg *msgs,int num) {unsigned long timeout;int ret;
@@ -534,7 +534,7 @@*/ static int s3c24xx_i2c_xfer (struct i2c_adapter *adap, -struct i2c_msg msgs[],int num) +struct i2c_msg *msgs,int num) {struct s3c24xx_i2c *i2c = (struct s3c24xx_i2c *)adap->algo_data;int retry;
drivers/i2c/busses/i2c-mpc.c renamed from drivers/i2c/busses/i2c-mpc.c.sav +1 -1
@@ -233,7 +233,7 @@return length; } -static int mpc_xfer (struct i2c_adapter *adap,struct i2c_msg msgs[],int num) +static int mpc_xfer (struct i2c_adapter *adap,struct i2c_msg *msgs,int num) {struct i2c_msg *pmsg;int i;
drivers/i2c/busses/i2c-ibm_iic.c renamed from drivers/i2c/busses/i2c-ibm_iic.c.sav +1 -1
@@ -549,7 +549,7 @@* Generic master transfer entrypoint. * Returns the number of processed messages or error (<0) */ -static int iic_xfer (struct i2c_adapter *adap,struct i2c_msg msgs[],int num) +static int iic_xfer (struct i2c_adapter *adap,struct i2c_msg *msgs,int num) {struct ibm_iic_private * dev = (struct ibm_iic_private *)(i2c_get_adapdata (adap));volatile struct iic_regs __iomem *iic = dev->vaddr;
drivers/i2c/busses/i2c-keywest.c renamed from drivers/i2c/busses/i2c-keywest.c.sav +1 -1
@@ -399,7 +399,7 @@*/ static int keywest_xfer (struct i2c_adapter *adap, -struct i2c_msg msgs[], +struct i2c_msg *msgs,int num) {struct keywest_chan * chan =i2c_get_adapdata (adap);
drivers/i2c/busses/i2c-au1550.c renamed from drivers/i2c/busses/i2c-au1550.c.sav +1 -1
@@ -253,7 +253,7 @@ }static int -au1550_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg msgs[],int num) +au1550_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg *msgs,int num) {struct i2c_au1550_data *adap = i2c_adap->algo_data;struct i2c_msg *p;
drivers/i2c/algos/i2c-algo-pca.c renamed from drivers/i2c/algos/i2c-algo-pca.c.sav +1 -1
@@ -178,7 +178,7 @@ }static int pca_xfer (struct i2c_adapter *i2c_adap, -struct i2c_msg msgs[], +struct i2c_msg *msgs,int num) {struct i2c_algo_pca_data *adap = i2c_adap->algo_data;
drivers/i2c/algos/i2c-algo-pcf.c renamed from drivers/i2c/algos/i2c-algo-pcf.c.sav +1 -1
@@ -332,7 +332,7 @@ }static int pcf_xfer (struct i2c_adapter *i2c_adap, -struct i2c_msg msgs[], +struct i2c_msg *msgs,int num) {struct i2c_algo_pcf_data *adap = i2c_adap->algo_data;
drivers/i2c/algos/i2c-algo-ite.c renamed from drivers/i2c/algos/i2c-algo-ite.c.sav +2 -2
@@ -490,7 +490,7 @@* condition. */ #if 0 -static int iic_combined_transaction (struct i2c_adapter *i2c_adap,struct i2c_msg msgs[],int num) +static int iic_combined_transaction (struct i2c_adapter *i2c_adap,struct i2c_msg *msgs,int num) {int i;struct i2c_msg *pmsg;
@@ -600,7 +600,7 @@* verify that the bus is not busy or in some unknown state. */ static int iic_xfer (struct i2c_adapter *i2c_adap, -struct i2c_msg msgs[], +struct i2c_msg *msgs,int num) {struct i2c_algo_iic_data *adap = i2c_adap->algo_data;
drivers/i2c/algos/i2c-algo-sgi.c renamed from drivers/i2c/algos/i2c-algo-sgi.c.sav +1 -1
@@ -131,7 +131,7 @@return 0 ; } -static int sgi_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg msgs[], +static int sgi_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg *msgs,int num) {struct i2c_algo_sgi_data *adap = i2c_adap->algo_data;
drivers/media/video/saa7134/saa7134-i2c.c renamed from drivers/media/video/saa7134/saa7134-i2c.c.sav +1 -1
@@ -236,7 +236,7 @@ }static int saa7134_i2c_xfer (struct i2c_adapter *i2c_adap, -struct i2c_msg msgs[],int num) +struct i2c_msg *msgs,int num) {struct saa7134_dev *dev = i2c_adap->algo_data;enum i2c_status status;
drivers/media/video/bttv-i2c.c renamed from drivers/media/video/bttv-i2c.c.sav +1 -1
@@ -245,7 +245,7 @@return retval; } -static int bttv_i2c_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg msgs[],int num) +static int bttv_i2c_xfer (struct i2c_adapter *i2c_adap,struct i2c_msg *msgs,int num) {struct bttv *btv =i2c_get_adapdata (i2c_adap);int retval =0 ;
drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c renamed from drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c.sav +1 -1
@@ -38,7 +38,7 @@/* * I2C master xfer function */ -static int dibusb_i2c_xfer (struct i2c_adapter *adap,struct i2c_msg msg[],int num) +static int dibusb_i2c_xfer (struct i2c_adapter *adap,struct i2c_msg *msg,int num) {struct usb_dibusb *dib =i2c_get_adapdata (adap);int i;
drivers/media/common/saa7146_i2c.c renamed from drivers/media/common/saa7146_i2c.c.sav +4 -4
@@ -25,7 +25,7 @@sent through the saa7146. have a look at the specifications p. 122 ff to understand this. it returns the number of u32s to send, or -1 in case of an error. */ -static int saa7146_i2c_msg_prepare (const struct i2c_msg m[],int num,u32 *op) +static int saa7146_i2c_msg_prepare (const struct i2c_msg *m,int num,u32 *op) {int h1, h2;int i, j, addr;
@@ -89,7 +89,7 @@which bytes were read through the adapter and write them back to the corresponding i2c-message. but instead, we simply write back all bytes. fixme: this could be improved. */ -static int saa7146_i2c_msg_cleanup (const struct i2c_msg m[],int num,u32 *op) +static int saa7146_i2c_msg_cleanup (const struct i2c_msg *m,int num,u32 *op) {int i, j;int op_count =0 ;
@@ -272,7 +272,7 @@return 0 ; } -int saa7146_i2c_transfer (struct saa7146_dev *dev,const struct i2c_msg msgs[],int num,int retries) +int saa7146_i2c_transfer (struct saa7146_dev *dev,const struct i2c_msg *msgs,int num,int retries) {int i =0 , count =0 ;u32 * buffer = dev->d_i2c.cpu_addr;
@@ -372,7 +372,7 @@ }/* utility functions */ -static int saa7146_i2c_xfer (struct i2c_adapter * adapter,struct i2c_msg msg[],int num) +static int saa7146_i2c_xfer (struct i2c_adapter * adapter,struct i2c_msg *msg,int num) {struct saa7146_dev * dev =i2c_get_adapdata (adapter);
Re: [PATCH] I2C: Fix some gcc 4.0 compile failures and warnings
Quoted 4 lines · Mickey Stein
I was just scanning this email and it looks like you possibly grabbed the first of my patches with a typo because this last little bit I
corrected in a prior email to you. It got into the *mm* tree ok.
So I'm not sure where this took a wrong turn again.
You missed the follow-on patch that fixed this up :)
thanks,
greg k-h
Re: [RFQ] Rules for accepting patches into the linux-releases tree
In reply to Greg KHHow does this fit into Rusty's trivial patch bot? This process will fold that into a formal method now?
Shawn.
Quoted 29 lines
List: linux-kernel Subject: [RFQ] Rules for accepting patches into the linux-releases tree From: Greg KH <greg () kroah ! com> Date: 2005-03-04 22:21:46 Message-ID: <20050304222146.GA1686 () kroah ! com>[Download message RAW]
Anything else anyone can think of? Any objections to any of these? I based them off of Linus's original list.
thanks,
greg k-h
------
Rules on what kind of patches are accepted, and what ones are not, into the "linux-release" tree.
- It can not bigger than 100 lines, with context.
- It must fix only one thing.
- It must fix a real bug that bothers people (not a, "This could be a problem..." type thing.)
- It must fix a problem that causes a build error (but not for things markedCONFIG_BROKEN), an oops, a hang, or a real security issue.
- No "theoretical race condition" issues, unless an explanation of how the race can be exploited.
- It can not contain any "trivial" fixes in it (spelling changes, whitespace cleanups, etc.)
Re: [RFQ] Rules for accepting patches into the linux-releases tree
Quoted 3 lines · Shawn Starr
How does this fit into Rusty's trivial patch bot? This process will fold that into a formal method now?
Shawn.
Nope, no comparison or interaction really. x.y (linux-release) isn't meant for trivial patches at all, whereas trivial isn't meant for critical patches either.
Quoted 30 lines
Quoted 30 lines
List: linux-kernel Subject: [RFQ] Rules for accepting patches into the linux-releases tree From: Greg KH <greg () kroah ! com> Date: 2005-03-04 22:21:46 Message-ID: <20050304222146.GA1686 () kroah ! com>[Download message RAW]
Anything else anyone can think of? Any objections to any of these? I based them off of Linus's original list.
thanks,
greg k-h
------
Rules on what kind of patches are accepted, and what ones are not, into the "linux-release" tree.
- It can not bigger than 100 lines, with context.
- It must fix only one thing.
- It must fix a real bug that bothers people (not a, "This could be a problem..." type thing.)
- It must fix a problem that causes a build error (but not for things markedCONFIG_BROKEN), an oops, a hang, or a real security issue.
- No "theoretical race condition" issues, unless an explanation of how the race can be exploited.
- It can not contain any "trivial" fixes in it (spelling changes, whitespace cleanups, etc.)
Signature · 1 line
~Randy
Re: [RFQ] Rules for accepting patches into the linux-releases tree
In reply to Shawn StarrQuoted 2 lines · Shawn Starr
How does this fit into Rusty's trivial patch bot? This process will fold that into a formal method now?
The last rule explicitly states that the linux-release tree will _not_ be accepting patches that are acceptable to the trivial-patch-monkey.
thanks,
greg k-h
[2.6.11.5][BUILD] i2c.h breakage in 2.6.12-rc1 + -mm only
In reply to Greg KHinclude/linux/i2c.h:58: error: array type has incomplete element type include/linux/i2c.h:197: error: array type has incomplete element type /usr/local/src/sources/r300_driver/drm/linux-core/radeon_drv.h:274: confused by earlier errors, bailing out
I see further back you fed the gcc 4.0 compile fixes to akpm for this, can this be merged in to 2.6.11.6?
Thanks,
Shawn.
Re: [2.6.11.5][BUILD] i2c.h breakage in 2.6.12-rc1 + -mm only
Quoted 3 lines · Shawn Starr
include/linux/i2c.h:58: error: array type has incomplete element typeinclude/linux/i2c.h:197: error: array type has incomplete element type/usr/local/src/sources/r300_driver/drm/linux-core/radeon_drv.h:274: confused by earlier errors, bailing out
Woah, that's you trying to build an out-of-the-kernel-tree driver? Seems like it needs to be fixed up :)
Quoted 2 lines
I see further back you fed the gcc 4.0 compile fixes to akpm for this, can this be merged in to 2.6.11.6?
Why? It's not needed for 2.6.11. Builds with compiler versions that are not even yet released are not -stable acceptable patches, sorry.
thanks,
greg k-h
Hi Greg,
Quoted 3 lines
Here is a I2C update for 2.6.11. It includes a number of fixes, and some new i2c drivers. All of these patches have been in the past few -mm releases.
I checked against my own list of patches and found that I have two more, which were posted to the sensors and kernel-janitors list in early february:
http://archives.andrew.net.au/lm-sensors/msg29340.html
http://archives.andrew.net.au/lm-sensors/msg29342.html
They never made it to your own i2c tree, nor Andrew's tree. What do we want to do with these?
Thanks,
Signature · 1 line
Jean Delvare
Quoted 6 lines · Jean Delvare
Hi Greg,
Quoted 3 lines
Here is a I2C update for 2.6.11. It includes a number of fixes, and some new i2c drivers. All of these patches have been in the past few -mm releases.
Quoted 8 lines
I checked against my own list of patches and found that I have two more, which were posted to the sensors and kernel-janitors list in early february:
http://archives.andrew.net.au/lm-sensors/msg29340.html
http://archives.andrew.net.au/lm-sensors/msg29342.htmlThey never made it to your own i2c tree, nor Andrew's tree. What do we want to do with these?
They should show up in the -kj tree, right? That will make it to the -mm tree, and then the kernel janitor maintainer will split them up and send them to me and you.
Or Nish can get frustrated at how long the whole process is taking, and just resend them again :)
thanks,
greg k-h
Quoted 13 lines · Greg KH
Quoted 12 lines · Jean Delvare
Hi Greg,
Quoted 3 lines
Here is a I2C update for 2.6.11. It includes a number of fixes, and some new i2c drivers. All of these patches have been in the past few -mm releases.
I checked against my own list of patches and found that I have two more, which were posted to the sensors and kernel-janitors list in early february:
http://archives.andrew.net.au/lm-sensors/msg29340.html
http://archives.andrew.net.au/lm-sensors/msg29342.html
Quoted 7 lines
Quoted 2 lines
They never made it to your own i2c tree, nor Andrew's tree. What do we want to do with these?
They should show up in the -kj tree, right? That will make it to the -mm tree, and then the kernel janitor maintainer will split them up and send them to me and you.
...
-kj is not included in -mm.
Quoted 3 lines
thanks,
greg k-h
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 13 lines · Greg KH
Quoted 12 lines · Jean Delvare
Hi Greg,
Quoted 3 lines
Here is a I2C update for 2.6.11. It includes a number of fixes, and some new i2c drivers. All of these patches have been in the past few -mm releases.
I checked against my own list of patches and found that I have two more, which were posted to the sensors and kernel-janitors list in early february:
http://archives.andrew.net.au/lm-sensors/msg29340.html
http://archives.andrew.net.au/lm-sensors/msg29342.html
Quoted 6 lines
Quoted 2 lines
They never made it to your own i2c tree, nor Andrew's tree. What do we want to do with these?
They should show up in the -kj tree, right? That will make it to the -mm tree, and then the kernel janitor maintainer will split them up and send them to me and you.
Actually, there's no "-mm step" in here.
Patches should already be in your mailboxes.
Domen