summaryrefslogtreecommitdiff
path: root/drivers/hid/wacom.h
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2016-07-13 18:06:10 +0200
committerJiri Kosina <jkosina@suse.cz>2016-08-05 13:39:19 +0200
commit97f5541fc0c7ed107103e6f87a6522f5327ab4b0 (patch)
treefa1e72787ac36f7fb130a20d12cad0227bb21717 /drivers/hid/wacom.h
parent9f1015d45f62d3b1c6719a1ccffaded89b157e10 (diff)
HID: wacom: leds: use the ledclass instead of custom made sysfs files
The now obsolete sysfs files for LEDs and EKRemote are kept for backward compatibility. Both the EKR (read-only) and the regular Cintiqs and Intuos are now sharing the same led API. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/wacom.h')
-rw-r--r--drivers/hid/wacom.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/hid/wacom.h b/drivers/hid/wacom.h
index 768d69602e7a..0c498c46de5f 100644
--- a/drivers/hid/wacom.h
+++ b/drivers/hid/wacom.h
@@ -91,6 +91,7 @@
#include <linux/mod_devicetable.h>
#include <linux/hid.h>
#include <linux/kfifo.h>
+#include <linux/leds.h>
#include <linux/usb/input.h>
#include <linux/power_supply.h>
#include <asm/unaligned.h>
@@ -112,8 +113,23 @@ enum wacom_worker {
WACOM_WORKER_REMOTE,
};
+struct wacom;
+
+struct wacom_led {
+ struct led_classdev cdev;
+ struct led_trigger trigger;
+ struct wacom *wacom;
+ unsigned int group;
+ unsigned int id;
+ u8 llv;
+ u8 hlv;
+ bool held;
+};
+
struct wacom_group_leds {
u8 select; /* status led selector (0..3) */
+ struct wacom_led *leds;
+ unsigned int count;
};
struct wacom_battery {
@@ -154,9 +170,12 @@ struct wacom {
struct wacom_remote *remote;
struct wacom_leds {
struct wacom_group_leds *groups;
+ unsigned int count;
u8 llv; /* status led brightness no button (1..127) */
u8 hlv; /* status led brightness button pressed (1..127) */
u8 img_lum; /* OLED matrix display brightness */
+ u8 max_llv; /* maximum brightness of LED (llv) */
+ u8 max_hlv; /* maximum brightness of LED (hlv) */
} led;
struct wacom_battery battery;
bool resources;