Skip to content

Commit

Permalink
Input: imx_keypad - only set enabled columns to open-drain
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andreas Pretzsch authored and Dmitry Torokhov committed Nov 25, 2012
1 parent 52ad48a commit 92aab96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/input/keyboard/imx_keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ static void imx_keypad_inhibit(struct imx_keypad *keypad)
writew(reg_val, keypad->mmio_base + KPSR);

/* Colums as open drain and disable all rows */
writew(0xff00, keypad->mmio_base + KPCR);
reg_val = (keypad->cols_en_mask & 0xff) << 8;
writew(reg_val, keypad->mmio_base + KPCR);
}

static void imx_keypad_close(struct input_dev *dev)
Expand Down

0 comments on commit 92aab96

Please sign in to comment.