mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Brian Mak <bmak@nvidia.com>
To: "Pali Rohár" <pali@kernel.org>
Cc: "Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Kurt Borja" <kuurtb@gmail.com>,
	"Stuart Hayes" <stuart.w.hayes@gmail.com>,
	"Matthew Garrett" <mjg59@srcf.ucam.org>,
	"Lyndon Sanche" <lsanche@lyndeno.ca>,
	"Armin Wolf" <W_Armin@gmx.de>,
	"Prasanth Ksr" <prasanth.ksr@dell.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	"platform-driver-x86@vger.kernel.org"
	<platform-driver-x86@vger.kernel.org>,
	"Dell.Client.Kernel@dell.com" <Dell.Client.Kernel@dell.com>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/8] platform: dell: Allow DELL_LAPTOP to be arch-independent
Date: Mon, 23 Nov 2026 21:16:57 +0000	[thread overview]
Message-ID: <17463c67-cd9a-4fc6-8eac-8594a99426fd@nvidia.com> (raw)
In-Reply-To: <20261123210002.baki6f34ww7azjob@pali>

On 11/23/26 13:00, Pali Rohár wrote:
> On Monday 23 November 2026 20:33:11 Brian Mak wrote:
>> On 11/23/26 11:39, Pali Rohár wrote:
>>> On Monday 23 November 2026 19:11:00 Brian Mak wrote:
>>>> On 11/20/26 16:48, Pali Rohár wrote:
>>>>> On Friday 20 November 2026 16:05:50 Brian Mak wrote:
>> The dell-rbtn interface is not present on my XPS 16 Creator
>> Edition either. There isn't an rfkill interface on this platform, to my
>> knowledge. When I suggested to make rfkill setup fail without failing
>> probe, that was for in case the dell-rbtn interface is available on a
>> future platform. Since you said that it's abandoned, I would agree that
>> there's no possible sources for rfkill events on ARM64 Dell platforms.
>>
>> I can gate rfkill setup logic behind an ifdef as well then, for v2. Is
>> your preference to gate behind SERIO_I8042 or X86?
> 
> The i8042 and dell-rbtn are two event reports. These "HW" parts are
> sending events to kernel when the hard rfkill state changes. On some
> laptops it is i8042 on another it is dell-rbtn and on some both.
> Obviously it is enough to get just one event that hard rfkill state was
> changed (the driver will re-read state and inform listeners).
> 
> But to provide kernel events to listeners, it is needed to have
> something which will report it to kernel. And in case there is hard
> rfkill on arm64 there would be also some interrupt mechanism which will
> report it. I'm just guessing, this is something which Dell or laptop
> platform people would know.
> 
> So right now, when the driver is moving out of the x86 subdir, gating
> i8042 logic should be behind the SERIO_I8042.
> 
> In my opinion there would be some interrupt / event mechanism also on
> arm64 products (if not now then maybe in some later products), so the
> code would be revisited in future.
> 
>>> In any case, it does not make any sense to provide "fake" or "dummy"
>>> device by linux just to make driver compilable.
>>
>> I'm not sure I understand what you mean by this. Under my original
>> proposal of making rfkill setup fail without failing probe, no dummy or
>> non-functional devices would be exposed by the driver. rfkill setup
>> would fail gracefully, and the rfkill devices would go away with it. I
>> agree with you, but I'm not sure if I'm missing something here.
> 
> Ok, if rfkill devices go away then it is fine. I was not fully sure
> about it.

Ok, I will go with this way for v2 then.

