Thread (1 message) 1 message, 1 author, 2012-11-14

Re: [PATCH] of_i2c: I2C child node 10-bit client addressing

From: Grant Likely <hidden>
Date: 2012-11-14 16:27:16

On Fri, 12 Oct 2012 09:12:48 +0530, Bharat Reddy [off-list ref] wrote:
quoted hunk
I2C clients which has 10 bit address, struct i2c_board_info,
member "flags = I2C_CLIENT_TEN" is needed.

Signed-off-by: Bharat Kumar Reddy Gooty <redacted>
---
 drivers/of/of_i2c.c |    4 ++++
 1 file changed, 4 insertions(+)
diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index 1e173f3..9cda7e2 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -57,6 +57,10 @@ void of_i2c_register_devices(struct i2c_adapter *adap)
                        continue;
                }   
 
+               /* Support for i2c 10 bit client address */
+               if ((info.addr > (1 << 7) - 1) && (info.addr <= (1 << 10) - 1))
+                       info.flags = I2C_CLIENT_TEN;
+
Is it possible for a device to have an address that fits in the first 7
bits, but still requires 10 bit address transactions?

g.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help