Skip to content

Commit 90cb57a

Browse files
balejkdtor
authored andcommitted
input/touchscreen: imagis: add support for IST3032C
IST3032C is a touchscreen chip used for instance in the samsung,coreprimevelte smartphone, with which this was tested. Add the chip specific information to the driver. Reviewed-by: Markuss Broks <markuss.broks@gmail.com> Signed-off-by: Karel Balej <balejk@matfyz.cz> Link: https://lore.kernel.org/r/20240301164659.13240-6-karelb@gimli.ms.mff.cuni.cz Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent d88f84b commit 90cb57a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/input/touchscreen/imagis.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#include <linux/property.h>
1212
#include <linux/regulator/consumer.h>
1313

14+
#define IST3032C_WHOAMI 0x32c
15+
1416
#define IST3038B_REG_STATUS 0x20
1517
#define IST3038B_REG_CHIPID 0x30
1618
#define IST3038B_WHOAMI 0x30380b
@@ -363,6 +365,13 @@ static int imagis_resume(struct device *dev)
363365

364366
static DEFINE_SIMPLE_DEV_PM_OPS(imagis_pm_ops, imagis_suspend, imagis_resume);
365367

368+
static const struct imagis_properties imagis_3032c_data = {
369+
.interrupt_msg_cmd = IST3038C_REG_INTR_MESSAGE,
370+
.touch_coord_cmd = IST3038C_REG_TOUCH_COORD,
371+
.whoami_cmd = IST3038C_REG_CHIPID,
372+
.whoami_val = IST3032C_WHOAMI,
373+
};
374+
366375
static const struct imagis_properties imagis_3038b_data = {
367376
.interrupt_msg_cmd = IST3038B_REG_STATUS,
368377
.touch_coord_cmd = IST3038B_REG_STATUS,
@@ -380,6 +389,7 @@ static const struct imagis_properties imagis_3038c_data = {
380389

381390
#ifdef CONFIG_OF
382391
static const struct of_device_id imagis_of_match[] = {
392+
{ .compatible = "imagis,ist3032c", .data = &imagis_3032c_data },
383393
{ .compatible = "imagis,ist3038b", .data = &imagis_3038b_data },
384394
{ .compatible = "imagis,ist3038c", .data = &imagis_3038c_data },
385395
{ },

0 commit comments

Comments
 (0)