Disable power key in Android 12.1 in imx8mp

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Disable power key in Android 12.1 in imx8mp

ソリューションへジャンプ
467件の閲覧回数
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";
                };
 
ラベル(3)
0 件の賞賛
返信
1 解決策
397件の閲覧回数
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 返答(返信)
398件の閲覧回数
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 件の賞賛
返信
395件の閲覧回数
dgeier315
Contributor III
 
0 件の賞賛
返信
450件の閲覧回数
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 件の賞賛
返信