mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 09:46:43 +07:00
0b56129be7
ROHM BD2802GU is a RGB LED controller attached to i2c bus and specifically engineered for decoration purposes. This RGB controller incorporates lighting patterns and illuminates. This driver is designed to minimize power consumption, so when there is no emitting LED, it enters to reset state. And because the BD2802GU has lots of features that can't be covered by the current LED framework, it provides Advanced Configuration Function(ADF) mode, so that user applications can set registers of BD2802GU directly. Here are basic usage examples : ; to turn on LED (not blink) $ echo 1 > /sys/class/leds/led1_R/brightness ; to blink LED $ echo timer > /sys/class/leds/led1_R/trigger $ echo 1 > /sys/class/leds/led1_R/delay_on $ echo 1 > /sys/class/leds/led1_R/delay_off ; to turn off LED $ echo 0 > /sys/class/leds/led1_R/brightness [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Kim Kyuwon <chammoru@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
27 lines
642 B
C
27 lines
642 B
C
/*
|
|
* leds-bd2802.h - RGB LED Driver
|
|
*
|
|
* Copyright (C) 2009 Samsung Electronics
|
|
* Kim Kyuwon <q1.kim@samsung.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* 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{
|
|
int reset_gpio;
|
|
u8 rgb_time;
|
|
};
|
|
|
|
#define RGB_TIME(slopedown, slopeup, waveform) \
|
|
((slopedown) << 6 | (slopeup) << 4 | (waveform))
|
|
|
|
#endif /* _LEDS_BD2802_H_ */
|
|
|