From 97f5541fc0c7ed107103e6f87a6522f5327ab4b0 Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Wed, 13 Jul 2016 18:06:10 +0200 Subject: 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 Acked-by: Ping Cheng Signed-off-by: Jiri Kosina --- drivers/hid/wacom.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'drivers/hid/wacom.h') 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 #include #include +#include #include #include #include @@ -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; -- cgit v1.2.3