public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/6] i2c-i801 / dell-smo8800: Move instantiation of lis3lv02d i2c_client from i2c-i801 to dell-smo8800
@ 2024-06-21 12:24 Hans de Goede
  2024-06-21 12:24 ` [PATCH v3 1/6] i2c: core: Setup i2c_adapter runtime-pm before calling device_add() Hans de Goede
                   ` (5 more replies)
  0 siblings, 6 replies; 48+ messages in thread
From: Hans de Goede @ 2024-06-21 12:24 UTC (permalink / raw)
  To: Pali Rohár, Ilpo Järvinen, Andy Shevchenko, Paul Menzel,
	Wolfram Sang
  Cc: Hans de Goede, eric.piel, Marius Hoch, Dell.Client.Kernel,
	Kai Heng Feng, platform-driver-x86, Jean Delvare, Andi Shyti,
	linux-i2c

Hi All,

Here is v3 of my patch series to move the manual instantation of lis3lv02d
i2c_client-s for SMO88xx ACPI device from the generic i2c-i801.c code to
the SMO88xx specific dell-smo8800 driver.

Moving the i2c_client instantiation there has the following advantages:

1. This moves the SMO88xx ACPI device quirk handling away from the generic
i2c-i801 module which is loaded on all Intel x86 machines to the SMO88xx
specific dell-smo8800 module where it belongs.

2. This removes the duplication of the SMO88xx ACPI Hardware ID (HID) table
between the i2c-i801 and dell-smo8800 drivers.

3. This allows extending the quirk handling by adding new code and related
module parameters to the dell-smo8800 driver, without needing to modify
the i2c-i801 code.

This series also extends the i2c_client instantiation with support for
probing for the i2c-address of the lis3lv02d chip on devices which
are not yet listed in the DMI table with i2c-addresses for known models.
This probing is only done when requested through a module parameter.

The probing support adds quite a bit of code which shows why it is good
to move the handling out of the generic i2c-i801 code.

Changes in v3:
- Use an i2c bus notifier so that the i2c_client will still be instantiated if
  the i801 i2c_adapter shows up later or is re-probed (removed + added again).
  This addresses the main concern / review-comments made during review of v2.
- Add 2 prep patches to the i2c-core / the i2c-i801 driver to allow bus-notifier
  use / to avoid the need to duplicate the PCI-ids of IDF i2c-i801 adapters.
- Switch to standard dmi_system_id matching to check both sys-vendor +
  product-name DMI fields
- Drop the patch to alternatively use the st_accel IIO driver instead of
  drivers/misc/lis3lv02d/lis3lv02d.c

Changes in v2:
- Drop "[PATCH 1/6] platform/x86: dell-smo8800: Only load on Dell laptops"
- Use a pci_device_id table to check for IDF (non main) i2c-i801 SMBusses
- Add a comment documenting the IDF PCI device ids
- Keep using drivers/misc/lis3lv02d/lis3lv02d.c by default
- Rename the module-parameter to use_iio_driver which can be set to
  use the IIO st_accel driver instead
- Add a new patch adding the accelerometer address for the 2 models
  I have tested this on to dell_lis3lv02d_devices[]

Since this touches files under both drivers/i2c and drivers/platform/x86
some subsystem coordination is necessary. I think it would be best to just
merge the entire series through the i2c subsystem since this touches some
core i2c files. As pdx86 subsys co-maintainer I'm fine with doing so.

Regards,

Hans


Hans de Goede (6):
  i2c: core: Setup i2c_adapter runtime-pm before calling device_add()
  i2c: i801: Use a different adapter-name for IDF adapters
  platform/x86: dell-smo8800: Move instantiation of lis3lv02d i2c_client
    from i2c-i801 to dell-smo8800
  platform/x86: dell-smo8800: Allow lis3lv02d i2c_client instantiation
    without IRQ
  platform/x86: dell-smo8800: Add a couple more models to
    dell_lis3lv02d_devices[]
  platform/x86: dell-smo8800: Add support for probing for the
    accelerometer i2c address

 drivers/i2c/busses/i2c-i801.c            | 133 +------
 drivers/i2c/i2c-core-base.c              |  13 +-
 drivers/platform/x86/dell/dell-smo8800.c | 438 +++++++++++++++++++++--
 3 files changed, 424 insertions(+), 160 deletions(-)

