mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Brian Mak <bmak@nvidia.com>
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 22:00:02 +0100	[thread overview]
Message-ID: <20261123210002.baki6f34ww7azjob@pali> (raw)
In-Reply-To: <58afee6c-52fd-49af-b8d2-b0569051f5e3@nvidia.com>

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:
> >>>> CONFIG_DELL_LAPTOP is currently not available on ARM64, due to a
> >>>> dependency on CONFIG_SERIO_I8042. This dependency is actually not
> >>>> necessary, as there is a fallback. Make it optional.
> >>>
> >>> i8042 is used for controlling touchpad LED and for receiving rfkill
> >>> events when the dell-rbtn is not supported on the particular machine.
> >>>
> >>> Touchpad led is available on more Vostro and Inspirion machines and
> >>> there is no fallback or detection of i8042 at all. Even there is no
> >>> error checking.
> >>>
> >>> And for receiving rfkill events it is same situation.
> >>>
> >>> So the dell-laptop driver expects that the SERIO_I8042 is enabled and
> >>> compiled in.
> >>>
> >>> If none of these functionality is available on arm64 HW, then it makes
> >>> sense to make the SERIO_I8042 only for x86. And then in the dell-laptop
> >>> driver marking the x86 specific dependency via ifdefs. Which allows to
> >>> compile driver on arm64 without those specific functionalities.
> >>
> >> SERIO_I8042 already can't be enabled on arm64,
> > 
> > That makes sense. i8042 is x86 specific.
> > 
> >> as ARCH_MIGHT_HAVE_PC_SERIO is not set. With the current patch, the driver
> >> builds on arm64, but as you mentioned, there's a couple gaps that need
> >> to be addressed with rfkill and touchpad LED.
> >>
> >> For rfkill currently, the driver fails to probe, due to a failed
> >> i8042_install_filter call, if the device is a Latitude or a Precision
> >> (checked by DMI) or force_rfkill is enabled, SMBIOS reports an rfkill
> >> switch, and dell-rbtn is not supported. That doesn't apply for the XPS
> >> 16 Creator Edition, but it may for an ARM64 Latitude or Precision
> >> product. For v2, if dell-rbtn and i8042 are both unavailable, I can make
> >> rfkill setup fail without failing probe.
> > 
> > Well, here the main point is: who (from HW point of view) will report
> > the rfkill event? It cannot be i8042 because this controller is not
> > present on arm64. My guess is that dell-rbtn interface is also not
> > present as I was told that Dell abandoned this interface even on x86.
> > 
> > So for arm64 platform there has to be some other source of rfkill
> > events. Or rfkill is not provided at all.
> > 
> > I do not know... because I do not have this hardware. So this question
> > is for somebody who is writing drivers for this platform...
> 
> I see your point. I wasn't aware of the history with how dell-rbtn was 
> abandoned.

Well, do not take my words for 100% percent. I just recall that somebody
told me it. So maybe I do not know it correctly. (Too many things are
right now out of my head)

> 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.

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.)

  reply	other threads:[~2026-11-23 21:00 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 [this message]
2026-11-23 21:16             ` Brian Mak
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=20261123210002.baki6f34ww7azjob@pali \
    --to=pali@kernel.org \
    --cc=Dell.Client.Kernel@dell.com \
    --cc=W_Armin@gmx.de \
    --cc=bmak@nvidia.com \
    --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=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®