platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Darren Hart <dvhart@infradead.org>,
	Carlos Corbacho <carlos@strangeworlds.co.uk>,
	Len Brown <len.brown@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andy Lutomirski <luto@kernel.org>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	Linux ACPI <linux-acpi@vger.kernel.org>,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] wmi: Set wmi devices' parents
Date: Fri, 27 Nov 2015 00:22:49 +0100	[thread overview]
Message-ID: <5696452.v4IW8cBceG@vostro.rjw.lan> (raw)
In-Reply-To: <CALCETrVf1kpGhY_2GtkVd9kWhs6MqcbyEL0jUja_y0YA9wXY2A@mail.gmail.com>

On Thursday, November 26, 2015 07:53:20 AM Andy Lutomirski wrote:
> On Thu, Nov 26, 2015 at 6:09 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> > On Wednesday, November 25, 2015 05:28:54 PM Andy Lutomirski wrote:
> >> On Mon, Nov 23, 2015 at 11:37 AM, Darren Hart <dvhart@infradead.org> wrote:
> >> > On Mon, Nov 23, 2015 at 11:25:30AM -0800, Andy Lutomirski wrote:
> >> >> Without this patch, wmi devices are in /sys/virtual/wmi.  They're
> >> >> logically children of the ACPI WMI device, so slot them into the
> >> >> device hierarchy.  With this change, on my laptop, they end up in
> >> >> /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C14:00/wmi and
> >> >> /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C14:01/wmi.
> >> >>
> >> >> Signed-off-by: Andy Lutomirski <luto@kernel.org>
> >> >
> >> > I'd like to hear from some of the main contributors to this driver:
> >> >
> >> > Matthew?
> >> > Carlos?
> >> > Len?
> >> >
> >> > Any cocnerns on this change?
> >> >
> >> > My initial concern is about changign how we expose this to userspace, but I
> >> > believe where it appears in the /sys/devices FS is NOT part of the
> >> > kernel-userspace interface commitment (per sysfs-rules.txt).
> >>
> >>
> >> Let's drop this, actually.  I have mostly-working patches to make wmi
> >> into an actual bus driver, and this intermediate step seems like it'll
> >> just confuse people.
> >>
> >> Question, though: where do the WMI devices belong?  Multiple choice:
> >>
> >> /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C14:01/[GUID]
> >>
> >> /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C14:01/wmi/[GUID]
> >>
> >> /sys/devices/platform/PNP0C14:01/[GUID]
> >>
> >> /sys/devices/platform/PNP0C14:01/wmi/[GUID]
> >>
> >> Currently I've implemented the first one because it's the smallest diff.
> >
> > That probably is not the right choice, though.
> >
> > ACPI "devices" are counterparts of DT device nodes and having other things
> > exported under them would be quite confusing.  In fact, you can argue that
> > the whole /sys/devices/LNXSYSTM:00/ directory should be located under
> > /sys/firmware/acpi, but it turns out to be difficult to move it there
> > for various reasons.
> >
> > Personally, I'd go for the last one.
> 
> Mechanically, how do I do that?  Should I register as just a platform
> driver and use acpi_device_install_notify_handler to get the ACPI
> notifications, or should I register as *both* a platform driver and
> ACPI driver?

If you have a platform device for this thing, registering an ACPI driver for it
is pretty much as valid as registering a driver for a DT device node.

So yes, a platform driver is a way to go here IMO.

Thanks,
Rafael

  reply	other threads:[~2015-11-26 22:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-23 19:25 [PATCH] wmi: Set wmi devices' parents Andy Lutomirski
2015-11-23 19:37 ` Darren Hart, Carlos Corbacho, Len Brown, Greg Kroah-Hartman
2015-11-23 19:40   ` Matthew Garrett
2015-11-26  1:28   ` Andy Lutomirski
2015-11-26 14:09     ` Rafael J. Wysocki
2015-11-26 15:53       ` Andy Lutomirski
2015-11-26 23:22         ` Rafael J. Wysocki [this message]
2015-11-30 18:51       ` Darren Hart
2015-11-30 19:00         ` Andy Lutomirski
2015-11-30 20:49     ` Darren Hart

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=5696452.v4IW8cBceG@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=carlos@strangeworlds.co.uk \
    --cc=dvhart@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=luto@kernel.org \
    --cc=mjg59@srcf.ucam.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;
as well as URLs for NNTP newsgroup(s).