mbox series

[0/6] MODULE_DEVICE_TABLE() support for the ISHTP bus

Message ID 20211029152901.297939-1-linux@weissschuh.net (mailing list archive)
Headers show
Series MODULE_DEVICE_TABLE() support for the ISHTP bus | expand

Message

Thomas Weißschuh Oct. 29, 2021, 3:28 p.m. UTC
Currently as soon as any ISHTP device appears all available ISHTP device
drivers are loaded automatically.
This series extends the MODULE_DEVICE_TABLE() functionality to properly handle
the ishtp bus and switches the drivers over to use it.

Patch 1 adds the infrastructure to handle ishtp devices via MODULE_DEVICE_TABLE()
Patch 2 replaces some inlined constants with ones now defined by mod_devicetable.h
Patches 3-6 migrate all ishtp drivers to MODULE_DEVICE_TABLE()

Note: This patchset is based on the pdx86/for-next tree because that contains
one of the drivers that is not yet in the other trees.

Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Mark Gross <markgross@kernel.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Rushikesh S Kadam <rushikesh.s.kadam@intel.com>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Guenter Roeck <groeck@chromium.org>
Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Cc: Benson Leung <bleung@chromium.org>

Cc: platform-driver-x86@vger.kernel.org
Cc: linux-kbuild@vger.kernel.org

Thomas Weißschuh (6):
  HID: intel-ish-hid: add support for MODULE_DEVICE_TABLE()
  HID: intel-ish-hid: use constants for modaliases
  HID: intel-ish-hid: fw-loader: only load for matching devices
  HID: intel-ish-hid: hid-client: only load for matching devices
  platform/chrome: chros_ec_ishtp: only load for matching devices
  platform/x86: isthp_eclite: only load for matching devices

 drivers/hid/intel-ish-hid/ishtp-fw-loader.c  |  7 +++++-
 drivers/hid/intel-ish-hid/ishtp-hid-client.c |  7 +++++-
 drivers/hid/intel-ish-hid/ishtp/bus.c        |  4 ++--
 drivers/platform/chrome/cros_ec_ishtp.c      |  7 +++++-
 drivers/platform/x86/intel/ishtp_eclite.c    |  7 +++++-
 include/linux/mod_devicetable.h              | 13 +++++++++++
 scripts/mod/devicetable-offsets.c            |  3 +++
 scripts/mod/file2alias.c                     | 24 ++++++++++++++++++++
 8 files changed, 66 insertions(+), 6 deletions(-)


base-commit: 85303db36b6e170917a7bc6aae4898c31a5272a0

Comments

Hans de Goede Nov. 1, 2021, 9:56 a.m. UTC | #1
Hi,

On 10/29/21 17:28, Thomas Weißschuh wrote:
> Currently as soon as any ISHTP device appears all available ISHTP device
> drivers are loaded automatically.
> This series extends the MODULE_DEVICE_TABLE() functionality to properly handle
> the ishtp bus and switches the drivers over to use it.
> 
> Patch 1 adds the infrastructure to handle ishtp devices via MODULE_DEVICE_TABLE()
> Patch 2 replaces some inlined constants with ones now defined by mod_devicetable.h
> Patches 3-6 migrate all ishtp drivers to MODULE_DEVICE_TABLE()
> 
> Note: This patchset is based on the pdx86/for-next tree because that contains
> one of the drivers that is not yet in the other trees.

Since most of the changes here are under drivers/hid and since the latter
patches depend on 1/6, I believe it would be best to merge the entire series
through the HID tree, here is my ack for this:

Acked-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans


