diff options
author | Daniel Hillenbrand <codeworkx@cyanogenmod.org> | 2013-08-21 20:28:55 +0200 |
---|---|---|
committer | Daniel Hillenbrand <codeworkx@cyanogenmod.org> | 2013-08-21 20:28:55 +0200 |
commit | b07657a606584eb7328c10d6f57fbb0f0db6d070 (patch) | |
tree | 108f2b74319315d9551702cd0ea5daa50d5635ce /drivers | |
parent | e0d43667b66bec7c2b59973ce3203f97af7688dc (diff) | |
download | kernel_samsung_smdk4412-b07657a606584eb7328c10d6f57fbb0f0db6d070.zip kernel_samsung_smdk4412-b07657a606584eb7328c10d6f57fbb0f0db6d070.tar.gz kernel_samsung_smdk4412-b07657a606584eb7328c10d6f57fbb0f0db6d070.tar.bz2 |
cypress: report led status via sysfs
Change-Id: Iddecb0688e758eca3ba77b520510a6728ad1e3bb
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/keyboard/cypress/cypress-touchkey.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/input/keyboard/cypress/cypress-touchkey.c b/drivers/input/keyboard/cypress/cypress-touchkey.c index 6ccd693..1944e56 100644 --- a/drivers/input/keyboard/cypress/cypress-touchkey.c +++ b/drivers/input/keyboard/cypress/cypress-touchkey.c @@ -1078,6 +1078,17 @@ static ssize_t touch_update_read(struct device *dev, return count; } +static ssize_t touchkey_led_control_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int ret; + + ret = sprintf(buf, "%d\n", touchkey_led_status); + pr_info("[Touchkey] %s: touchkey_led_status=%d\n", __func__, touchkey_led_status); + + return ret; +} + static ssize_t touchkey_led_control(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) @@ -1559,7 +1570,7 @@ static DEVICE_ATTR(recommended_version, S_IRUGO | S_IWUSR | S_IWGRP, touch_version_read, touch_version_write); static DEVICE_ATTR(updated_version, S_IRUGO | S_IWUSR | S_IWGRP, touch_update_read, touch_update_write); -static DEVICE_ATTR(brightness, S_IRUGO | S_IWUSR | S_IWGRP, NULL, +static DEVICE_ATTR(brightness, S_IRUGO | S_IWUSR | S_IWGRP, touchkey_led_control_show, touchkey_led_control); static DEVICE_ATTR(touchkey_menu, S_IRUGO | S_IWUSR | S_IWGRP, touchkey_menu_show, NULL); |