input: matrix-keymap: Add function to read the new DT binding
[deliverable/linux.git] / drivers / input / keyboard / tca8418_keypad.c
index a34cc6714e5bc765315039bf3d3bb43a60820766..55c15304ddbce997a1027e319b81e7b3fc8ba98b 100644 (file)
@@ -288,8 +288,11 @@ static int tca8418_keypad_probe(struct i2c_client *client,
                irq_is_gpio = pdata->irq_is_gpio;
        } else {
                struct device_node *np = dev->of_node;
-               of_property_read_u32(np, "keypad,num-rows", &rows);
-               of_property_read_u32(np, "keypad,num-columns", &cols);
+               int err;
+
+               err = matrix_keypad_parse_of_params(dev, &rows, &cols);
+               if (err)
+                       return err;
                rep = of_property_read_bool(np, "keypad,autorepeat");
        }
 
This page took 0.026729 seconds and 5 git commands to generate.