From: Neil Armstrong <neil.armstrong@linaro.org>
To: Caleb Connolly <caleb.connolly@linaro.org>,
Tom Rini <trini@konsulko.com>, Sumit Garg <sumit.garg@kernel.org>,
Ramon Fried <rfried.dev@gmail.com>,
Jorge Ramirez-Ortiz <jorge.ramirez.ortiz@gmail.com>
Cc: u-boot-qcom@groups.io, u-boot@lists.denx.de,
Danila Tikhonov <danila@jiaxyga.com>,
Jens Reidel <adrian@mainlining.org>
Subject: Re: [PATCH v4 6/6] button: make button_get_by_label() case insensitive
Date: Tue, 1 Apr 2025 10:41:14 +0200 [thread overview]
Message-ID: <613ecdab-65dd-41ab-a0b1-be40a2286dba@linaro.org> (raw)
In-Reply-To: <20250331-qcom-phones-v4-6-f52e57d3b8c6@linaro.org>
On 31/03/2025 14:23, Caleb Connolly wrote:
> This function is already doing a fuzzy match, since there are no
> guarantees that a given label is unique.
>
> Ignoring case makes it much easier to catch "Volume down" or "Volume
> Down" in board-agnostic code.
>
> Tested-by: Danila Tikhonov <danila@jiaxyga.com> # google-sunfish
> Tested-by: Jens Reidel <adrian@mainlining.org> # xiaomi-davinci
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
> ---
> drivers/button/button-uclass.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/button/button-uclass.c b/drivers/button/button-uclass.c
> index 729983d58701867f7ea18e9b5f87e7404bca3dce..025917887e80f2fe9cbd3777e04035d20fa34713 100644
> --- a/drivers/button/button-uclass.c
> +++ b/drivers/button/button-uclass.c
> @@ -20,9 +20,9 @@ int button_get_by_label(const char *label, struct udevice **devp)
> uclass_id_foreach_dev(UCLASS_BUTTON, dev, uc) {
> struct button_uc_plat *uc_plat = dev_get_uclass_plat(dev);
>
> /* Ignore the top-level button node */
> - if (uc_plat->label && !strcmp(label, uc_plat->label))
> + if (uc_plat->label && !strcasecmp(label, uc_plat->label))
> return uclass_get_device_tail(dev, 0, devp);
> }
>
> return -ENODEV;
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
next prev parent reply other threads:[~2025-04-01 8:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-31 12:23 [PATCH v4 0/6] Better smartphone support (Qualcomm) Caleb Connolly
2025-03-31 12:23 ` [PATCH v4 1/6] board/qualcomm: introduce phone config Caleb Connolly
2025-04-03 6:59 ` Sam Day
2025-03-31 12:23 ` [PATCH v4 2/6] cli_hush: support running bootcmd on boot retry Caleb Connolly
2025-03-31 12:23 ` [PATCH v4 3/6] bootretry: check for bootretry variable changes Caleb Connolly
2025-03-31 12:23 ` [PATCH v4 4/6] doc: board/qualcomm: describe phone support and bringup Caleb Connolly
2025-03-31 12:23 ` [PATCH v4 5/6] button: qcom-pmic: prettify and standardise button labels Caleb Connolly
2025-04-01 8:40 ` Neil Armstrong
2025-03-31 12:23 ` [PATCH v4 6/6] button: make button_get_by_label() case insensitive Caleb Connolly
2025-04-01 8:41 ` Neil Armstrong [this message]
2025-04-11 13:36 ` [PATCH v4 0/6] Better smartphone support (Qualcomm) Caleb Connolly
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=613ecdab-65dd-41ab-a0b1-be40a2286dba@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=adrian@mainlining.org \
--cc=caleb.connolly@linaro.org \
--cc=danila@jiaxyga.com \
--cc=jorge.ramirez.ortiz@gmail.com \
--cc=rfried.dev@gmail.com \
--cc=sumit.garg@kernel.org \
--cc=trini@konsulko.com \
--cc=u-boot-qcom@groups.io \
--cc=u-boot@lists.denx.de \
/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