Skip to content

Commit

Permalink
Input: silead_gsl1680 - document firmware-name, fix implementation
Browse files Browse the repository at this point in the history
The driver has supported touchscreen-fw-name to specify the firmware to
load since it has been merged, but this was omitted from the dt-binding
documentation.

During review of adding touchscreen-fw-name to the binding documentation
it was brought up that there is a standard property name called
"firmware-name" for this, which should be used.

Since there are no users of touchscreen-fw-name yet, this commit
adds documentation of "firmware-name" to the dt-binding documentation
and switches the driver over to use this.

This commit also makes the driver add a "silead/" prefix to the
firmware name from dt before calling request_firmware. That the
firmware files are stored under /lib/firmware/silead under Linux
is an implementation detail and does not belong in devicetree.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Hans de Goede authored and Dmitry Torokhov committed Sep 10, 2016
1 parent e3a888a commit 43ba588
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Required properties:
- touchscreen-size-y : See touchscreen.txt

Optional properties:
- firmware-name : File basename (string) for board specific firmware
- touchscreen-inverted-x : See touchscreen.txt
- touchscreen-inverted-y : See touchscreen.txt
- touchscreen-swapped-x-y : See touchscreen.txt
Expand Down
5 changes: 3 additions & 2 deletions drivers/input/touchscreen/silead.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,10 @@ static void silead_ts_read_props(struct i2c_client *client)
data->max_fingers = 5; /* Most devices handle up-to 5 fingers */
}

error = device_property_read_string(dev, "touchscreen-fw-name", &str);
error = device_property_read_string(dev, "firmware-name", &str);
if (!error)
snprintf(data->fw_name, sizeof(data->fw_name), "%s", str);
snprintf(data->fw_name, sizeof(data->fw_name),
"silead/%s", str);
else
dev_dbg(dev, "Firmware file name read error. Using default.");
}
Expand Down

0 comments on commit 43ba588

Please sign in to comment.