From: Brady Norander <bradynorander@gmail.com>
To: Tzung-Bi Shih <tzungbi@kernel.org>
Cc: chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org,
Benson Leung <bleung@chromium.org>,
Guenter Roeck <groeck@chromium.org>
Subject: Re: [PATCH] platform/chrome: cros_ec_lightbar: Check if ec supports suspend commands
Date: Thu, 30 Oct 2025 09:23:45 -0400 [thread overview]
Message-ID: <df04d358-f144-47a8-930f-47ccf7cb105a@gmail.com> (raw)
In-Reply-To: <aP7s2ib_nUIZ3X5O@google.com>
On 10/26/25 23:54, Tzung-Bi Shih wrote:
> On Thu, Oct 23, 2025 at 07:42:40PM -0400, Brady Norander wrote:
>> @@ -550,7 +557,7 @@ static int cros_ec_lightbar_probe(struct platform_device *pd)
>> return -ENODEV;
>>
>> /* Take control of the lightbar from the EC. */
>> - lb_manual_suspend_ctrl(ec_dev, 1);
>> + has_manual_suspend = (lb_manual_suspend_ctrl(ec_dev, 1) >= 0);
>
> The driver doesn't emit an error if lb_manual_suspend_ctrl() returns an
> error in the first place. However, I think `has_manual_suspend` should
> only check for -22. E.g.:
>
> has_manual_suspend = lb_manual_suspend_ctrl(...) != -EINVAL;
Thanks for the review.
I originally decided to catch all errors to be on the safe side. After
thinking about it some more, I agree that it should only check for
-EINVAL. Will send a v2.
next prev parent reply other threads:[~2025-10-30 13:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-23 23:42 [PATCH] platform/chrome: cros_ec_lightbar: Check if ec supports suspend commands Brady Norander
2025-10-27 3:54 ` Tzung-Bi Shih
2025-10-30 13:23 ` Brady Norander [this message]
2025-10-30 20:17 ` Benson Leung
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=df04d358-f144-47a8-930f-47ccf7cb105a@gmail.com \
--to=bradynorander@gmail.com \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=groeck@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tzungbi@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