lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 13 Feb 2022 18:15:29 +0100 From: Dario Binacchi <dario.binacchi@...rulasolutions.com> To: linux-kernel@...r.kernel.org Cc: Dario Binacchi <dario.binacchi@...rulasolutions.com>, Michael Trimarchi <michael@...rulasolutions.com>, Dmitry Torokhov <dmitry.torokhov@...il.com>, Marco Felsch <m.felsch@...gutronix.de>, Oliver Graute <oliver.graute@...oconnector.com>, Stephan Gerhold <stephan@...hold.net>, linux-input@...r.kernel.org Subject: [PATCH 3/6] Input: edt-ft5x06 - set report rate by dts property It allows to change the M06/M12 default scan rate on driver probing. Co-developed-by: Michael Trimarchi <michael@...rulasolutions.com> Signed-off-by: Michael Trimarchi <michael@...rulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@...rulasolutions.com> --- drivers/input/touchscreen/edt-ft5x06.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 77f061af5c61..b3e492cfc41c 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -1213,6 +1213,14 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client, edt_ft5x06_ts_get_defaults(&client->dev, tsdata); edt_ft5x06_ts_get_parameters(tsdata); + if (tsdata->reg_addr.reg_report_rate != NO_REGISTER && + !of_property_read_u32(client->dev.of_node, "report-rate", + (u32 *)&tsdata->report_rate)) { + edt_ft5x06_register_write(tsdata, + tsdata->reg_addr.reg_report_rate, + tsdata->report_rate); + } + dev_dbg(&client->dev, "Model \"%s\", Rev. \"%s\", %dx%d sensors\n", tsdata->name, fw_version, tsdata->num_x, tsdata->num_y); -- 2.32.0
Powered by blists - more mailing lists