* [PATCH] of_i2c: I2C child node 10-bit client addressing @ 2012-10-12 3:42 Bharat Reddy [not found] ` <BLU002-W134A2F0BA0EF1C3BF8E491EAC8C0-MsuGFMq8XAE@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Bharat Reddy @ 2012-10-12 3:42 UTC (permalink / raw) To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Cc: jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, Bharat Reddy [-- Attachment #1.1: Type: text/plain, Size: 935 bytes --] 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 <bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> --- 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; + info.irq = irq_of_parse_and_map(node, 0); info.of_node = of_node_get(node); info.archdata = &dev_ad; -- 1.7.9.5 [-- Attachment #1.2: Type: text/html, Size: 1919 bytes --] [-- Attachment #2: Type: text/plain, Size: 192 bytes --] _______________________________________________ devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org https://lists.ozlabs.org/listinfo/devicetree-discuss ^ permalink raw reply related [flat|nested] 8+ messages in thread
[parent not found: <BLU002-W134A2F0BA0EF1C3BF8E491EAC8C0-MsuGFMq8XAE@public.gmane.org>]
* Re: [PATCH] of_i2c: I2C child node 10-bit client addressing [not found] ` <BLU002-W134A2F0BA0EF1C3BF8E491EAC8C0-MsuGFMq8XAE@public.gmane.org> @ 2012-11-14 16:27 ` Grant Likely 2012-11-14 16:30 ` Grant Likely 1 sibling, 0 replies; 8+ messages in thread From: Grant Likely @ 2012-11-14 16:27 UTC (permalink / raw) To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Cc: jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, Bharat Reddy On Fri, 12 Oct 2012 09:12:48 +0530, Bharat Reddy <bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote: > 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 <bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> > --- > 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. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] of_i2c: I2C child node 10-bit client addressing [not found] ` <BLU002-W134A2F0BA0EF1C3BF8E491EAC8C0-MsuGFMq8XAE@public.gmane.org> 2012-11-14 16:27 ` Grant Likely @ 2012-11-14 16:30 ` Grant Likely 1 sibling, 0 replies; 8+ messages in thread From: Grant Likely @ 2012-11-14 16:30 UTC (permalink / raw) To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Cc: jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, Bharat Reddy On Fri, 12 Oct 2012 09:12:48 +0530, Bharat Reddy <bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote: > 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 <bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> Also, the patch appears to have been corrupted because it wasn't posted as plain text. I can't easly apply things that are sent that way. What are you using to email patches? (Cut-and-paste into an email client generally doesn't work for submitting patches) g. > --- > 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; > + > info.irq = irq_of_parse_and_map(node, 0); > info.of_node = of_node_get(node); > info.archdata = &dev_ad; > -- > 1.7.9.5 > > > Non-text part: text/html > _______________________________________________ > devicetree-discuss mailing list > devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org > https://lists.ozlabs.org/listinfo/devicetree-discuss -- Grant Likely, B.Sc, P.Eng. Secret Lab Technologies, Ltd. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] of_i2c: I2C child node 10-bit client addressing @ 2012-11-15 9:35 bharat_404-PkbjNfxxIARBDgjK7y7TUQ [not found] ` <1352972157-21299-1-git-send-email-bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: bharat_404-PkbjNfxxIARBDgjK7y7TUQ @ 2012-11-15 9:35 UTC (permalink / raw) To: glikely-s3s/WqlpOiPyB63q8FvJNQ, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ Cc: bharat_404-PkbjNfxxIARBDgjK7y7TUQ, jonsmirl-Re5JQEeQqe8AvxtiuMwx3w From: Bharat Kumar Reddy <bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> I2C clients which has 10 bit address, struct i2c_board_info, member "flags = I2C_CLIENT_TEN" is needed. Signed-off-by: Bharat Kumar Reddy <bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c index 3550f3b..28c5566 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; + info.irq = irq_of_parse_and_map(node, 0); info.of_node = of_node_get(node); info.archdata = &dev_ad; -- 1.7.6 ^ permalink raw reply related [flat|nested] 8+ messages in thread
[parent not found: <1352972157-21299-1-git-send-email-bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org>]
* Re: [PATCH] of_i2c: I2C child node 10-bit client addressing [not found] ` <1352972157-21299-1-git-send-email-bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> @ 2012-11-15 16:53 ` Grant Likely [not found] ` <CACxGe6uSWy0-qZ3qYk5kfZzkxuyeZn0HMuzz+UU=6bGtGds1Hw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Grant Likely @ 2012-11-15 16:53 UTC (permalink / raw) To: bharat_404-PkbjNfxxIARBDgjK7y7TUQ Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, jonsmirl-Re5JQEeQqe8AvxtiuMwx3w On Thu, Nov 15, 2012 at 9:35 AM, <bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote: > From: Bharat Kumar Reddy <bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> > > I2C clients which has 10 bit address, struct i2c_board_info, > member "flags = I2C_CLIENT_TEN" is needed. > > Signed-off-by: Bharat Kumar Reddy <bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> Did you see my questions from yesterday? g. > > diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c > index 3550f3b..28c5566 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; > + > info.irq = irq_of_parse_and_map(node, 0); > info.of_node = of_node_get(node); > info.archdata = &dev_ad; > -- > 1.7.6 > > -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <CACxGe6uSWy0-qZ3qYk5kfZzkxuyeZn0HMuzz+UU=6bGtGds1Hw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* RE: [PATCH] of_i2c: I2C child node 10-bit client addressing [not found] ` <CACxGe6uSWy0-qZ3qYk5kfZzkxuyeZn0HMuzz+UU=6bGtGds1Hw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2012-11-16 13:12 ` Bharat Reddy [not found] ` <BLU002-W228A2064248B1A622AA97D6AC510-MsuGFMq8XAE@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Bharat Reddy @ 2012-11-16 13:12 UTC (permalink / raw) To: Grant Likely Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Bharat Reddy, jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [-- Attachment #1.1: Type: text/plain, Size: 2011 bytes --] I guess the I2C spec does not restricts.(A device to have an address that fits in the first 7 bits, but still requires 10 bit address transactions) But I don't think their will be any I2C slave doing this. Why a 7 bit slave want to have extra byte for every transaction? Note: I am on vacation with limited e-mail access. I will be back on Nov 26. Thanks, -Bharat > From: grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org > Date: Thu, 15 Nov 2012 16:53:59 +0000 > Subject: Re: [PATCH] of_i2c: I2C child node 10-bit client addressing > To: bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org > CC: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; jochen-NIgtFMG+Po8@public.gmane.org; jonsmirl@gmail.com > > On Thu, Nov 15, 2012 at 9:35 AM, <bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote: > > From: Bharat Kumar Reddy <bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> > > > > I2C clients which has 10 bit address, struct i2c_board_info, > > member "flags = I2C_CLIENT_TEN" is needed. > > > > Signed-off-by: Bharat Kumar Reddy <bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> > > Did you see my questions from yesterday? > > g. > > > > > diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c > > index 3550f3b..28c5566 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; > > + > > info.irq = irq_of_parse_and_map(node, 0); > > info.of_node = of_node_get(node); > > info.archdata = &dev_ad; > > -- > > 1.7.6 > > > > > > > > -- > Grant Likely, B.Sc., P.Eng. > Secret Lab Technologies Ltd. [-- Attachment #1.2: Type: text/html, Size: 2609 bytes --] [-- Attachment #2: Type: text/plain, Size: 192 bytes --] _______________________________________________ devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org https://lists.ozlabs.org/listinfo/devicetree-discuss ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <BLU002-W228A2064248B1A622AA97D6AC510-MsuGFMq8XAE@public.gmane.org>]
* Re: [PATCH] of_i2c: I2C child node 10-bit client addressing [not found] ` <BLU002-W228A2064248B1A622AA97D6AC510-MsuGFMq8XAE@public.gmane.org> @ 2012-11-16 14:09 ` Grant Likely 0 siblings, 0 replies; 8+ messages in thread From: Grant Likely @ 2012-11-16 14:09 UTC (permalink / raw) To: Bharat Reddy Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org On Fri, Nov 16, 2012 at 1:12 PM, Bharat Reddy <bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote: > I guess the I2C spec does not restricts.(A device to have an address that > fits in the first 7 bits, but still requires 10 bit address transactions) > > But I don't think their will be any I2C slave doing this. > > Why a 7 bit slave want to have extra byte for every transaction? It is possible for there to be devices that use 10 bit addressing, but have a configurable address. g. > > Note: I am on vacation with limited e-mail access. I will be back on Nov 26. > > Thanks, > -Bharat > > >> From: grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org >> Date: Thu, 15 Nov 2012 16:53:59 +0000 >> Subject: Re: [PATCH] of_i2c: I2C child node 10-bit client addressing >> To: bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org >> CC: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; jochen-NIgtFMG+Po8@public.gmane.org; >> jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > >> >> On Thu, Nov 15, 2012 at 9:35 AM, <bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote: >> > From: Bharat Kumar Reddy <bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> >> > >> > I2C clients which has 10 bit address, struct i2c_board_info, >> > member "flags = I2C_CLIENT_TEN" is needed. >> > >> > Signed-off-by: Bharat Kumar Reddy <bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> >> >> Did you see my questions from yesterday? >> >> g. >> >> > >> > diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c >> > index 3550f3b..28c5566 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; >> > + >> > info.irq = irq_of_parse_and_map(node, 0); >> > info.of_node = of_node_get(node); >> > info.archdata = &dev_ad; >> > -- >> > 1.7.6 >> > >> > >> >> >> >> -- >> Grant Likely, B.Sc., P.Eng. >> Secret Lab Technologies Ltd. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] of_i2c: I2C child node 10-bit client addressing @ 2013-01-13 3:03 Stephen Warren 0 siblings, 0 replies; 8+ messages in thread From: Stephen Warren @ 2013-01-13 3:03 UTC (permalink / raw) To: Bharat Kumar Reddy Gooty, Grant Likely (grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org) Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org FYI, re: > https://lists.ozlabs.org/pipermail/devicetree-discuss/2012-November/022645.html I know that was a long time ago, but I was searching for information on which chips supported 10-bit I2C addresses, and found a partial answer to the question: Grant Likely wrote: > Is it possible for a device to have an address that fits in the first 7 > bits, but still requires 10 bit address transactions? The following chip (link below) certainly supports a 10-bit I2C address with the top-most 3 bits set to 0. Now, it does also respond to a 7-bit I2C address of the same value, so this perhaps isn't quite an exact answer to Grant's question. However, it does indicate to me that we shouldn't determine whether to use 7- or 10-bit addresses solely from the set bits in the I2C address; a separate property or flag bit in the address field would be better, I think. http://www.ti.com/lit/ds/snvs839/snvs839.pdf Quoting it: > 7-BIT and 10-BIT ADDRESSING MODES > > The LM8330 supports both the 7-bit and 10-bit addressing modes as defined in the NXP (Philips) I 2 C > Specification UM10204 rev 0.3 from 2007. The default 7-bit slave address is 0x88, and the default 10-bit slave > address is 0x088. NOTE: The upper three address bits in 10-bit mode are hard tied to 0. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-01-13 3:03 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-10-12 3:42 [PATCH] of_i2c: I2C child node 10-bit client addressing Bharat Reddy [not found] ` <BLU002-W134A2F0BA0EF1C3BF8E491EAC8C0-MsuGFMq8XAE@public.gmane.org> 2012-11-14 16:27 ` Grant Likely 2012-11-14 16:30 ` Grant Likely -- strict thread matches above, loose matches on Subject: below -- 2012-11-15 9:35 bharat_404-PkbjNfxxIARBDgjK7y7TUQ [not found] ` <1352972157-21299-1-git-send-email-bharat_404-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> 2012-11-15 16:53 ` Grant Likely [not found] ` <CACxGe6uSWy0-qZ3qYk5kfZzkxuyeZn0HMuzz+UU=6bGtGds1Hw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2012-11-16 13:12 ` Bharat Reddy [not found] ` <BLU002-W228A2064248B1A622AA97D6AC510-MsuGFMq8XAE@public.gmane.org> 2012-11-16 14:09 ` Grant Likely 2013-01-13 3:03 Stephen Warren
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).