From: Hans de Goede <hdegoede@redhat.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Mattia Dongili <malattia@linux.it>,
Mark Gross <markgross@kernel.org>,
Andy Shevchenko <andy@kernel.org>,
platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] platform/x86: sony-laptop: Don't turn off 0x153 keyboard backlight during probe
Date: Tue, 13 Dec 2022 14:35:49 +0100 [thread overview]
Message-ID: <8fc57150-3dbc-ec9b-bcb7-8a442e0d1ddd@redhat.com> (raw)
In-Reply-To: <CAHp75VeDOrB6zd4Xz+kiAnb74hv7LNYrgNdT_XsN+qAPBYEJRw@mail.gmail.com>
Hi,
On 12/13/22 14:03, Andy Shevchenko wrote:
> On Tue, Dec 13, 2022 at 2:29 PM Hans de Goede <hdegoede@redhat.com> wrote:
>>
>> The 0x153 version of the kbd backlight control SNC handle has no separate
>> address to probe if the backlight is there.
>>
>> This turns the probe call into a set keyboard backlight call with a value
>> of 0 turning off the keyboard backlight.
>>
>> Skip probing when there is no separate probe address to avoid this.
>
> ...
>
>> + /*
>> + * Only probe if there is a separate probe_base, otherwise the probe call
>> + * is equivalent to __sony_nc_kbd_backlight_mode_set(0), resulting in
>> + * the keyboard backlight being turned off.
>> + */
>> + if (probe_base) {
>
> I'm wondering if it wouldn't be better to split this into the helper
> and hence just call it here.
The helper here is sony_call_snc_handle() which is not only used for
probing it is a generic helper.
Calling sony_call_snc_handle() with an argument of 0 is valid, specifically
this turns of the kbd backlight on the affected laptop models.
Which is a valid thing to do if the user requests it, but it is not a valid
thing to do as a "probe" to see if there is a kbd-backlight.
Regards,
Hans
next prev parent reply other threads:[~2022-12-13 13:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-13 12:29 [PATCH] platform/x86: sony-laptop: Don't turn off 0x153 keyboard backlight during probe Hans de Goede
2022-12-13 13:03 ` Andy Shevchenko
2022-12-13 13:35 ` Hans de Goede [this message]
[not found] ` <CANER=bYHYNSi3fTwqAt89n-6uS5dSV+o+6H4oD6doeSzgtoZoQ@mail.gmail.com>
2022-12-14 9:12 ` Hans de Goede
2022-12-14 9:49 ` Mattia Dongili
2023-01-12 16:29 ` Hans de Goede
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=8fc57150-3dbc-ec9b-bcb7-8a442e0d1ddd@redhat.com \
--to=hdegoede@redhat.com \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=malattia@linux.it \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@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