hwmon: (sht15) Root out platform data
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 10 Sep 2017 09:44:46 +0000 (11:44 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 30 Oct 2017 01:36:03 +0000 (18:36 -0700)
commit186731145f920fb1514200043bcaf9c689693857
tree1ba4a4b99bda0fb42cd79770a52f39979e1ee9ed
parent1b50b776355fa6c6d7b3281a63c275d5c18d629d
hwmon: (sht15) Root out platform data

After finding out there are active users of this sensor I noticed:

- It has a single PXA27x board file using the platform data
- The platform data is only used to carry two GPIO pins, all other
  fields are unused
- The driver does not use GPIO descriptors but the legacy GPIO
  API

I saw we can swiftly fix this by:

- Killing off the platform data entirely
- Define a GPIO descriptor lookup table in the board file
- Use the standard devm_gpiod_get() to grab the GPIO descriptors
  from either the device tree or the board file table.

This compiles, but needs testing.

Cc: arm@kernel.org
Cc: Marco Franchi <marco.franchi@nxp.com>
Cc: Davide Hug <d@videhug.ch>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Marco Franchi <marco.franchi@nxp.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Documentation/hwmon/sht15
arch/arm/mach-pxa/stargate2.c
drivers/hwmon/sht15.c
include/linux/platform_data/sht15.h [deleted file]