summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/hynitron_cstxxx.c
AgeCommit message (Collapse)AuthorFilesLines
2023-05-17Input: Switch i2c drivers back to use .probe()Uwe Kleine-König1-1/+1
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert back to (the new) .probe() to be able to eventually drop .probe_new() from struct i2c_driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230517164645.162294-1-u.kleine-koenig@pengutronix.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2022-11-18Input: hynitron_cstxxx - initialize tmp to 0 to fix uninitialized variable issueChris Morgan1-1/+1
In the very unlikely event the cst3xx_i2c_write() fails inside of the cst3xx_bootloader_enter() function 5 times in a row, the uninitalized value of tmp will get compared to CST3XX_BOOTLDR_CHK_VAL. Initialize the value of tmp to 0 so that in this unlikely event we are comparing 0 instead of an uninitalized variable. Fixes: 66603243f528 ("Input: add driver for Hynitron cstxxx touchscreens") Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Reported-by: Dan Carpenter <error27@gmail.com> Link: https://lore.kernel.org/r/20221117195921.2291-1-macroalpha82@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2022-10-30Input: add driver for Hynitron cstxxx touchscreensChris Morgan1-0/+498
Add support for the Hynitron cst3xx controller found on devices such as the Anbernic RG353P and RG353V (the Hynitron CST340). This driver was built from sources provided by Hynitron to Anbernic (possibly via Rockchip as an intermediary) and marked as GPLv2 in the code. This driver was written strictly for the cst3xx series, but in most places was left somewhat generic so support could be easily added to other devices in the future. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Link: https://lore.kernel.org/r/20221028202636.14341-4-macroalpha82@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>