]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd184fb61190ba43591622b67f181c84813a27a46
tree1722d2171f77e8d29ee3f2d541cd994a64625369
parent4346ffebc9cbfeb9e98ef36d5e4282bc13af101e
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