All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Mario.Limonciello@dell.com, dvhart@infradead.org,
	linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org, hughsient@gmail.com,
	yehezkelshb@gmail.com
Subject: Re: [PATCH v3] Add driver to force WMI Thunderbolt controller power status
Date: Fri, 15 Sep 2017 09:44:39 +0200	[thread overview]
Message-ID: <20170915074439.GA17644@wunner.de> (raw)
In-Reply-To: <20170914145919.GU2477@lahna.fi.intel.com>

On Thu, Sep 14, 2017 at 05:59:19PM +0300, Mika Westerberg wrote:
> On Thu, Sep 14, 2017 at 02:52:27PM +0000, Mario.Limonciello@dell.com wrote:
> > > Looking at drivers/platform/x86/wmi.c:wmi_dev_uevent() it seems that
> > > a modalias consisting of "wmi:" followed by the GUID is sent to udevd.
> > > For udevd to then load the module, I suspect you need to add a
> > > MODULE_DEVICE_TABLE(wmi, ...) to your driver.
> > 
> > Ah, you're looking for this code from the WMI bus driver:
> > https://github.com/torvalds/linux/blob/master/drivers/platform/x86/wmi.c#L724
> > 
> > That happens when the bus is initialized.
> 
> That's right you get the uevent and whatnot but Lucas means that if you
> don't have MODULE_DEVICE_TABLE(wmi, ...) in the driver, udev cannot load
> the module automatically when the device appears.

Digging a bit deeper I notice the wmi drivers seem to solve this by
directly declaring a MODULE_ALIAS(), which is also present in Mario's
driver.  Mario, have you tested if auto-loading works if compiled as
a module?  If so, sorry for the noise.

Thanks,

Lukas

  parent reply	other threads:[~2017-09-15  7:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-08 15:23 [PATCH v3] Add driver to force WMI Thunderbolt controller power status Mario Limonciello
2017-09-09  7:09 ` Mika Westerberg
2017-09-09 18:39   ` Yehezkel Bernat
2017-09-11 21:44 ` Darren Hart
2017-09-12 19:19   ` Mario.Limonciello
2017-09-12 19:19     ` Mario.Limonciello
2017-09-13 17:20 ` Lukas Wunner
2017-09-14  6:42   ` Mario.Limonciello
2017-09-14  6:42     ` Mario.Limonciello
2017-09-14  9:14     ` Lukas Wunner
2017-09-14 14:52       ` Mario.Limonciello
2017-09-14 14:52         ` Mario.Limonciello
2017-09-14 14:59         ` Mika Westerberg
2017-09-14 15:05           ` Mika Westerberg
2017-09-15  7:44           ` Lukas Wunner [this message]
2017-09-15 16:34             ` Mario.Limonciello
2017-09-15 16:34               ` Mario.Limonciello

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=20170915074439.GA17644@wunner.de \
    --to=lukas@wunner.de \
    --cc=Mario.Limonciello@dell.com \
    --cc=dvhart@infradead.org \
    --cc=hughsient@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=yehezkelshb@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.