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

Jean Delvare
2024-02-13T16:30:57Z

Hi Pali, Hans,

On Sun, 7 Jan 2024 18:10:55 +0100, Pali Rohár wrote:
> On Saturday 06 January 2024 17:09:29 Hans de Goede 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.
> >
> > Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> > ---
> > Changes in v2:
> > - Use a pci_device_id table to check for IDF (non main) i2c-i801 SMBusses
> > - Add a comment documenting the IDF PCI device ids
> > ---
> > drivers/i2c/busses/i2c-i801.c | 126 +----------------------
> > drivers/platform/x86/dell/dell-smo8800.c | 121 +++++++++++++++++++++-
> > 2 files changed, 123 insertions(+), 124 deletions(-)
>
> I'm looking at this change again and I'm not not sure if it is a good
> direction to do this movement. (...)

Same feeling here. Having to lookup the parent i2c bus, which may or
may not be present yet, doesn't feel good.

I wouldn't object if everybody was happy with the move and moving the
code was solving an actual issue, but that doesn't seem to be the case.

--
Jean Delvare
SUSE L3 Support