Re: [PATCH v1 1/3] i2c: mux: gpio: Replace custom acpi_get_local_address()

From: Peter Rosin
Date: Thu Nov 18 2021 - 06:26:04 EST


On 2021-11-18 11:33, Andy Shevchenko wrote:
> +Cc: Rafael
>
> On Thu, Nov 18, 2021 at 12:24 PM Peter Rosin <peda@xxxxxxxxxx> wrote:
>> On 2021-11-15 16:41, Andy Shevchenko wrote:
>
> ...
>
>>> - *adr = adr64;
>>> - if (*adr != adr64) {
>>> - dev_err(dev, "Address out of range\n");
>>> - return -ERANGE;
>>> - }
>>
>> In the conversion, I read it as if we lose this overflow check.
>
> It depends from which angle you look at this. We relaxed requirements.
>
>> Why is that
>> not a problem?
>
> The idea behind the acpi_get_local_address() is to provide a unified
> way between DT and ACPI for the same value. In either case we take
> only a 32-bit value. We might nevertheless add that check to the API.
> Rafael, what do you think?
>
> P.S. Just realized that in ACPI the higher part of the address may be
> used as flags by some interfaces (SoundWire is one of them), this is
> not applicable to I²C muxes right now, but who knows... So I prefer a
> relaxed version and, if necessary, documentation should be
> amended/updated.

Splendid, just checking that you're on top of things. I don't think any
doc update is needed on the i2c-mux end, until flags in the upper bits
are introduced? So, looks good to me, thanks!

Acked-by: Peter Rosin <peda@xxxxxxxxxx>

@Wolfram: You're finding this series in patchwork and will be picking it
up as usual, right? Thanks!

Cheers,
Peter