From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
Bartosz Golaszewski <brgl@bgdev.pl>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH] gpio: Document the 'valid_mask' being internal
Date: Fri, 28 Feb 2025 11:42:28 +0200 [thread overview]
Message-ID: <6cb71da0-18cd-4ecc-8b7d-822e85987216@gmail.com> (raw)
In-Reply-To: <f3984cfc-3e3f-47d9-a734-3af7f072c22b@gmail.com>
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@gmail.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
next prev parent reply other threads:[~2025-02-28 9:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 7:00 [PATCH] gpio: Document the 'valid_mask' being internal Matti Vaittinen
2025-02-25 21:36 ` Linus Walleij
2025-02-26 6:09 ` Matti Vaittinen
2025-02-26 10:18 ` Linus Walleij
2025-02-26 11:42 ` Matti Vaittinen
2025-02-27 8:24 ` Matti Vaittinen
2025-02-28 8:23 ` Linus Walleij
2025-02-28 8:31 ` Matti Vaittinen
2025-02-28 9:28 ` Matti Vaittinen
2025-02-28 9:42 ` Matti Vaittinen [this message]
2025-02-28 10:00 ` Matti Vaittinen
2025-02-28 8:06 ` Linus Walleij
2025-02-28 9:32 ` Geert Uytterhoeven
2025-02-28 10:28 ` Biju Das
2025-02-28 11:02 ` Matti Vaittinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6cb71da0-18cd-4ecc-8b7d-822e85987216@gmail.com \
--to=mazziesaccount@gmail.com \
--cc=brgl@bgdev.pl \
--cc=geert+renesas@glider.be \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matti.vaittinen@fi.rohmeurope.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.