blob: 3c85a735c380539e71c4094f2dd48ef33d3e6c6f [file] [log] [blame]
Simon Guinot24467832010-10-07 16:38:49 +02001/*
Simon Guinot24467832010-10-07 16:38:49 +02002 * Platform data structure for netxbig LED driver
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
Sachin Kamat00d19552014-01-02 01:58:45 -08009#ifndef __LEDS_KIRKWOOD_NETXBIG_H
10#define __LEDS_KIRKWOOD_NETXBIG_H
Simon Guinot24467832010-10-07 16:38:49 +020011
12struct netxbig_gpio_ext {
13 unsigned *addr;
14 int num_addr;
15 unsigned *data;
16 int num_data;
17 unsigned enable;
18};
19
20enum netxbig_led_mode {
21 NETXBIG_LED_OFF,
22 NETXBIG_LED_ON,
23 NETXBIG_LED_SATA,
24 NETXBIG_LED_TIMER1,
25 NETXBIG_LED_TIMER2,
26 NETXBIG_LED_MODE_NUM,
27};
28
29#define NETXBIG_LED_INVALID_MODE NETXBIG_LED_MODE_NUM
30
31struct netxbig_led_timer {
32 unsigned long delay_on;
33 unsigned long delay_off;
34 enum netxbig_led_mode mode;
35};
36
37struct netxbig_led {
38 const char *name;
39 const char *default_trigger;
40 int mode_addr;
41 int *mode_val;
42 int bright_addr;
Simon Guinot2976b172015-09-26 23:02:34 +020043 int bright_max;
Simon Guinot24467832010-10-07 16:38:49 +020044};
45
46struct netxbig_led_platform_data {
47 struct netxbig_gpio_ext *gpio_ext;
48 struct netxbig_led_timer *timer;
49 int num_timer;
50 struct netxbig_led *leds;
51 int num_leds;
52};
53
Sachin Kamat00d19552014-01-02 01:58:45 -080054#endif /* __LEDS_KIRKWOOD_NETXBIG_H */