Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1732756

Re: [PATCH v3] Add driver to force WMI Thunderbolt controller power status

From Lukas Wunner <lukas@wunner.de>
Newsgroups linux.kernel
Subject Re: [PATCH v3] Add driver to force WMI Thunderbolt controller power status
Date 2017-09-15 09:50 +0200
Message-ID <upTxT-8aA-1@gated-at.bofh.it> (permalink)
References (1 earlier) <upjE5-1RR-7@gated-at.bofh.it> <upx4n-293-11@gated-at.bofh.it> <upyD7-3bN-17@gated-at.bofh.it> <upDMu-6ln-29@gated-at.bofh.it> <upDWa-6Ei-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v3] Add driver to force WMI Thunderbolt controller power  status Lukas Wunner <lukas@wunner.de> - 2017-09-13 19:30 +0200
  RE: [PATCH v3] Add driver to force WMI Thunderbolt controller power  status <Mario.Limonciello@dell.com> - 2017-09-14 09:50 +0200
    Re: [PATCH v3] Add driver to force WMI Thunderbolt controller power  status Lukas Wunner <lukas@wunner.de> - 2017-09-14 11:30 +0200
      RE: [PATCH v3] Add driver to force WMI Thunderbolt controller power  status <Mario.Limonciello@dell.com> - 2017-09-14 17:00 +0200
        Re: [PATCH v3] Add driver to force WMI Thunderbolt controller power  status Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-09-14 17:10 +0200
          Re: [PATCH v3] Add driver to force WMI Thunderbolt controller power  status Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-09-14 17:20 +0200
          Re: [PATCH v3] Add driver to force WMI Thunderbolt controller power  status Lukas Wunner <lukas@wunner.de> - 2017-09-15 09:50 +0200
            RE: [PATCH v3] Add driver to force WMI Thunderbolt controller power  status <Mario.Limonciello@dell.com> - 2017-09-15 18:40 +0200

csiph-web