-- 
2.45.1


^ permalink raw reply	[flat|nested] 48+ messages in thread

end of thread, other threads:[~2024-06-23 14:30 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-21 12:24 [PATCH v3 0/6] i2c-i801 / dell-smo8800: Move instantiation of lis3lv02d i2c_client from i2c-i801 to dell-smo8800 Hans de Goede
2024-06-21 12:24 ` [PATCH v3 1/6] i2c: core: Setup i2c_adapter runtime-pm before calling device_add() Hans de Goede
2024-06-21 15:08   ` Andy Shevchenko
2024-06-21 12:24 ` [PATCH v3 2/6] i2c: i801: Use a different adapter-name for IDF adapters Hans de Goede
2024-06-21 15:13   ` Andy Shevchenko
2024-06-22 12:46   ` Pali Rohár
2024-06-22 13:56     ` Hans de Goede
2024-06-22 14:08       ` Pali Rohár
2024-06-22 14:14         ` Hans de Goede
2024-06-22 14:23           ` Pali Rohár
2024-06-22 14:29             ` Hans de Goede
2024-06-22 15:07               ` Pali Rohár
2024-06-23 13:58                 ` Hans de Goede
2024-06-21 12:24 ` [PATCH v3 3/6] platform/x86: dell-smo8800: Move instantiation of lis3lv02d i2c_client from i2c-i801 to dell-smo8800 Hans de Goede
2024-06-21 15:24   ` Andy Shevchenko
2024-06-22 13:59     ` Hans de Goede
2024-06-22 13:16   ` Pali Rohár
2024-06-22 14:06     ` Hans de Goede
2024-06-22 14:20       ` Pali Rohár
2024-06-22 14:26         ` Hans de Goede
2024-06-22 15:12           ` Pali Rohár
2024-06-22 16:35             ` Pali Rohár
2024-06-23 13:56               ` Hans de Goede
2024-06-23 14:09                 ` Hans de Goede
2024-06-22 22:36           ` Andy Shevchenko
2024-06-22 22:41             ` Pali Rohár
2024-06-22 16:26         ` Pali Rohár
2024-06-23 13:46           ` Hans de Goede
2024-06-22 16:43         ` Pali Rohár
2024-06-22 22:43           ` Andy Shevchenko
2024-06-22 22:50             ` Pali Rohár
2024-06-22 22:53               ` Andy Shevchenko
2024-06-23 14:00           ` Hans de Goede
2024-06-22 15:35   ` Pali Rohár
2024-06-23 13:45     ` Hans de Goede
2024-06-23 14:30   ` Pali Rohár
2024-06-21 12:24 ` [PATCH v3 4/6] platform/x86: dell-smo8800: Allow lis3lv02d i2c_client instantiation without IRQ Hans de Goede
2024-06-21 15:30   ` Andy Shevchenko
2024-06-22 13:20   ` Pali Rohár
2024-06-22 14:07     ` Hans de Goede
2024-06-22 15:14       ` Pali Rohár
2024-06-21 12:25 ` [PATCH v3 5/6] platform/x86: dell-smo8800: Add a couple more models to dell_lis3lv02d_devices[] Hans de Goede
2024-06-21 12:25 ` [PATCH v3 6/6] platform/x86: dell-smo8800: Add support for probing for the accelerometer i2c address Hans de Goede
2024-06-21 15:37   ` Andy Shevchenko
2024-06-22 13:32   ` Pali Rohár
2024-06-22 14:21     ` Hans de Goede
2024-06-22 14:50       ` Pali Rohár
2024-06-22 22:50         ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox