diff options
author | Andreas Pretzsch <apr@cn-eng.de> | 2012-11-25 02:31:38 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-11-25 03:10:18 -0500 |
commit | 92aab96034c2cdf11eb61a6b14409c2da8e5158d (patch) | |
tree | 95c67864b67db9eb9a081b371e12c0a36a053313 /drivers/input/keyboard | |
parent | 52ad48a0ce25d4d44ce82b7e28a35eb69598e5f1 (diff) |
Input: imx_keypad - only set enabled columns to open-drain
In imx_keypad_inhibit(), all 8 columns were set to open-drain, in
contrast to the rest of the driver, where only the enabled columns
are modified/used.
Contrary to the normal expectation, this also affects column I/Os not
even mapped via IOMUX to the KPP hardware module but used as a GPIO.
Therefore only init enabled columns to open-drain and leave all others
with their default reset value of 0, i.e. totem-pole.
Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r-- | drivers/input/keyboard/imx_keypad.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c index 7ad74517654b..6d150e3e1f55 100644 --- a/drivers/input/keyboard/imx_keypad.c +++ b/drivers/input/keyboard/imx_keypad.c | |||
@@ -362,7 +362,8 @@ static void imx_keypad_inhibit(struct imx_keypad *keypad) | |||
362 | writew(reg_val, keypad->mmio_base + KPSR); | 362 | writew(reg_val, keypad->mmio_base + KPSR); |
363 | 363 | ||
364 | /* Colums as open drain and disable all rows */ | 364 | /* Colums as open drain and disable all rows */ |
365 | writew(0xff00, keypad->mmio_base + KPCR); | 365 | reg_val = (keypad->cols_en_mask & 0xff) << 8; |
366 | writew(reg_val, keypad->mmio_base + KPCR); | ||
366 | } | 367 | } |
367 | 368 | ||
368 | static void imx_keypad_close(struct input_dev *dev) | 369 | static void imx_keypad_close(struct input_dev *dev) |