Home > other >  Linux3.18 kernel, driving the suspend and resume function keys at the time of sleep wake up why didn
Linux3.18 kernel, driving the suspend and resume function keys at the time of sleep wake up why didn

Time:09-22

Everybody is good, our product is android7.1 + msm8937 scheme, key driver I increase the sleep and wake up in the handler tca8418_keypad_suspend () and tca8418_keypad_resume, but tests confirm that no call, but this need to increase, whether to still need to increase the corresponding in the device tree species, or where there is the problem? Consult everybody,
 
# ifdef CONFIG_PM
Static int tca8418_keypad_suspend (struct device * dev)
{
Struct i2c_client * client=to_i2c_client (dev);;
Disable_irq (client - & gt; Irq);
Dev_err (dev, "tca8418_keypad_suspend () \ n");
return 0;
}

Static int tca8418_keypad_resume (struct device * dev)
{
Struct i2c_client * client=to_i2c_client (dev);
Dev_err (dev, "tca8418_keypad_resume () \ n");
Enable_irq (client - & gt; Irq);

return 0;
}

The static const struct dev_pm_ops tca8418_dev_pm_ops={
Suspend=tca8418_keypad_suspend,
Resume=tca8418_keypad_resume,
};

# endif


The static struct i2c_driver tca8418_keypad_driver={
The driver={
.name=TCA8418_NAME,
The owner=THIS_MODULE,
# ifdef CONFIG_PM
The PM=& amp; Tca8418_dev_pm_ops,
# endif
. Of_match_table=of_match_ptr (tca8418_dt_ids),
},
The probe=tca8418_keypad_probe,
Id_table=tca8418_id,,
};

CodePudding user response:

Use should have the notifier mechanism

CodePudding user response:

Agree with the upstairs, I won't call suspend and resume the Rockchip platform, is handled through the notifier

CodePudding user response:

Try to use early suspend
Android platform can configure early suspend, suspend and resume will not be called, is take the early suspend the process, the Rockchip 3188 chip come across this problem before, is 3.0.104 kernel.

CodePudding user response:

reference JiMoKuangXiangQu reply: 3/f
use early suspend try
Android platform can configure early suspend, suspend and resume will not be called, is take the early suspend the process, the Rockchip 3188 chip come across this problem before, is 3.0.104 kernel.
how is configured to early suspend, consulted,

CodePudding user response:

reference 4 floor LoongEmbedded response:
Quote: reference JiMoKuangXiangQu reply: 3/f

Try to use early suspend
Android platform can configure early suspend, suspend and resume will not be called, is take the early suspend the process, the Rockchip 3188 chip come across this problem before, is 3.0.104 kernel.
how is configured to early suspend, consulted,

Check the Kernel configuration for open
The Power management options
[*] Early supend
If you have open, should be left early suspend the process, if not, that you're looking for other reasons

CodePudding user response:

If you use early suspend, use the following code snippet registered callback:
/* declare it to somewhere properly */
# ifdef CONFIG_HAS_EARLYSUSPEND
Struct early_suspend early_suspend;
# endif

/* setup early suspend */
# ifdef CONFIG_HAS_EARLYSUSPEND
Early_suspend. Level=EARLY_SUSPEND_LEVEL_ XXX ;
Early_suspend. Suspend=xxx_early_suspend;
Early_suspend. Resume=xxx_late_resume;
Register_early_suspend (& amp; Early_suspend);
#endif

CodePudding user response:

Could you tell me how to solve
  • Related