Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp558046rwb; Wed, 28 Sep 2022 06:23:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7i5nDM9SFfdoo0OoFREGlC5DIkxhJ43B2Iyv+zVgcqY85ffRershvNOMHSB91GVIlrG+wS X-Received: by 2002:a62:6406:0:b0:54e:fa79:ba40 with SMTP id y6-20020a626406000000b0054efa79ba40mr34469861pfb.60.1664371403041; Wed, 28 Sep 2022 06:23:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664371403; cv=none; d=google.com; s=arc-20160816; b=iOb97zxZlr1L42sMtlgIa5HR+8CKCyoY3yjdgYNEEXsZdNz4JD+mBVg1e13/6jm23w TsBi4rhzxC4keC55DUG9P3OGhlPLCJAogYlQHFTqJ2t6NF6B5eYfVNfjpC93aH8QdkLg A6WC7DhXfX3sNyJ2OU3BFbBVQ9jMOQLfVEEYP2pJIbdgEhFYSOWXMCM12u7CzKHU8bQM 3zrbh6MA3U+sz/RXfbnl0gImG+PbWi5CvJb/pJEzo/bt6YNnhacW3FFJTQ3vNWL5gDcM e91H8hgJ37eZtlJp+XwJhSJ4soXDl800Ah/tTPYu4/uUA3RZyOI7g7n4ZiK+7xuyCH0z xghA== 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=gUhqstaRapz/dEFPQohg3Styf6DL29cIpA3fSfsODL0=; b=GNMd7UNc3DPtRMkM3eH9mtNuSPQ+0jOcjgtNK9ldxF8tWXInlAZB+0kcO525ItRx/U UM+1wqzGZuRPUc/eRcbNWVgY4WQBeiPMgQkA1bYqu9wytiDSBvCISBK441adz/vhspbX 1KvAFaTM9ELFqSTSIZhoKVfZ6YOzVM87mNXhJ836WI4bhLgip6BY25qBdji7cD0QMhzd 87kqaYlCu/zemfuWoTPUDWBECJfUC1/tbRri4hEOu2jjuLrvrGJDMcTaRkU3QMdkUiDN ugdHH8XlY/V5tAwVdY8uFlooiH8L++HGy2bYDjT9K/uaxCeP87YjBvJ5AFkNmpu8/UY0 Sh2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=uKBl0duH; 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 y24-20020a170902b49800b001783881c7e8si4807401plr.464.2022.09.28.06.23.11; Wed, 28 Sep 2022 06:23:23 -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=uKBl0duH; 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 S233968AbiI1Mk4 (ORCPT + 99 others); Wed, 28 Sep 2022 08:40:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234026AbiI1Mkj (ORCPT ); Wed, 28 Sep 2022 08:40:39 -0400 X-Greylist: delayed 5624 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 28 Sep 2022 05:40:25 PDT Received: from mail-4319.protonmail.ch (mail-4319.protonmail.ch [185.70.43.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F16A43686C; Wed, 28 Sep 2022 05:40:16 -0700 (PDT) Date: Wed, 28 Sep 2022 12:40:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1664368815; x=1664628015; bh=gUhqstaRapz/dEFPQohg3Styf6DL29cIpA3fSfsODL0=; 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=uKBl0duHxBU6/3DfUmYyFojQeFiDvH357JUuEaqkUNCQasEkSULs5UyM3MJhF+ZU3 kERKMcAta7fX7gD1vUibykJ2OY59v8LxBynlLjtQ76x6Y2nlWNRTC2kQz4m4ryuFhg 7JS49SLypKLK182MRKiC9Wde2xj33htrUGbIEqSjbNlxWWvPSKF8ZlU9VUv/hf2Jpk zPiiGQAGibOuYze/BxGcRxRnTtu5c+glzko/2ZHEHoIBpQpowwVBkFSZQ75qQypGQ8 FaR8ffQ+8uiCBpOYoWI/B21YYEaF9w/m4ok7etQwAtcgXV7AaSrOUBRlNyUaV8ODoe 0D7cfAjKYZCBw== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Stephan Gerhold , Nikita Travkin , Josef W Menad , Markuss Broks , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, "Lin, Meng-Bo" , "Lin, Andy Gross" , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Subject: [PATCH v2 4/4] arm64: dts: qcom: msm8916-samsung-j5-common: Add Hall sensor Message-ID: <20220928123851.104761-1-linmengbo0689@protonmail.com> In-Reply-To: <20220928121717.102402-1-linmengbo0689@protonmail.com> References: <20220928110049.96047-1-linmengbo0689@protonmail.com> <20220928121717.102402-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 4f71609bf6f8..54190144f823 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi @@ -3,6 +3,7 @@ #include "msm8916-pm8916.dtsi" =20 #include +#include =20 / { =09aliases { @@ -21,6 +22,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 @@ -193,6 +211,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