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

Grant Likely grant.likely at secretlab.ca
Fri Nov 16 03:53:59 EST 2012


On Thu, Nov 15, 2012 at 9:35 AM,  <bharat_404 at hotmail.com> wrote:
> From: Bharat Kumar Reddy <bharat_404 at hotmail.com>
>
> 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 at hotmail.com>

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.


More information about the devicetree-discuss mailing list