blob: 727877fb406d7eb526b9ede546c8d130e32e2995 [file] [log] [blame]
Samu Onkalo0efba162010-11-11 14:05:22 -08001/*
2 * LP5523 LED Driver
3 *
4 * Copyright (C) 2010 Nokia Corporation
5 *
6 * Contact: Samu Onkalo <samu.p.onkalo@nokia.com>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
21 */
22
23#ifndef __LINUX_LP5523_H
24#define __LINUX_LP5523_H
25
26/* See Documentation/leds/leds-lp5523.txt */
27
28struct lp5523_led_config {
Kim, Milo94b43b62012-08-22 15:32:29 +080029 const char *name;
Samu Onkalo0efba162010-11-11 14:05:22 -080030 u8 chan_nr;
31 u8 led_current; /* mA x10, 0 if led is not connected */
32 u8 max_current;
33};
34
35#define LP5523_CLOCK_AUTO 0
36#define LP5523_CLOCK_INT 1
37#define LP5523_CLOCK_EXT 2
38
39struct lp5523_platform_data {
40 struct lp5523_led_config *led_config;
41 u8 num_channels;
42 u8 clock_mode;
43 int (*setup_resources)(void);
44 void (*release_resources)(void);
45 void (*enable)(bool state);
Samu Onkalo278ad4f2011-01-12 16:59:17 -080046 const char *label;
Samu Onkalo0efba162010-11-11 14:05:22 -080047};
48
49#endif /* __LINUX_LP5523_H */