mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
pinctrl: qcom: Add flexibility to disable the wakeup capability
By default, the system firmware enables the mpm wakeup functionality of all the supported GPIOs. However, certain usecases demand that this capability be disabled on certain gpios. Hence, provide a generic interface to disable the GPIOs as needed. Change-Id: Ib36569d422d2336a81d71e451ef47196c956c3a5 Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
This commit is contained in:
parent
aa860b5b17
commit
0b2dab507d
1 changed files with 24 additions and 1 deletions
|
|
@ -1899,9 +1899,32 @@ static const struct msm_pinctrl_soc_data shima_pinctrl = {
|
|||
.nwakeirq_map = ARRAY_SIZE(shima_pdc_map),
|
||||
};
|
||||
|
||||
/* By default, all the gpios that are mpm wake capable are enabled.
|
||||
* The following list disables the gpios explicitly
|
||||
*/
|
||||
static const unsigned int config_mpm_wake_disable_gpios[] = {
|
||||
};
|
||||
|
||||
static void shima_pinctrl_config_mpm_wake_disable_gpios(void)
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned int n_gpios = ARRAY_SIZE(config_mpm_wake_disable_gpios);
|
||||
|
||||
for (i = 0; i < n_gpios; i++)
|
||||
msm_gpio_mpm_wake_set(config_mpm_wake_disable_gpios[i], false);
|
||||
}
|
||||
|
||||
static int shima_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
return msm_pinctrl_probe(pdev, &shima_pinctrl);
|
||||
int ret;
|
||||
|
||||
ret = msm_pinctrl_probe(pdev, &shima_pinctrl);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
shima_pinctrl_config_mpm_wake_disable_gpios();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id shima_pinctrl_of_match[] = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue