Disable power key in Android 12.1 in imx8mp

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Disable power key in Android 12.1 in imx8mp

跳至解决方案
501 次查看
dgeier315
Contributor III

I need to disable the power button function when our unit enters a certain state and enable it when it leaves that state.

Does Android have a function call for that(imx_snvs_pwrkey_pm_ops?), or do I need to disable the interrupt?

Thanks

 

                snvs_pwrkey: snvs-powerkey {
                    compatible = "fsl,sec-v4.0-pwrkey";
                    regmap = <&snvs>;
                    interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
                    clocks = <&clk IMX8MP_CLK_SNVS_ROOT>;
                    clock-names = "snvs-pwrkey";
                    linux,keycode = <KEY_POWER>;
                    debounce-interval = <2000>;

                    wakeup-source;
                    status = "okay";
                };
 
0 项奖励
回复
1 解答
431 次查看
dgeier315
Contributor III
echo \"30370000.snvs:snvs-powerkey\" > /sys/bus/platform/drivers/snvs_pwrkey/bind
echo \"30370000.snvs:snvs-powerkey\" > /sys/bus/platform/drivers/snvs_pwrkey/unbind
 
These commands were able to disable the power button.
 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
432 次查看
dgeier315
Contributor III
echo \"30370000.snvs:snvs-powerkey\" > /sys/bus/platform/drivers/snvs_pwrkey/bind
echo \"30370000.snvs:snvs-powerkey\" > /sys/bus/platform/drivers/snvs_pwrkey/unbind
 
These commands were able to disable the power button.
 
0 项奖励
回复
429 次查看
dgeier315
Contributor III
 
0 项奖励
回复
484 次查看
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @dgeier315 

 

As you mentioned, disabling the IRQ can works, and re-enabling again. Take a look to the ICR1, ICR2 and IMR registers on Reference Manual.

 

Best regards,

Salas.

0 项奖励
回复