mbox series

[v6,0/2] iio: sx9310: Support ACPI properties

Message ID 20210322073220.1637117-1-gwendal@chromium.org (mailing list archive)
Headers show
Series iio: sx9310: Support ACPI properties | expand

Message

Gwendal Grignou March 22, 2021, 7:32 a.m. UTC
Current sx9310 driver only support device tree properties.
Add support to read ACPI properties as well by converting calls
of_property_read_uXX() to device_property_read_uXX().

A bug was uncovered: if "semtech,combined-sensors" array was less than
4 entries, its content would be ignored, as of_property_read_u32_array
would return -EOVERFLOW.

Gwendal Grignou (2):
  iio: sx9310: Fix access to variable DT array
  iio: sx9310: Support ACPI properties

 drivers/iio/proximity/sx9310.c | 56 +++++++++++++++++++++-------------
 1 file changed, 34 insertions(+), 22 deletions(-)