[Replicant] [PATCH] smdk4412: remove embedded synaptics touchscreen firmware

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Mon Dec 14 22:36:00 UTC 2020


On Mon, 14 Dec 2020 00:26:03 +0100
Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org> wrote:

> On Wed,  9 Dec 2020 18:31:09 +0200
> belgin <belginstirbu at hotmail.com> wrote:
> 
> Thanks a lot for the patch.
> 
> I've not tested it yet (I'll do it after sending this mail).
> 
> Beside a potential issue with CMD_LIST, everything looks good so far.
> 
> The following has potential issue:
> >  enum CMD_LIST {
> > -	CMD_LIST_FW_UPDATE = 0,
> > -	CMD_LIST_FW_VER_BIN,
> > -	CMD_LIST_FW_VER_IC,
> >  	CMD_LIST_CONFIG_VER,
> >  	CMD_LIST_GET_THRESHOLD,
> >  	CMD_LIST_POWER_OFF,
If you decide to do a v2 version of the patch, it might be a good idea
to keep the CMD_LIST_FW_UPDATE / CMD_LIST_FW_VER_BIN /
CMD_LIST_CONFIG_VER commands, and implement them with a function that
only does a printk. 

For instance you could define one function for each command. Here's a
crude example for synaptics_get_threshold:
> void synaptics_get_threshold(void)
> {
>         printk(KERN_DEBUG "[TSP] %s\n", __func__);
> }

and in in sec_sysfs_cmd:
> switch (cmd) {
> case CMD_LIST_FW_UPDATE:
>        synaptics_list_fw_update();
>        break;

Or:
> switch (cmd) {
> case CMD_LIST_FW_UPDATE:
>      printk(KERN_DEBUG 
>             "[TSP] Warning: CMD_LIST_FW_UPDATE called, skipping.\n"
>             "[TSP] A program might be trying to load a firmware\n"
>             "[TSP] In doubt, report it on the Replicant mailing list\n");
>      break;

While the above examples are not the quality expected by the official
Linux project (for instance it doesn't use dev_err and so on), we
don't need to upstream this patch in Linux, and it should work fine for
our needs here, as it enables us to check if any of these functions
have been called with 'dmesg | grep TSP' for instance.

Denis.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osuosl.org/pipermail/replicant/attachments/20201214/40502f8b/attachment.asc>


More information about the Replicant mailing list