drivers: leds: Import AW2015 driver
* From dagu-s-oss * Run clang-format on source files Change-Id: I2409109464039fb702f0bbc2720330e73bc8a387
This commit is contained in:
committed by
Sebastiano Barezzi
parent
05257703f2
commit
16ebaceba7
@@ -816,6 +816,13 @@ config LEDS_QPNP_VIBRATOR
|
||||
manually or by the DTEST lines.It uses the android timed-output
|
||||
framework.
|
||||
|
||||
config LEDS_AW2015
|
||||
tristate "LED Support for AW2015"
|
||||
depends on LEDS_CLASS && I2C
|
||||
help
|
||||
this option enables support for the AW2015 RGB LED connected
|
||||
through I2C. Say Y to enable support for the AW2015 LED.
|
||||
|
||||
comment "LED Triggers"
|
||||
source "drivers/leds/trigger/Kconfig"
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@ obj-$(CONFIG_LEDS_QTI_TRI_LED) += leds-qti-tri-led.o
|
||||
obj-$(CONFIG_LEDS_QPNP_FLASH_V2) += leds-qpnp-flash-v2.o leds-qpnp-flash-common.o
|
||||
obj-$(CONFIG_LEDS_QPNP_VIBRATOR_LDO) += leds-qpnp-vibrator-ldo.o
|
||||
obj-$(CONFIG_LEDS_QPNP_VIBRATOR) += leds-qpnp-vibrator.o
|
||||
obj-$(CONFIG_LEDS_AW2015) += leds-aw2015.o
|
||||
|
||||
# LED SPI Drivers
|
||||
obj-$(CONFIG_LEDS_CR0014114) += leds-cr0014114.o
|
||||
|
||||
1122
drivers/leds/leds-aw2015.c
Normal file
1122
drivers/leds/leds-aw2015.c
Normal file
File diff suppressed because it is too large
Load Diff
43
include/linux/leds-aw2015.h
Normal file
43
include/linux/leds-aw2015.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2015, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_AW2015_LED_H__
|
||||
#define __LINUX_AW2015_LED_H__
|
||||
|
||||
/* The definition of each time described as shown in figure.
|
||||
* /-----------\
|
||||
* / | \
|
||||
* /| | |\
|
||||
* / | | | \-----------
|
||||
* |hold_time_ms | |
|
||||
* | | |
|
||||
* rise_time_ms fall_time_ms |
|
||||
* off_time_ms
|
||||
*/
|
||||
|
||||
struct aw2015_platform_data {
|
||||
int imax;
|
||||
int currents[4]; /* ILEDx_y (x=1~3, y=1~4), 4 pre-defined currents */
|
||||
int delay_time_ms;
|
||||
int rise_time_ms;
|
||||
int hold_time_ms;
|
||||
int fall_time_ms;
|
||||
int slot_time_ms;
|
||||
int off_time_ms;
|
||||
struct aw2015_led *led;
|
||||
u8 cex;
|
||||
u8 mpulse;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user