* I2C updates for 2.4.29
@ 2005-01-29 11:02 Jean Delvare
2005-01-29 11:14 ` [PATCH 2.4] I2C updates for 2.4.29 (1/3) Jean Delvare
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jean Delvare @ 2005-01-29 11:02 UTC (permalink / raw)
To: Marcelo Tosatti, LKML
Hi Marcelo, hi all,
I have a number of I2C updates for 2.4.29 waiting. All of them are
rather small and independent, gathered during the 2.4.28 cycle and
already applied to i2c CVS.
Individual patches follow, please apply.
Thanks.
--
Jean Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2.4] I2C updates for 2.4.29 (1/3)
2005-01-29 11:02 I2C updates for 2.4.29 Jean Delvare
@ 2005-01-29 11:14 ` Jean Delvare
2005-01-29 11:28 ` [PATCH 2.4] I2C updates for 2.4.29 (2/3) Jean Delvare
2005-01-29 11:37 ` [PATCH 2.4] I2C updates for 2.4.29 (3/3) Jean Delvare
2 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2005-01-29 11:14 UTC (permalink / raw)
To: Marcelo Tosatti, LKML; +Cc: Ian Campbell
Original reports and discussion:
http://archives.andrew.net.au/lm-sensors/msg28512.html
http://archives.andrew.net.au/lm-sensors/msg28581.html
Bottom line:
The "bit" and "pcf" i2c algorithms should declare themselves fully I2C
capable, but do not.
Credits go to Ian Campbell for noticing and proposing patches.
This is a backport from Linux 2.6.11-rc1.
--- linux-2.4.29/drivers/i2c/i2c-algo-bit.c.orig 2004-02-18 14:36:31.000000000 +0100
+++ linux-2.4.29/drivers/i2c/i2c-algo-bit.c 2005-01-29 11:33:33.000000000 +0100
@@ -522,8 +522,8 @@
static u32 bit_func(struct i2c_adapter *adap)
{
- return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR |
- I2C_FUNC_PROTOCOL_MANGLING;
+ return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL |
+ I2C_FUNC_10BIT_ADDR | I2C_FUNC_PROTOCOL_MANGLING;
}
--- linux-2.4.29/drivers/i2c/i2c-algo-pcf.c.orig 2005-01-29 11:40:01.000000000 +0100
+++ linux-2.4.29/drivers/i2c/i2c-algo-pcf.c 2005-01-29 11:33:40.000000000 +0100
@@ -435,8 +435,8 @@
static u32 pcf_func(struct i2c_adapter *adap)
{
- return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR |
- I2C_FUNC_PROTOCOL_MANGLING;
+ return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL |
+ I2C_FUNC_10BIT_ADDR | I2C_FUNC_PROTOCOL_MANGLING;
}
/* -----exported algorithm data: ------------------------------------- */
--
Jean Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2.4] I2C updates for 2.4.29 (2/3)
2005-01-29 11:02 I2C updates for 2.4.29 Jean Delvare
2005-01-29 11:14 ` [PATCH 2.4] I2C updates for 2.4.29 (1/3) Jean Delvare
@ 2005-01-29 11:28 ` Jean Delvare
2005-01-29 11:37 ` [PATCH 2.4] I2C updates for 2.4.29 (3/3) Jean Delvare
2 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2005-01-29 11:28 UTC (permalink / raw)
To: Marcelo Tosatti, LKML
While editing i2c-algo-bit.c and i2c-algo-pcf.c (see 1/3 of this patch
set), I noticed that both files include header files they do not need at
all (namely linux/ioport.h and asm/uaccess.h). The following patch
cleans this, additionally bringing the files in line with what we have
in i2c CVS (thus the blank lines changes).
--- linux-2.4.29/drivers/i2c/i2c-algo-bit.c.orig 2005-01-29 11:33:33.000000000 +0100
+++ linux-2.4.29/drivers/i2c/i2c-algo-bit.c 2005-01-29 11:35:39.000000000 +0100
@@ -28,14 +28,12 @@
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/init.h>
-#include <asm/uaccess.h>
-#include <linux/ioport.h>
#include <linux/errno.h>
#include <linux/sched.h>
-
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
+
/* ----- global defines ----------------------------------------------- */
#define DEB(x) if (i2c_debug>=1) x;
#define DEB2(x) if (i2c_debug>=2) x;
--- linux-2.4.29/drivers/i2c/i2c-algo-pcf.c.orig 2005-01-29 11:33:40.000000000 +0100
+++ linux-2.4.29/drivers/i2c/i2c-algo-pcf.c 2005-01-29 11:35:45.000000000 +0100
@@ -32,15 +32,13 @@
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/init.h>
-#include <asm/uaccess.h>
-#include <linux/ioport.h>
#include <linux/errno.h>
#include <linux/sched.h>
-
#include <linux/i2c.h>
#include <linux/i2c-algo-pcf.h>
#include "i2c-pcf8584.h"
+
/* ----- global defines ----------------------------------------------- */
#define DEB(x) if (i2c_debug>=1) x
#define DEB2(x) if (i2c_debug>=2) x
--
Jean Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2.4] I2C updates for 2.4.29 (3/3)
2005-01-29 11:02 I2C updates for 2.4.29 Jean Delvare
2005-01-29 11:14 ` [PATCH 2.4] I2C updates for 2.4.29 (1/3) Jean Delvare
2005-01-29 11:28 ` [PATCH 2.4] I2C updates for 2.4.29 (2/3) Jean Delvare
@ 2005-01-29 11:37 ` Jean Delvare
2 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2005-01-29 11:37 UTC (permalink / raw)
To: Marcelo Tosatti, LKML
Original discussion:
http://archives.andrew.net.au/lm-sensors/msg29038.html
http://archives.andrew.net.au/lm-sensors/msg29041.html
Bottom line:
The "id" member of the i2c_client structure was discarded in Linux 2.6
due to a lack of consistent use and overall need. While we of course
won't backport this to Linux 2.4 so as to not break compatibility with
existing 2.4 drivers, it still seems wise to update the documentation so
that new drivers written for Linux 2.4 today (*sigh*) do not rely on it.
--- linux-2.4.29/Documentation/i2c/writing-clients.orig 2005-01-21 21:51:06.000000000 +0100
+++ linux-2.4.29/Documentation/i2c/writing-clients 2005-01-23 18:21:47.000000000 +0100
@@ -380,9 +380,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)
{
@@ -518,7 +515,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 */
--
Jean Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-01-29 11:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-29 11:02 I2C updates for 2.4.29 Jean Delvare
2005-01-29 11:14 ` [PATCH 2.4] I2C updates for 2.4.29 (1/3) Jean Delvare
2005-01-29 11:28 ` [PATCH 2.4] I2C updates for 2.4.29 (2/3) Jean Delvare
2005-01-29 11:37 ` [PATCH 2.4] I2C updates for 2.4.29 (3/3) Jean Delvare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).