From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: kr494167@gmail.com
Cc: hvilleneuve@dimonoff.com, andriy.shevchenko@intel.com,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: charlieplex_keypad - check gpiod_direction_output() return value
Date: Fri, 24 Jul 2026 18:02:59 -0700 [thread overview]
Message-ID: <amQLPadZPLaAVXQV@google.com> (raw)
In-Reply-To: <20260723022943.9337-1-kr494167@gmail.com>
On Thu, Jul 23, 2026 at 07:59:43AM +0530, kr494167@gmail.com wrote:
> From: Surendra Singh Chouhan <kr494167@gmail.com>
>
> charlieplex_keypad_scan_line() currently ignores the return value of
> gpiod_direction_output() when setting the active output line for scanning.
>
> If setting the GPIO direction fails (e.g. on I2C/SPI GPIO expanders or
> hardware errors), the function continues to sleep and read input values
> from an improperly configured GPIO line.
>
> Fix this by capturing the return value of gpiod_direction_output() and
> returning the error code immediately if it fails.
>
> Fixes: 2ca45e57ea02 ("Input: charlieplex_keypad - add GPIO charlieplex keypad")
> Signed-off-by: Surendra Singh Chouhan <kr494167@gmail.com>
Applied, thank you.
--
Dmitry
prev parent reply other threads:[~2026-07-25 1:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 2:29 [PATCH] Input: charlieplex_keypad - check gpiod_direction_output() return value kr494167
2026-07-23 2:38 ` sashiko-bot
2026-07-25 1:02 ` Dmitry Torokhov [this message]
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=amQLPadZPLaAVXQV@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=andriy.shevchenko@intel.com \
--cc=hvilleneuve@dimonoff.com \
--cc=kr494167@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox