forked from luck/tmp_suning_uos_patched
4c3718f9d6
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>
22 lines
476 B
C
22 lines
476 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* leds-bd2802.h - RGB LED Driver
|
|
*
|
|
* Copyright (C) 2009 Samsung Electronics
|
|
* Kim Kyuwon <q1.kim@samsung.com>
|
|
*
|
|
* Datasheet: http://www.rohm.com/products/databook/driver/pdf/bd2802gu-e.pdf
|
|
*/
|
|
#ifndef _LEDS_BD2802_H_
|
|
#define _LEDS_BD2802_H_
|
|
|
|
struct bd2802_led_platform_data{
|
|
u8 rgb_time;
|
|
};
|
|
|
|
#define RGB_TIME(slopedown, slopeup, waveform) \
|
|
((slopedown) << 6 | (slopeup) << 4 | (waveform))
|
|
|
|
#endif /* _LEDS_BD2802_H_ */
|
|
|