From patchwork Fri Jan 6 14:31:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 640158 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36C97C54EBF for ; Fri, 6 Jan 2023 14:32:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233398AbjAFOb6 (ORCPT ); Fri, 6 Jan 2023 09:31:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235058AbjAFObh (ORCPT ); Fri, 6 Jan 2023 09:31:37 -0500 Received: from mail-4324.protonmail.ch (mail-4324.protonmail.ch [185.70.43.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C75D4809A1 for ; Fri, 6 Jan 2023 06:31:32 -0800 (PST) Date: Fri, 06 Jan 2023 14:31:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1673015491; x=1673274691; bh=Jtx9DakIpfF+Lwd5xBjPwVFe6Af//ReFvJ0WW/ILW0E=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=vO7cCe8GRW47dZWSjBKgSZqyrZU8WIt3CoWzj1wJv4oO1I4bQvSUDPujKG+zp+d3p SdZCRs1ayj/w0j+I/G5HkzJ1H2Fp8Pdamws6YbgxJNeO6SRs7X5UQnAYMsVYTTVQvx 3j3RDTkrlaAeTNCERjfxC0fJ/U91VTs9yNLDXHwRnhB+ZT+W1jalYl46P3PijlM0n7 ZHZ4/lIX+9PnfHG7dUpXD3ivH/CzIPndVIFMINJubyKoG5+Afw+8E4Fw/VP16MvlpR fadwf5aaQlA3UArYagHIvCgXZEJKaiLCZUuyMNi3p7L5iiKMLmSJyWP1zwCqBVdADN Bd90qUEIgxzGg== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Stephan Gerhold , Nikita Travkin , Julian Ribbeck , Josef W Menad , Markuss Broks , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Krzysztof Kozlowski Subject: [PATCH v6 4/5] arm64: dts: qcom: msm8916-samsung-j5-common: Add Hall sensor Message-ID: <20230106143037.547248-1-linmengbo0689@protonmail.com> In-Reply-To: <20230106142748.546975-1-linmengbo0689@protonmail.com> References: <20230106142748.546975-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Samsung Galaxy J5 2015 and 2016 have a Hall sensor on GPIO pin 52. Add GPIO Hall sensor for them. Signed-off-by: Lin, Meng-Bo Reviewed-by: Krzysztof Kozlowski --- .../dts/qcom/msm8916-samsung-j5-common.dtsi | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi index 502b38d4a61e..5755b360c6ed 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi @@ -2,6 +2,7 @@ #include "msm8916-pm8916.dtsi" #include +#include / { aliases { @@ -20,6 +21,23 @@ tz-apps@85500000 { }; }; + gpio_hall_sensor: gpio-hall-sensor { + compatible = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&gpio_hall_sensor_default>; + + label = "GPIO Hall Effect Sensor"; + + event-hall-sensor { + label = "Hall Effect Sensor"; + gpios = <&msmgpio 52 GPIO_ACTIVE_LOW>; + linux,input-type = ; + linux,code = ; + linux,can-disable; + }; + }; + gpio-keys { compatible = "gpio-keys"; @@ -192,6 +210,14 @@ l18 { }; &msmgpio { + gpio_hall_sensor_default: gpio-hall-sensor-default-state { + pins = "gpio52"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + gpio_keys_default: gpio-keys-default-state { pins = "gpio107", "gpio109"; function = "gpio";