aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-26 16:36:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-26 16:36:02 -0400
commit36a8032d77649430f5ef11fbf0df2bb026be0b04 (patch)
tree18e386a957bde5f71e9efd2cddf1d8aadafe48e4 /drivers/input
parent7f9f44308c8993c9ab8078d174dad34bea3e82d7 (diff)
parent96cba9b00e297303774bec59e192064d20adeb3d (diff)
Merge tag 'chrome-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform
Pull chrome platform updates from Olof Johansson: "Here's a set of updates to the Chrome OS platform drivers for this merge window. Main new things this cycle is: - Driver changes to expose the lightbar to users. With this, you can make your own blinkenlights on Chromebook Pixels. - Changes in the way that the atmel_mxt trackpads are probed. The laptop driver is trying to be smart and not instantiate the devices that don't answer to probe. For the trackpad that can come up in two modes (bootloader or regular), this gets complicated since the driver already knows how to handle the two modes including the actual addresses used. So now the laptop driver needs to know more too, instantiating the regular address even if the bootloader one is the probe that passed. - mfd driver improvements by Javier Martines Canillas, and a few bugfixes from him, kbuild and myself" * tag 'chrome-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform: platform/chrome: chromeos_laptop - instantiate Atmel at primary address platform/chrome: cros_ec_lpc - Depend on X86 || COMPILE_TEST platform/chrome: cros_ec_lpc - Include linux/io.h header file platform/chrome: fix platform_no_drv_owner.cocci warnings platform/chrome: cros_ec_lightbar - fix duplicate const warning platform/chrome: cros_ec_dev - fix Unknown escape '%' warning platform/chrome: Expose Chrome OS Lightbar to users platform/chrome: Create sysfs attributes for the ChromeOS EC mfd: cros_ec: Instantiate ChromeOS EC character device platform/chrome: Add Chrome OS EC userspace device interface platform/chrome: Add cros_ec_lpc driver for x86 devices mfd: cros_ec: Add char dev and virtual dev pointers mfd: cros_ec: Use fixed size arrays to transfer data with the EC
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/cros_ec_keyb.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
index 64b9b59ad4cb..b50c5b8b8a4d 100644
--- a/drivers/input/keyboard/cros_ec_keyb.c
+++ b/drivers/input/keyboard/cros_ec_keyb.c
@@ -148,16 +148,19 @@ static void cros_ec_keyb_process(struct cros_ec_keyb *ckdev,
148 148
149static int cros_ec_keyb_get_state(struct cros_ec_keyb *ckdev, uint8_t *kb_state) 149static int cros_ec_keyb_get_state(struct cros_ec_keyb *ckdev, uint8_t *kb_state)
150{ 150{
151 int ret;
151 struct cros_ec_command msg = { 152 struct cros_ec_command msg = {
152 .version = 0,
153 .command = EC_CMD_MKBP_STATE, 153 .command = EC_CMD_MKBP_STATE,
154 .outdata = NULL,
155 .outsize = 0,
156 .indata = kb_state,
157 .insize = ckdev->cols, 154 .insize = ckdev->cols,
158 }; 155 };
159 156
160 return cros_ec_cmd_xfer(ckdev->ec, &msg); 157 ret = cros_ec_cmd_xfer(ckdev->ec, &msg);
158 if (ret < 0)
159 return ret;
160
161 memcpy(kb_state, msg.indata, ckdev->cols);
162
163 return 0;
161} 164}
162 165
163static irqreturn_t cros_ec_keyb_irq(int irq, void *data) 166static irqreturn_t cros_ec_keyb_irq(int irq, void *data)