> 
> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> Cc: Mark Gross <markgross@kernel.org>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: Rushikesh S Kadam <rushikesh.s.kadam@intel.com>
> Cc: Jiri Kosina <jikos@kernel.org>
> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Cc: Guenter Roeck <groeck@chromium.org>
> Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Cc: Benson Leung <bleung@chromium.org>
> 
> Cc: platform-driver-x86@vger.kernel.org
> Cc: linux-kbuild@vger.kernel.org
> 
> Thomas Weißschuh (6):
>   HID: intel-ish-hid: add support for MODULE_DEVICE_TABLE()
>   HID: intel-ish-hid: use constants for modaliases
>   HID: intel-ish-hid: fw-loader: only load for matching devices
>   HID: intel-ish-hid: hid-client: only load for matching devices
>   platform/chrome: chros_ec_ishtp: only load for matching devices
>   platform/x86: isthp_eclite: only load for matching devices
> 
>  drivers/hid/intel-ish-hid/ishtp-fw-loader.c  |  7 +++++-
>  drivers/hid/intel-ish-hid/ishtp-hid-client.c |  7 +++++-
>  drivers/hid/intel-ish-hid/ishtp/bus.c        |  4 ++--
>  drivers/platform/chrome/cros_ec_ishtp.c      |  7 +++++-
>  drivers/platform/x86/intel/ishtp_eclite.c    |  7 +++++-
>  include/linux/mod_devicetable.h              | 13 +++++++++++
>  scripts/mod/devicetable-offsets.c            |  3 +++
>  scripts/mod/file2alias.c                     | 24 ++++++++++++++++++++
>  8 files changed, 66 insertions(+), 6 deletions(-)
> 
> 
> base-commit: 85303db36b6e170917a7bc6aae4898c31a5272a0
>
Thomas Weißschuh Nov. 1, 2021, 10:12 a.m. UTC | #2
On 2021-11-01 10:56+0100, Hans de Goede wrote:
> On 10/29/21 17:28, Thomas Weißschuh wrote:
> > Currently as soon as any ISHTP device appears all available ISHTP device
> > drivers are loaded automatically.
> > This series extends the MODULE_DEVICE_TABLE() functionality to properly handle
> > the ishtp bus and switches the drivers over to use it.
> > 
> > Patch 1 adds the infrastructure to handle ishtp devices via MODULE_DEVICE_TABLE()
> > Patch 2 replaces some inlined constants with ones now defined by mod_devicetable.h
> > Patches 3-6 migrate all ishtp drivers to MODULE_DEVICE_TABLE()
> > 
> > Note: This patchset is based on the pdx86/for-next tree because that contains
> > one of the drivers that is not yet in the other trees.
> 
> Since most of the changes here are under drivers/hid and since the latter
> patches depend on 1/6, I believe it would be best to merge the entire series
> through the HID tree, here is my ack for this:
> 
> Acked-by: Hans de Goede <hdegoede@redhat.com>

Please note that patch 6 modifies a driver that is not yet available in the HID
and 5.15 trees but only in pdx86/for-next.

Thomas
Hans de Goede Nov. 1, 2021, 10:17 a.m. UTC | #3
Hi,

On 11/1/21 11:12, Thomas Weißschuh wrote:
> On 2021-11-01 10:56+0100, Hans de Goede wrote:
>> On 10/29/21 17:28, Thomas Weißschuh wrote:
>>> Currently as soon as any ISHTP device appears all available ISHTP device
>>> drivers are loaded automatically.
>>> This series extends the MODULE_DEVICE_TABLE() functionality to properly handle
>>> the ishtp bus and switches the drivers over to use it.
>>>
>>> Patch 1 adds the infrastructure to handle ishtp devices via MODULE_DEVICE_TABLE()
>>> Patch 2 replaces some inlined constants with ones now defined by mod_devicetable.h
>>> Patches 3-6 migrate all ishtp drivers to MODULE_DEVICE_TABLE()
>>>
>>> Note: This patchset is based on the pdx86/for-next tree because that contains
>>> one of the drivers that is not yet in the other trees.
>>
>> Since most of the changes here are under drivers/hid and since the latter
>> patches depend on 1/6, I believe it would be best to merge the entire series
>> through the HID tree, here is my ack for this:
>>
>> Acked-by: Hans de Goede <hdegoede@redhat.com>
> 
> Please note that patch 6 modifies a driver that is not yet available in the HID
> and 5.15 trees but only in pdx86/for-next.

Right, but given where we are in the cycle this is going to be something to
merge post 5.16-rc1 anyways which resolves the dependency issue.

