mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
fpc1020: Create sysfs before irq enabled.
IRQ handler will notify sys entry. So must create sys entries before irq requested and enabled. Change-Id: I6596866a19bMontana779536eb71147810cd13c9528f Signed-off-by: haojl2 <haojl2@motorola.com> Reviewed-on: https://gerrit.mot.com/1354629 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1356392
This commit is contained in:
parent
cf3f5de761
commit
53483bf12b
1 changed files with 11 additions and 7 deletions
|
|
@ -296,6 +296,12 @@ static int fpc1020_probe(struct platform_device *pdev)
|
|||
if (rc)
|
||||
goto exit;
|
||||
|
||||
rc = fpc1020_create_sysfs(fpc1020, true);
|
||||
if (rc) {
|
||||
dev_err(dev, "could not create sysfs\n");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
fpc1020->irq_cnt = 0;
|
||||
irqf = IRQF_TRIGGER_RISING | IRQF_ONESHOT;
|
||||
|
||||
|
|
@ -305,21 +311,19 @@ static int fpc1020_probe(struct platform_device *pdev)
|
|||
if (rc) {
|
||||
dev_err(dev, "could not request irq %d\n",
|
||||
gpio_to_irq(fpc1020->irq_gpio));
|
||||
goto exit;
|
||||
goto irq_exit;
|
||||
}
|
||||
dev_dbg(dev, "requested irq %d\n", gpio_to_irq(fpc1020->irq_gpio));
|
||||
|
||||
/* Request that the interrupt should be wakeable */
|
||||
enable_irq_wake(gpio_to_irq(fpc1020->irq_gpio));
|
||||
|
||||
|
||||
rc = fpc1020_create_sysfs(fpc1020, true);
|
||||
if (rc) {
|
||||
dev_err(dev, "could not create sysfs\n");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
dev_info(dev, "%s: ok\n", __func__);
|
||||
|
||||
return 0;
|
||||
|
||||
irq_exit:
|
||||
fpc1020_create_sysfs(fpc1020, false);
|
||||
exit:
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue