[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <n7o3pkxkfw7jdvoce56jyxuzsnnpzkxaa2nrb725yut3i2twso@q7prmvzihysr>
Date: Thu, 13 Feb 2025 23:40:10 +0100
From: Andi Shyti <andi.shyti@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Wolfram Sang <wsa+renesas@...g-engineering.com>,
linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-mediatek@...ts.infradead.org,
linux-renesas-soc@...r.kernel.org, Krzysztof Adamski <krzysztof.adamski@...ia.com>,
Florian Fainelli <florian.fainelli@...adcom.com>, Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>, Stefan Roese <sr@...x.de>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, Gregory CLEMENT <gregory.clement@...tlin.com>,
Fabrizio Castro <fabrizio.castro.jz@...esas.com>
Subject: Re: [PATCH v1 1/8] i2c: Introduce i2c_10bit_addr_from_msg()
Hi Andy,
On Wed, Feb 12, 2025 at 06:32:26PM +0200, Andy Shevchenko wrote:
> There are already a lot of drivers that have been using
> i2c_8bit_addr_from_msg() for 7-bit addresses, now it's time
> to have the similar for 10-bit addresses.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
...
> +static inline u8 i2c_10bit_addr_from_msg(const struct i2c_msg *msg)
> +{
> + /*
> + * 10-bit address
> + * addr_1: 5'b11110 | addr[9:8] | (R/nW)
> + * addr_2: addr[7:0]
> + */
> + return 0xf0 | ((msg->addr & GENMASK(9, 8)) >> 7) | (msg->flags & I2C_M_RD);
> +}
> +
I personally like this patch and it was an item of my todo list.
I'm OK with having it merged.
Reviewed-by: Andi Shyti <andi.shyti@...nel.org>
Andi
Powered by blists - more mailing lists