> Now I see that I forgot lot of logic behind those dell drivers, so I
> would need to re-read it again.
> 
>>>> For the touchpad LED currently, the i8042_command() stub will return
>>>> -ENODEV and do nothing. This will register an LED that does nothing. For
>>>> v2, I can gate the LED registration behind a SERIO_I8042 ifdef.
>>>
>>> I think that this is correct way. The i8042 touchpad led should not be
>>> enabled when the i8042 HW is not present at all. And that touchpad led
>>> is only for few models based on whitelist.
>>>
>>>> For the Kconfig, since i8042 is required on some x86 Dell platforms, I
>>>> can change the Kconfig dependency to be like such, to ensure that
>>>> SERIO_I8042 is required on x86 and optional elsewhere (in case there's
>>>> another arch introduced by Dell that supports i8042 in the future):
>>>>
>>>> depends on SERIO_I8042 || (SERIO_I8042 = n && !X86)
>>>>
>>>> Please let me know if these changes are good with you.
>>>>
>>>> Thanks,
>>>> Brian
>>>
>>> My personal opinion is to make i8042 dependency only on x86. And do not
>>> even try to enable i8042 on non-x86 platforms. All dell drivers were in
>>> x86 subdirectory which cause that explicit x86 was not written in
>>> Kconfig (as it was not needed).
>>>
>>> Now when you are moving dell drivers out of the x86 subdir, maybe it
>>> could make sense to check if there are some other config options which
>>> have also hidden dependency on x86.
>>>
>>> Anyway, I highly doubt that any new platform / device (which is designed
>>> from scratch; not rebranded or evoluted) would use i8042 for any such
>>> API. Nowadays all those functionalities are based on ACPI or WMI APIs.
>>
>> If I understand your suggestion correctly, you are asking, instead of
>> gating behind:
>>
>> depends on SERIO_I8042 || (SERIO_I8042 = n && !X86)
>>
>> You would gate behind:
>>
>> depends on SERIO_I8042 || !X86
>>
>> Thanks,
>> Brian
> 
> Ufff... some more complicated logic behind.
> 
> Let me think... If you extend the driver to compile touchpad led support
> conditionally based on CONFIG_SERIO_I8042 and same for that rfkill event
> reported, then it should be enough to write just:
> 
> depends on SERIO_I8042 || SERIO_I8042 = n
> 
> After those changes if somebody compiles kernel without the SERIO_I8042
> support (e.g. because uses only USB keywords) then would be able to use
> dell drivers on laptops without touchpad led and without rfkill. (I
> guess there are many such laptops).
> 
> And at the same time it will solve also your problem with arm64. And do
> not need to think about "|| !X86" part at all.
> 
> It is correct, or did I some mistake here?
> 
> (I'm trying to simplify that logic and setup.)

Yes, this seems correct to me. So, I will keep this patch the same as it 
is now in v1, and then in a preceding patch, add the appropriate gates.

Also, sorry for the spam in my last message. I'm not sure what happened 
there! :)

Thanks,
Brian

  reply	other threads:[~2026-11-23 21:17 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-21  0:05 [PATCH 0/8] platform: dell: Move out of x86 and support Dell XPS 16 Creator Edition Brian Mak
2026-11-21  0:05 ` [PATCH 1/8] platform/x86: dell: Make uart-backlight x86 only Brian Mak
2026-11-21  1:36   ` Randy Dunlap
2026-11-21  1:36     ` Randy Dunlap
2026-11-21  0:05 ` [PATCH 2/8] platform: dell: Move out of x86 directory Brian Mak
2026-11-21 10:05   ` kernel test robot
2026-11-21  0:05 ` [PATCH 3/8] MAINTAINERS: Add Dell platform drivers entry Brian Mak
2026-11-21  0:05 ` [PATCH 4/8] platform: dell: Allow DELL_LAPTOP to be arch-independent Brian Mak
2026-11-21  0:48   ` Pali Rohár
2026-11-23 19:11     ` Brian Mak
2026-11-23 19:39       ` Pali Rohár
2026-11-23 20:33         ` Brian Mak
2026-11-23 21:00           ` Pali Rohár
2026-11-23 21:16             ` Brian Mak [this message]
2026-11-23 20:36         ` Brian Mak
2026-11-23 20:38         ` Brian Mak
2026-11-23 20:40         ` Brian Mak
2026-11-23 20:41         ` Brian Mak
2026-11-23 20:43         ` Brian Mak
2026-11-21  1:38   ` Randy Dunlap
2026-11-23 18:10     ` Brian Mak
2026-11-21  0:05 ` [PATCH 5/8] platform: dell: smbios-wmi: Fix probe on RTX Spark Brian Mak
2026-11-21 13:44   ` Armin Wolf
2026-11-23 18:11     ` Brian Mak
2026-11-21  0:05 ` [PATCH 6/8] platform: dell: smbios: Add quirk for non-functional calling interface Brian Mak
2026-11-21  0:38   ` Pali Rohár
2026-11-21  0:45     ` Brian Mak
2026-11-21  0:51       ` Pali Rohár
2026-11-21 13:49   ` Armin Wolf
2026-11-21  0:05 ` [PATCH 7/8] platform: dell: laptop: Don't load if SMBIOS calls are non-functional Brian Mak
2026-11-21  0:05 ` [PATCH 8/8] platform: dell: pc: " Brian Mak

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=17463c67-cd9a-4fc6-8eac-8594a99426fd@nvidia.com \
    --to=bmak@nvidia.com \
    --cc=Dell.Client.Kernel@dell.com \
    --cc=W_Armin@gmx.de \
    --cc=corbet@lwn.net \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=kuurtb@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lsanche@lyndeno.ca \
    --cc=mjg59@srcf.ucam.org \
    --cc=pali@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=prasanth.ksr@dell.com \
    --cc=rdunlap@infradead.org \
    --cc=skhan@linuxfoundation.org \
    --cc=stuart.w.hayes@gmail.com \
    /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

all inboxes | Powered by JetHome®