iio: accel: bmc150: Refactor bmc150_apply_acpi_orientation()
authorHans de Goede <hdegoede@redhat.com>
Sun, 23 May 2021 17:01:02 +0000 (19:01 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 9 Jun 2021 19:53:41 +0000 (20:53 +0100)
commit61ddd0a75d14311b0c4d5de06bec7afeb8b21612
tree764c31319909c6560dea50fab2a121c9a9631932
parentaddab6febc42ed94e4eee1abbe486150e4f8b9e9
iio: accel: bmc150: Refactor bmc150_apply_acpi_orientation()

Factor the BOSC0200 ACPI HID handling out into a new
bmc150_apply_bosc0200_acpi_orientation() function and make
bmc150_apply_acpi_orientation() call that when dealing with
a BOSC0200 ACPI device (and make it return false otherwise).

This is a preparation patch for adding special handling for other
ACPI HIDs (the "DUAL250E" HID).

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20210523170103.176958-9-hdegoede@redhat.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/bmc150-accel-core.c