Re: [PATCH 3/6] platform/x86: dell-smo8800: Move instantiation of lis3lv02d i2c_client from i2c-i801 to dell-smo8800

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Dec 24, 2023 at 11:36 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
>
> It is not necessary to handle the Dell specific instantiation of
> i2c_client-s for SMO8xxx ACPI devices without an ACPI I2cResource
> inside the generic i801 I2C adapter driver.
>
> The kernel already instantiates platform_device-s for these ACPI devices
> and the drivers/platform/x86/dell/dell-smo8800.c driver binds to these
> platform drivers.
>
> Move the i2c_client instantiation from the generic i2c-i801 driver to
> the Dell specific dell-smo8800 driver.

...

> +       static const u16 i801_idf_pci_device_ids[] = {
> +               0x1d70, /* Patsburg (PCH) */
> +               0x1d71, /* Patsburg (PCH) */
> +               0x1d72, /* Patsburg (PCH) */
> +               0x8d7d, /* Wellsburg (PCH) */
> +               0x8d7e, /* Wellsburg (PCH) */
> +               0x8d7f, /* Wellsburg (PCH) */
> +       };

I prefer to see this as a PCI ID table (yes, I know the downsides).

...

> +/* Ensure the i2c-801 driver is loaded for i2c_client instantiation */
> +MODULE_SOFTDEP("pre: i2c-i801");

JFYI: software module dependencies are not supported by all kmod
implementations in the user space. I don't expect people to complain,
but just let you know that this kind of change needs to be done with
care.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux