Add initial driver for AW2016 LED device which can support up to 3 LED channels. Signed-off-by: liweilei <liweilei@awinic.com> Git-commit: ed6556f262cf7e2086d7728c2f752be4cf94b4d1 Git-repo: https://github.com/awinic-driver/aw2016.git [huliu@codeaurora.org: move the driver to leds folder and make corresponding changes in Kconfig and Makefile, also remove the dtsi config file and modify the code style.] Signed-off-by: Hui Liu <huliu@codeaurora.org> Change-Id: I252ca2710d393ff6dcbb691a2a530433ffbd21e3 Signed-off-by: Rakesh Kota <quic_kotarake@quicinc.com>
41 lines
1.1 KiB
C
41 lines
1.1 KiB
C
/*
|
|
* Copyright (c) 2015, The Linux Foundation. All rights reserved.
|
|
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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_AW2016_LED_H__
|
|
#define __LINUX_AW2016_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 aw2016_platform_data {
|
|
int imax;
|
|
int led_current;
|
|
int rise_time_ms;
|
|
int hold_time_ms;
|
|
int fall_time_ms;
|
|
int off_time_ms;
|
|
struct aw2016_led *led;
|
|
};
|
|
|
|
#endif
|