[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6cb71da0-18cd-4ecc-8b7d-822e85987216@gmail.com>
Date: Fri, 28 Feb 2025 11:42:28 +0200
From: Matti Vaittinen <mazziesaccount@...il.com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
Bartosz Golaszewski <brgl@...ev.pl>, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org, Geert Uytterhoeven <geert+renesas@...der.be>
Subject: Re: [PATCH] gpio: Document the 'valid_mask' being internal
On 28/02/2025 11:28, Matti Vaittinen wrote:
>
> CC: Geert (because, I think he was asked about the Rcar GPIO check before).
>
> On 28/02/2025 10:23, Linus Walleij wrote:
>> On Thu, Feb 27, 2025 at 9:24 AM Matti Vaittinen
>> <mazziesaccount@...il.com> wrote:
>> The call graph should look like this:
>>
>> devm_gpiod_get_array()
>> gpiod_get_array()
>> gpiod_get_index(0...n)
>> gpiod_find_and_request()
>> gpiod_request()
>> gpiod_request_commit()
>
> Here in my setup the guard.gc->request == NULL. Thus the code never goes
> to the branch with the validation. And just before you ask me why the
> guard.gc->request is NULL - what do you call a blind bambi? :)
> - No idea.
Oh, I suppose the 'guard.gc' is just the chip structure. So, these
validity checks are only applied if the gc provides the request
callback? As far as I understand, the request callback is optional, and
thus the validity check for GPIOs may be omitted.
>
>> gpiochip_line_is_valid()
>
> Eg, This is never called.
>
Yours,
-- Matti
Powered by blists - more mailing lists