From 381413bfc9871de4b1900fdc930cae1caeaebced Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Tue, 14 Oct 2025 16:15:39 +0200 Subject: [PATCH] oplus: Configure erhai GPIO lid switch Inspired by OnePlus SDM845 configuration, the GPIO number comes from the following sensor config: "bu52053nvx_0_platform":{ "owner": "sns_bu52053nvx", ".config":{ "owner": "sns_bu52053nvx", "dri_irq_num":{ "type": "int", "ver": "0", "data": "97" }, Change-Id: I7db5e50b0e633faaf06fb417303adc7b974551b3 --- oplus/erhai_overlay_common.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/oplus/erhai_overlay_common.dtsi b/oplus/erhai_overlay_common.dtsi index da2d2fa3..5be85604 100644 --- a/oplus/erhai_overlay_common.dtsi +++ b/oplus/erhai_overlay_common.dtsi @@ -100,6 +100,19 @@ }; &soc { + gpio_keys { + lid { + label = "lid"; + gpios = <&tlmm 97 1>; + interrupt-parent = <&tlmm>; + interrupts = <97 0x0>; + linux,input-type = ; + linux,code = <0>; + gpio-key,wakeup; + debounce-interval = <15>; + }; + }; + //#ifdef OPLUS_FEATURE_RF_CABLE_DETECT oplus_rf_cable { compatible = "oplus,rf_cable";