leds: bd2802: Convert to use GPIO descriptors

The Rohm BD2802 have no in-kernel users so we can drop the
GPIO number from the platform data and require users to
provide the GPIO line using machine descriptors.

As the descriptors come with inherent polarity inversion
semantics, we invert the calls to set the GPIO line such
that 0 means "unasserted" and 1 means "asserted".

Put a note in the driver that machine descriptor tables
will need to specify that the line is active low.

Cc: Kim Kyuwon <chammoru@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
This commit is contained in:
Linus Walleij 2019-12-09 01:42:42 +01:00 committed by Pavel
parent 697529091a
commit 4c3718f9d6
2 changed files with 18 additions and 10 deletions

View file

@ -11,7 +11,6 @@
#define _LEDS_BD2802_H_
struct bd2802_led_platform_data{
int reset_gpio;
u8 rgb_time;
};