Re: [RFC 0/4] platform/x86: i2c-multi-instantiate: Pass ACPI fwnode to instantiated i2c-clients

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

 



On Thu, Nov 5, 2020 at 10:00 AM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
>
> Hi All,
>
> As the subject says this series is mostly about passing the ACPI fwnode to
> i2c-clients instantiated by the i2c-multi-instantiate code.
>
> As discussed here:
> https://bugzilla.kernel.org/show_bug.cgi?id=198671
>
> BOSC0200 ACPI devices may sometimes describe 2 accelerometers in a single
> ACPI device, while working on this I noticed that BOSC0200 ACPI nodes
> contain ACCEL_MOUNT_MATRIX info (unlike all the other ACPI ids for bmc150
> accelerometers). Which is why I wanted to pass the fwnode so that we
> could use this info in the bmc150-accel driver.
>
> The plan was to use i2c-multi-instantiate for this, but doing so will
> change the modalias and /lib/udev/hwdb.d/60-sensor.hwdb matches on
> the modalias for various quirks setting ACCEL_MOUNT_MATRIX. So then the
> plan became to first add support for the mount-matrix provided inside
> the BOSC0200 ACPI node, making the udev info unnecessary. But for at
> least 1 model (and probably more) the BOSC0200 ACPI node and hwdb info
> does not match and since the hwdb info is added by users of the actual
> devices we can assume it is correct, so it seems that we cannot always
> trust the ACPI provided info.  This is ok, the hwdb info overrides it
> (iio-sensor-proxy prefers the udev provided mount-matrix over the
> one provided by the driver) but this means that we MUST keep the
> existing hwdb matches working, which means that we cannot use
> i2c-multi-instantiate for this.
>
> Instead I will dust of an old patch for this from Jeremy Cline:
> https://patchwork.kernel.org/project/linux-iio/patch/010001602cf53153-39ad69f1-1b39-4e6d-a748-9455a16c2fbd-000000@xxxxxxxxxxxxxxxxxxx/
>
> Which deals with there being 2 accelerometers inside the bmc150-accel
> driver.
>
> But before coming to the conclusion that i2c-multi-instantiate
> would not work I had already written this series. Since this might
> be useful for some other case in the future I'm sending this out
> as a RFC now, mostly so that it gets added to the archives.

I think they are in pretty good shape (only the 4th required a bit of
attention).

Please, send as non-RFC and also Cc Heikki (just in case if he has
comments wrt INT3515).

-- 
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