Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp994627rwb; Wed, 28 Sep 2022 11:43:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM57Y4gJNvVpPrg51PCA8zZfeNWPVE6fJaOnRtRomK6YcggX9W0ScS30W8Y2gLmapmTcnATw X-Received: by 2002:a17:907:6da3:b0:783:5665:18dc with SMTP id sb35-20020a1709076da300b00783566518dcmr16247107ejc.173.1664390633306; Wed, 28 Sep 2022 11:43:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664390633; cv=none; d=google.com; s=arc-20160816; b=T6GeCmtE3dTnCuJXxZuc61oLfWqtW9PuxlZMpjZgixbFaLnKOammI6w18lhD5KXwEa QoyryLTRHiKbwHWkcJaVcZl8MN008aR0yeSTmSODYoYk0SHx3Jn0kyU+OOLNbgwsyZ/p 5KPggVis8pP2ozwKrKDqiYoKJPPgPEBFHxfic9lF5G3MgJ5yWnSot8kG7SwGt3PaOg0A 0jXARJIMrBx910Lmftztzao7Ta0WDTHwOnn1uUQg/X4eu1OUK32+ecpkqxHIvOhuy4oh YXA9bawvA34C3rkdTe1ctzfpAK8y/pwD/puXyL5ntxeivnJPe9/JEqPTV2Mf9haCwqIX efNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :feedback-id:references:in-reply-to:message-id:subject:cc:from:to :dkim-signature:date; bh=IsWhgXDQSqlqcrpGge6hF7eCE/OeZB8nSGU7RUC7f8E=; b=i+Xt8pJK5l5megq+ltQy4h6j70Y+pezbJiLCmBgOTXBOS1F1MWjonW+tuV6BK7/ck2 mhTe9td/VoBx6Ljp2eAzdsNPg5iIdzSNcfa8t8xhF45j4euD9fKUHdDLcjQ6Q44Za7g0 rYn61tlSEd288s0tXMMSCX9Tdu+qkrfgLHmhZuW7mA/8AgyoM+DweOHoBMZ3Ew5awnD5 InrZT+4rQ9+a46srFJfBRf6pDfczm5gpSQVgOv5TlsjIfc7/89Bv5hLb4GehYqdxqe0s w5O8wj+8sUTgCvge4nlqXVRzu2J7rPcQVCfS45V1c6c6k5oxY1FJF9f0X44GSyGpsmOc EZLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=hNkLqObd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a170906500400b007813519e248si4952376ejj.643.2022.09.28.11.43.27; Wed, 28 Sep 2022 11:43:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=hNkLqObd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234232AbiI1SaP (ORCPT + 99 others); Wed, 28 Sep 2022 14:30:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234198AbiI1S36 (ORCPT ); Wed, 28 Sep 2022 14:29:58 -0400 Received: from mail-4324.protonmail.ch (mail-4324.protonmail.ch [185.70.43.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EAFC13D28; Wed, 28 Sep 2022 11:29:50 -0700 (PDT) Date: Wed, 28 Sep 2022 18:29:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1664389788; x=1664648988; bh=IsWhgXDQSqlqcrpGge6hF7eCE/OeZB8nSGU7RUC7f8E=; 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; b=hNkLqObdw9jS/gMU9PYDzVT0gJAXmxzxkvy2BH8DPG49732asHi3MYSx9AHPgEamS OimyEWuS6b2XROehl63m8YoahWeApYPqBfN9Nnb0TdYYxSpcLw4yRiOwRMkTkXp+Vc xy/dUDWcuSpc9EAWenRxRnnGT7HKdycMwlSzjrGVNYhjQCP/eJJ4yCfj5WVfCPTi9/ +dfiJLDiaiq15kveNa7cJ+/f0QlLb8HrOU528Hf/p9Ns0/hls3YUBRNNPzwsJh6s2e Ht17EWsUUjQF8QyJpDoMdTaFkbXEzA9638ND0w2GVHyO1rMhtT7iF+fatKr5zVHtDD s7EUunOzbiYhg== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: 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, Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Subject: [PATCH v4 4/4] arm64: dts: qcom: msm8916-samsung-j5-common: Add Hall sensor Message-ID: <20220928182745.186429-1-linmengbo0689@protonmail.com> In-Reply-To: <20220928182435.186116-1-linmengbo0689@protonmail.com> References: <20220928182435.186116-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- .../boot/dts/qcom/msm8916-samsung-j3.dts | 4 +++ .../dts/qcom/msm8916-samsung-j5-common.dtsi | 26 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j3.dts b/arch/arm64/b= oot/dts/qcom/msm8916-samsung-j3.dts index bf8672ebedcd..7fd357b7f728 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j3.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j3.dts @@ -19,3 +19,7 @@ tz-apps@85a00000 { =09=09}; =09}; }; + +&gpio_hall_sensor { +=09status =3D "disabled"; +}; 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 @@ =20 #include "msm8916-pm8916.dtsi" #include +#include =20 / { =09aliases { @@ -20,6 +21,23 @@ tz-apps@85500000 { =09=09}; =09}; =20 +=09gpio_hall_sensor: gpio-hall-sensor { +=09=09compatible =3D "gpio-keys"; + +=09=09pinctrl-names =3D "default"; +=09=09pinctrl-0 =3D <&gpio_hall_sensor_default>; + +=09=09label =3D "GPIO Hall Effect Sensor"; + +=09=09event-hall-sensor { +=09=09=09label =3D "Hall Effect Sensor"; +=09=09=09gpios =3D <&msmgpio 52 GPIO_ACTIVE_LOW>; +=09=09=09linux,input-type =3D ; +=09=09=09linux,code =3D ; +=09=09=09linux,can-disable; +=09=09}; +=09}; + =09gpio-keys { =09=09compatible =3D "gpio-keys"; =20 @@ -192,6 +210,14 @@ l18 { }; =20 &msmgpio { +=09gpio_hall_sensor_default: gpio-hall-sensor-default-state { +=09=09pins =3D "gpio52"; +=09=09function =3D "gpio"; + +=09=09drive-strength =3D <2>; +=09=09bias-disable; +=09}; + =09gpio_keys_default: gpio-keys-default-state { =09=09pins =3D "gpio107", "gpio109"; =09=09function =3D "gpio"; --=20 2.30.2