From: Andreas Pretzsch Date: Sun, 25 Nov 2012 07:31:38 +0000 (-0800) Subject: Input: imx_keypad - only set enabled columns to open-drain X-Git-Tag: v3.8-rc1~58^2^2~20 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=92aab96034c2cdf11eb61a6b14409c2da8e5158d;p=~emulex%2Finfiniband.git 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 Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c index 7ad74517654..6d150e3e1f5 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) 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)