Re: [PATCH v2 2/5] gpio: cmd: warn when a gpio offset is already claimed

Simon Glass <[email protected]>
Newsgroups gmane.comp.boot-loaders.u-boot
Message-ID <CAFLszTjM-c2VqVtR7m=4xBSjTJDiwje9j40ZL-Jt02kHEjDjGg__33898.4868068778$1786211868$gmane$org@mail.gmail.com>
On 2026-07-29T08:12:14, Pranav Sanwal <[email protected]> wrote:
> gpio: cmd: warn when a gpio offset is already claimed
>
> The "gpio" command silently swallows -EBUSY from gpio_request(), since
> a pin already claimed by a driver or hog is a normal, expected
> condition for "gpio set"/"gpio toggle" etc. This makes an unexpected
> offset collision (e.g. two consumers unintentionally routed to the
> same underlying offset) opaque to debug from the command line.
>
> Print which label already holds the pin when this happens, using the
> device/offset already resolved by gpio_lookup_name().
>
> Signed-off-by: Pranav Sanwal <[email protected]>
>
> cmd/gpio.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.