public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 0/2] iio: sx9310: Support ACPI properties
@ 2021-03-26 18:46 Gwendal Grignou
  2021-03-26 18:46 ` [PATCH v7 1/2] iio: sx9310: Fix access to variable DT array Gwendal Grignou
  2021-03-26 18:46 ` [PATCH v7 2/2] iio: sx9310: Support ACPI properties Gwendal Grignou
  0 siblings, 2 replies; 4+ messages in thread
From: Gwendal Grignou @ 2021-03-26 18:46 UTC (permalink / raw)
  To: jic23, lars, swboyd, campello, andy.shevchenko, ardeleanalex
  Cc: linux-iio, Gwendal Grignou

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

-- 
2.31.0.291.g576ba9dcdaf-goog


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-29 12:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-26 18:46 [PATCH v7 0/2] iio: sx9310: Support ACPI properties Gwendal Grignou
2021-03-26 18:46 ` [PATCH v7 1/2] iio: sx9310: Fix access to variable DT array Gwendal Grignou
2021-03-29 12:18   ` Jonathan Cameron
2021-03-26 18:46 ` [PATCH v7 2/2] iio: sx9310: Support ACPI properties Gwendal Grignou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox