All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Linux I2C <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
Subject: [PATCH] i2c: Bus drivers don't have to support I2C_M_REV_DIR_ADDR
Date: Wed, 30 Sep 2009 22:22:44 +0200	[thread overview]
Message-ID: <20090930222244.43b8d17d@hyperion.delvare> (raw)

I2C bus drivers don't have to support I2C_M_REV_DIR_ADDR. It is a
deviation from the I2C specification, which only makes sense to
implement when really needed.

Signed-off-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
---
 drivers/i2c/busses/i2c-iop3xx.c   |    6 ------
 drivers/i2c/busses/i2c-mv64xxx.c  |    3 ---
 drivers/i2c/busses/i2c-powermac.c |    2 --
 3 files changed, 11 deletions(-)

--- linux-2.6.32-rc1.orig/drivers/i2c/busses/i2c-iop3xx.c	2009-06-10 05:05:27.000000000 +0200
+++ linux-2.6.32-rc1/drivers/i2c/busses/i2c-iop3xx.c	2009-09-30 21:34:01.000000000 +0200
@@ -56,12 +56,6 @@ iic_cook_addr(struct i2c_msg *msg)
 	if (msg->flags & I2C_M_RD)
 		addr |= 1;
 
-	/*
-	 * Read or Write?
-	 */
-	if (msg->flags & I2C_M_REV_DIR_ADDR)
-		addr ^= 1;
-
 	return addr;   
 }
 
--- linux-2.6.32-rc1.orig/drivers/i2c/busses/i2c-mv64xxx.c	2009-09-28 10:28:36.000000000 +0200
+++ linux-2.6.32-rc1/drivers/i2c/busses/i2c-mv64xxx.c	2009-09-30 21:33:45.000000000 +0200
@@ -338,9 +338,6 @@ mv64xxx_i2c_prepare_for_io(struct mv64xx
 	if (msg->flags & I2C_M_RD)
 		dir = 1;
 
-	if (msg->flags & I2C_M_REV_DIR_ADDR)
-		dir ^= 1;
-
 	if (msg->flags & I2C_M_TEN) {
 		drv_data->addr1 = 0xf0 | (((u32)msg->addr & 0x300) >> 7) | dir;
 		drv_data->addr2 = (u32)msg->addr & 0xff;
--- linux-2.6.32-rc1.orig/drivers/i2c/busses/i2c-powermac.c	2009-09-30 20:29:42.000000000 +0200
+++ linux-2.6.32-rc1/drivers/i2c/busses/i2c-powermac.c	2009-09-30 21:33:39.000000000 +0200
@@ -156,8 +156,6 @@ static int i2c_powermac_master_xfer(	str
 		return -EINVAL;
 	read = (msgs->flags & I2C_M_RD) != 0;
 	addrdir = (msgs->addr << 1) | read;
-	if (msgs->flags & I2C_M_REV_DIR_ADDR)
-		addrdir ^= 1;
 
 	rc = pmac_i2c_open(bus, 0);
 	if (rc)


-- 
Jean Delvare

             reply	other threads:[~2009-09-30 20:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-30 20:22 Jean Delvare [this message]
     [not found] ` <20090930222244.43b8d17d-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-10-13 22:50   ` [PATCH] i2c: Bus drivers don't have to support I2C_M_REV_DIR_ADDR Ben Dooks
     [not found]     ` <20091013225010.GA15469-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
2009-10-14  8:35       ` Jean Delvare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090930222244.43b8d17d@hyperion.delvare \
    --to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
    --cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.