I guess it might be good to send this our in a later pull-req as a fix series
for a later 5.16-rc# though, to avoid the eclite and chrome-ec drivers from
autoloading on all systems with an ISH, even though they usually will not be
used there.

Regards,

Hans
Jiri Kosina Nov. 2, 2021, 11:50 a.m. UTC | #4
On Mon, 1 Nov 2021, Hans de Goede wrote:

> >> Since most of the changes here are under drivers/hid and since the latter
> >> patches depend on 1/6, I believe it would be best to merge the entire series
> >> through the HID tree, here is my ack for this:
> >>
> >> Acked-by: Hans de Goede <hdegoede@redhat.com>
> > 
> > Please note that patch 6 modifies a driver that is not yet available in the HID
> > and 5.15 trees but only in pdx86/for-next.
> 
> Right, but given where we are in the cycle this is going to be something to
> merge post 5.16-rc1 anyways which resolves the dependency issue.
> 
> I guess it might be good to send this our in a later pull-req as a fix series
> for a later 5.16-rc# though, to avoid the eclite and chrome-ec drivers from
> autoloading on all systems with an ISH, even though they usually will not be
> used there.

I'll be happy to take this as 5.16 fixups after the merge window is over 
(I am not adding anything new to the branches now, before Linus merges HID 
tree), but I'd still like to see Ack from Srinivas.

Thanks,
srinivas pandruvada Nov. 2, 2021, 1:17 p.m. UTC | #5
On Tue, 2021-11-02 at 12:50 +0100, Jiri Kosina wrote:
> On Mon, 1 Nov 2021, Hans de Goede wrote:
> 
> > > > Since most of the changes here are under drivers/hid and since
> > > > the latter
> > > > patches depend on 1/6, I believe it would be best to merge the
> > > > entire series
> > > > through the HID tree, here is my ack for this:
> > > > 
> > > > Acked-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

> > > 
> > > Please note that patch 6 modifies a driver that is not yet
> > > available in the HID
> > > and 5.15 trees but only in pdx86/for-next.
> > 
> > Right, but given where we are in the cycle this is going to be
> > something to
> > merge post 5.16-rc1 anyways which resolves the dependency issue.
> > 
> > I guess it might be good to send this our in a later pull-req as a
> > fix series
> > for a later 5.16-rc# though, to avoid the eclite and chrome-ec
> > drivers from
> > autoloading on all systems with an ISH, even though they usually
> > will not be
> > used there.
> 
> I'll be happy to take this as 5.16 fixups after the merge window is
> over 
> (I am not adding anything new to the branches now, before Linus
> merges HID 
> tree), but I'd still like to see Ack from Srinivas.
Done.

Thanks,
Srinivas

> 
> Thanks,
>
Jiri Kosina Nov. 9, 2021, 10:42 a.m. UTC | #6
On Fri, 29 Oct 2021, Thomas Weißschuh wrote:

> Currently as soon as any ISHTP device appears all available ISHTP device
> drivers are loaded automatically.
> This series extends the MODULE_DEVICE_TABLE() functionality to properly handle
> the ishtp bus and switches the drivers over to use it.
> 
> Patch 1 adds the infrastructure to handle ishtp devices via MODULE_DEVICE_TABLE()
> Patch 2 replaces some inlined constants with ones now defined by mod_devicetable.h
> Patches 3-6 migrate all ishtp drivers to MODULE_DEVICE_TABLE()
> 
> Note: This patchset is based on the pdx86/for-next tree because that contains
> one of the drivers that is not yet in the other trees.
> 
> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> Cc: Mark Gross <markgross@kernel.org>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: Rushikesh S Kadam <rushikesh.s.kadam@intel.com>
> Cc: Jiri Kosina <jikos@kernel.org>
> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Cc: Guenter Roeck <groeck@chromium.org>
> Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Cc: Benson Leung <bleung@chromium.org>
> 
> Cc: platform-driver-x86@vger.kernel.org
> Cc: linux-kbuild@vger.kernel.org

Applied to hid.git#for-5.16/upstream-fixes. Thanks,