@@ -40,6 +40,8 @@ Optional properties for main touchpad device:
- atmel,cfg_name: Provide name of configuration file in OBP_RAW format. This
will be downloaded from the firmware loader on probe to the device.
+- atmel,input_name: Override name of input device from the default.
+
Example:
touch@4b {
@@ -336,6 +336,7 @@ struct mxt_data {
char *fw_name;
char *cfg_name;
const char *pcfg_name;
+ const char *input_name;
/* Cached parameters from object table */
u16 T5_address;
@@ -2412,7 +2413,11 @@ static int mxt_initialize_input_device(struct mxt_data *data)
if (!input_dev)
return -ENOMEM;
- input_dev->name = "Atmel maXTouch Touchscreen";
+ if (data->input_name)
+ input_dev->name = data->input_name;
+ else
+ input_dev->name = "Atmel maXTouch Touchscreen";
+
input_dev->phys = data->phys;
input_dev->id.bustype = BUS_I2C;
input_dev->dev.parent = dev;
@@ -3653,6 +3658,8 @@ static int mxt_parse_device_properties(struct mxt_data *data)
device_property_read_string(dev, "atmel,cfg_name", &data->pcfg_name);
+ device_property_read_string(dev, "atmel,input_name", &data->input_name);
+
if (device_property_present(dev, keymap_property)) {
n_keys = device_property_count_u32(dev, keymap_property);
if (n_keys <= 0) {