]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/linux/leds-pca9532.h
mod_devicetable: fix PHY module format
[mirror_ubuntu-bionic-kernel.git] / include / linux / leds-pca9532.h
CommitLineData
e14fa824
RV
1/*
2 * pca9532.h - platform data structure for pca9532 led controller
3 *
4 * Copyright (C) 2008 Riku Voipio <riku.voipio@movial.fi>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * Datasheet: http://www.nxp.com/acrobat/datasheets/PCA9532_3.pdf
11 *
12 */
13
14#ifndef __LINUX_PCA9532_H
15#define __LINUX_PCA9532_H
16
17#include <linux/leds.h>
934cd3f9 18#include <linux/workqueue.h>
fa4191a6 19#include <dt-bindings/leds/leds-pca9532.h>
e14fa824
RV
20
21enum pca9532_state {
22 PCA9532_OFF = 0x0,
23 PCA9532_ON = 0x1,
24 PCA9532_PWM0 = 0x2,
28c5fe99
FB
25 PCA9532_PWM1 = 0x3,
26 PCA9532_KEEP = 0xff,
e14fa824
RV
27};
28
e14fa824
RV
29struct pca9532_led {
30 u8 id;
31 struct i2c_client *client;
fa4191a6
PR
32 const char *name;
33 const char *default_trigger;
e14fa824 34 struct led_classdev ldev;
9695fff8 35 struct work_struct work;
fa4191a6 36 u32 type;
e14fa824
RV
37 enum pca9532_state state;
38};
39
40struct pca9532_platform_data {
41 struct pca9532_led leds[16];
42 u8 pwm[2];
43 u8 psc[2];
3c1ab50d 44 int gpio_base;
e14fa824
RV
45};
46
47#endif /* __LINUX_PCA9532_H */