mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
touchscreen: dynamic check the stmicro device status
Kernel should not allow two drivers to assign same irq resource, or else it will cause unknown irq storm issue. For stmicro fts touch driver, the i2c device driver will always match device tree node and request irq resource even fts touch doesn't exist at all. When the kernel always loads another touch driver, such as goodix driver, they will compete the irq responsing and cause lots of cpu hang issue. Dynamically check the sensor device status according dts config to avoid the uncessary register driver. Change-Id: I23b694e17f84e1e612f706dce9b2d3f6cf587c11 Signed-off-by: xizx <xizx@motorola.com> Reviewed-on: https://gerrit.mot.com/2074098 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: litong <litong20@motorola.com> Reviewed-by: Jichao Zou <zoujc@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
4717829e9a
commit
60f1afce76
1 changed files with 5 additions and 1 deletions
|
|
@ -4547,7 +4547,11 @@ static struct spi_driver fts_spi_driver = {
|
|||
static int __init fts_driver_init(void)
|
||||
{
|
||||
#ifdef I2C_INTERFACE
|
||||
return i2c_add_driver(&fts_i2c_driver);
|
||||
struct device_node *node;
|
||||
node = mmi_check_dynamic_device_node("st_fts");
|
||||
if (!node || mmi_device_is_available(node))
|
||||
return i2c_add_driver(&fts_i2c_driver);
|
||||
return -ENODEV;
|
||||
#else
|
||||
return spi_register_driver(&fts_spi_driver);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue