mbox series

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

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

Message

Gwendal Grignou March 26, 2021, 6:46 p.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.

Changes in v7:
Used incorrect device object in v6 to retrieve device tree properties.
Fully tested on machines with device tree and ACPI bindings.

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