These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / input / keyboard / adp5589-keys.c
index a452677..4d446d5 100644 (file)
 #define LOGIC2_STAT    (1 << 7)        /* ADP5589 only */
 #define LOGIC1_STAT    (1 << 6)
 #define LOCK_STAT      (1 << 5)        /* ADP5589 only */
-#define KEC            0xF
+#define KEC            0x1F
 
 /* PIN_CONFIG_D Register */
 #define C4_EXTEND_CFG  (1 << 6)        /* RESET2 */
@@ -726,7 +726,7 @@ static int adp5589_setup(struct adp5589_kpad *kpad)
 
                pull_mask |= val << (2 * (i & 0x3));
 
-               if (i == 3 || i == kpad->var->max_row_num) {
+               if (i % 4 == 3 || i == kpad->var->max_row_num) {
                        ret |= adp5589_write(client, reg(ADP5585_RPULL_CONFIG_A)
                                             + (i >> 2), pull_mask);
                        pull_mask = 0;
@@ -746,7 +746,7 @@ static int adp5589_setup(struct adp5589_kpad *kpad)
 
                pull_mask |= val << (2 * (i & 0x3));
 
-               if (i == 3 || i == kpad->var->max_col_num) {
+               if (i % 4 == 3 || i == kpad->var->max_col_num) {
                        ret |= adp5589_write(client,
                                             reg(ADP5585_RPULL_CONFIG_C) +
                                             (i >> 2), pull_mask);
@@ -1097,7 +1097,6 @@ MODULE_DEVICE_TABLE(i2c, adp5589_id);
 static struct i2c_driver adp5589_driver = {
        .driver = {
                .name = KBUILD_MODNAME,
-               .owner = THIS_MODULE,
                .pm = &adp5589_dev_pm_ops,
        },
        .probe = adp5589_probe,