Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp904508rwb; Wed, 28 Sep 2022 10:28:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM46wmAmLYYkFREAdfq/6qEtR/vb9+1U+bM2RWO3Kx90P8ekYujDZldIOHKlzBKn89Azc15R X-Received: by 2002:a17:90b:3e8b:b0:202:c85d:8ffa with SMTP id rj11-20020a17090b3e8b00b00202c85d8ffamr11868368pjb.155.1664386132555; Wed, 28 Sep 2022 10:28:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664386132; cv=none; d=google.com; s=arc-20160816; b=i1ZPtzVxslCDoaOQHYNNmDzUJ1FQcrmTCEFK6TR3Ihsg48mgE4cpWaQtz/SXsFO3lo F10C2F0dPn2KQ7O8lCkXX/y6b8jrewUn1uN+RGab5tmSghCMYprhYBi2+ekotNJZuPdy 8FBuvJOIcOtLK4Tu0ynIsTDuRitzXObARGAluFi3Rv8y+rFbJGFeBdQ5dFvh7Y62jr02 tllzTn3Mbe8i8d8medwdoQPkc0nLCwjcQ6E/0Il14YLsElD92QLL/B4xYK6qO0TODcRH WaRKuifYCz2H/nCuqqNa5c6w3m35NkTUjYslvPDQOfcXOx+l9c+S9G1GDcrR0WfpJ5Y+ sUKA== 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=gn4GNuvUUOVDoeDy+MAyAECtg8P3AafzsoEbcKSQu6pXt1jQMQBn6zGyZZ6pZw0FE9 +9sdoii7oUKggr6rMZesEfUT9xNpmYgRvnykvYrSlqobAuga6G3DUWlzVculU0mJp92i 4blxZsre63asoLPUp7krW68ejtlB1r19Ru7/f9WRNHz6beUJOEVdrK625LHApZiaL80u VWC56IpN5VsfH673ArGzC4KmMOKhUQOytCeYuzK4ZtPEY4RymaFITXfNDmvc/Pe21WmT Yq+NOYgLd3vlQYnaCHxSMuO7A8aZSuf5d2F0I/nOnzyjUfzwoFlijZOSPNXleAw3gI3l AGSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=zK2eQy6l; 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 k11-20020a170902ba8b00b0017828d3c263si3184410pls.192.2022.09.28.10.28.40; Wed, 28 Sep 2022 10:28:52 -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=zK2eQy6l; 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 S234386AbiI1RAy (ORCPT + 99 others); Wed, 28 Sep 2022 13:00:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234283AbiI1RAn (ORCPT ); Wed, 28 Sep 2022 13:00:43 -0400 Received: from mail-4318.protonmail.ch (mail-4318.protonmail.ch [185.70.43.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5C9780BDA for ; Wed, 28 Sep 2022 10:00:42 -0700 (PDT) Date: Wed, 28 Sep 2022 17:00:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1664384441; x=1664643641; 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=zK2eQy6lao1+50JVyNkwsj29cMwOASBhry1NxC0TDywJaJ5F/BdobgDt4lujEAlsO x9PORPUEzMrJW+ukjvWV15iIM0O3eoEfzSPjb1waaa1J2MKHlQpQsLLkYHubE3FTO9 MPWaz1Y8/T1PSwo8VRCbws1lavPB07FJQfrv0Sd/elUFJX5lILE4p6h+8iE5fp9ZKJ 6yf8V8z0Ft/po3qrjn3UnOID1VoTiXY2b8eq0bar075uhvGTM40kouGdmMHISqy7yH b/ct73/PL7lVJvVD1YGxvOU+iSKakoSnBtVDmeSsibBNU1nwj63j/akkSWm6zhpKPL Lcnuj98UVawuA== 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 v3 5/5] arm64: dts: qcom: msm8916-samsung-j5-common: Add Hall sensor Message-ID: <20220928165944.181207-1-linmengbo0689@protonmail.com> In-Reply-To: <20220928164806.179314-1-linmengbo0689@protonmail.com> References: <20220928164806.179314-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,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