OSDN Git Service

Input: adp5589-keys - fix pull mask setting
authorGuido Martínez <guido@vanguardiasur.com.ar>
Wed, 6 May 2015 23:33:40 +0000 (16:33 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 6 May 2015 23:39:28 +0000 (16:39 -0700)
commit195e610bf7104d0dbe7e420e361dfb154694691d
tree1722d2171f77e8d29ee3f2d541cd994a64625369
parentc9eeb5084b27ffede2709e8775827729d0c7c46c
Input: adp5589-keys - fix pull mask setting

The pull mask is created by looping each row (column) and building an
8-bit integer with the configuration. It is written byte-by-byte, when
we reach the end of the rows (columns) or we're at the 3rd line (which
finishes the first byte, since each pin is 2bits on the mask).

However, this only works if we have at most 8 pins (2 bytes), which is
not the case for the ADP5589. So, write the byte at each boundary (every
4 rows/columns).

Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/adp5589-keys.c