Skip to content

ACPI/i2c Enumerate several instances out of one fwnode

Hans de Goede linux-iio 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9ACPI: export __acpi_match_device and __acpi_device[_uevent]_modaliasdrivers/acpi/bus.c drivers/acpi/device_sysfs.c include/linux/acpi.h+20 -60 replies
2/9i2c: Allow specifying irq-index to be used in i2c_device_probe()drivers/i2c/i2c-core-base.c include/linux/i2c.h+10 -22 replies
3/9i2c: acpi: Introduce i2c_acpi_get_i2c_resource() helperdrivers/i2c/i2c-core-acpi.c include/linux/acpi.h+30 -120 replies
4/9i2c: acpi: Allow get info by index in i2c_acpi_get_info()drivers/i2c/i2c-core-acpi.c+10 -50 replies
5/9i2c: acpi: Enumerate several instances out of one devicedrivers/i2c/i2c-core-acpi.c drivers/i2c/i2c-core-base.c drivers/i2c/i2c-core.h+112 -80 replies
6/9i2c: acpi: Add BSG1160 to i2c_acpi_multiple_devices_idsdrivers/i2c/i2c-core-acpi.c+1 -00 replies
7/9iio: accel: bmc150: Add support for BSG1160 ACPI HIDdrivers/iio/accel/bmc150-accel-i2c.c drivers/iio/accel/bmc150-accel.h+9 -00 replies
8/9iio: gyro: bmg160: Add support for BSG1160 ACPI HIDdrivers/iio/gyro/bmg160_i2c.c+9 -00 replies
9/9iio: magnetometer: bmc150: Add support for BSG1160 ACPI HIDdrivers/iio/magnetometer/bmc150_magn_i2c.c+9 -00 replies

Reviews trailers per patch

1 of 9 patches has a Reviewed-by or Acked-by.

PatchAndy Shevchenko
1/9
2/9R-b
3/9
4/9
5/9
6/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/9] ACPI/i2c Enumerate several instances out of one fwnode

Hi All,

This series really consists of 2 series, patches 1-5 add support for interesting ACPI tables which describe multiple i2c chips in a single fwnode, sometimes multiple cases of the same chip on different addresses, sometimes a bunch of related chips.

Andy Shevchenko has come up with the solution of adding a quirk based on the ACPI HID of the fwnode for these devices which makes the drivers/i2c/i2c-core-acpi.c code instantiate separate i2c_client devices for each I2cSerialBusV2 in the fwnode. I agree with him that this is the best (least ugly) solution for this.

I've been testing this solution on a device if mine which needs a solution for this, the HP Pavilion x2 - 10-n000nd 2-in-1 has an acpi_device / fwnode with a HID of BSG1160 which describes 3 different i2c sensors in an accel / magneto / gyro sensor cluster on the tablet. This has let to some extra prep. patches and some fixes to Andy's patches.

Patches 6-9 use the new functionality creating one i2c-client per I2cSerialBusV2 resource to make the sensor cluster on the HP X2 work and are posted as part of this series to show how this functionality can be used.

Assuming everyone is ok with this series (I'm not expecting anyone to be really happy about the need for this), then I suggest that patches 1-6 get merged togther through either the ACPI or the i2c tree, I guess the i2c tree would make somewhat more sense, since most patches are there.

Then once those are accepted patches 7-9 can be merged into the iio tree, there is no compile time dependency between the 2, so these can be merged separately. Note merging 7-9 before there is agreement that this is the right way to fix this is probably not a good idea.

Regards,

Hans