Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2489703rwl; Fri, 6 Jan 2023 07:08:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXtUlbWktqten3ARSKAy+y+B8e1a7y8w2lr2iYUPlud46ur8q9lHK+JLs0wFuvxrfTE8hkrj X-Received: by 2002:a17:907:2a53:b0:84d:2278:f4b7 with SMTP id fe19-20020a1709072a5300b0084d2278f4b7mr1176130ejc.69.1673017739684; Fri, 06 Jan 2023 07:08:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673017739; cv=none; d=google.com; s=arc-20160816; b=tN3kT6UYUF0nMH0JGMz1qXX0/eZRtGbh6MDhw8Oue6fezBKRboqcg9fj87abxYhpja 2b0ODtwO4X7vYZKe31SUsfSYjcGjOiRD3S5bS0pSjrYq2A4fdl5W5/AVkxJB+LYPRIE8 wgZlWkEaqNe9gP/wygrvjvG0yKr4CzgtExqE0UG2uHhYF3zwJ5M0NF0PxF47i8caWYpZ JBKmL0LVNbCy0HeJgIHvQuE/iDQyeLVVsW4A568nMKQ1J8oqHb/n91zafB8oOhKJVsiN R6LzNbdrNVlkdI5Sinwjrh9FyqBq0fAmls4CnpfWLGm/YJ01XPMrn5RuXMsLutJEM6XC 9vbg== 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=Jtx9DakIpfF+Lwd5xBjPwVFe6Af//ReFvJ0WW/ILW0E=; b=xCgbDZeWRowzPxDnCQo+Ygt3321Loz1Shf4/h5V215l+Fk7PHx+HMnk1i2nhvw70tK ZcFOnymfXj9ywPvFG5eogCppTWhodb+tjgJwixFyyKFTEBAfyNaPndt0drCtKdGMKA7J TinTyrC7BWJmlmzyFOXDCln8tJGLx7poHFRVOtd2PR63jcKOK/QuR3r6RaERFSAj8LsQ OnQmNQhFqMyXDV0dGVfoXuS2kRvrl68aeUPniJ7FYBXNTQjAu6IuB50PwVFB87+IcvDd A/NHRWm639bRhIMCa4QwuEF0tMGBunS4jiRSTg6BHrdHmdn3mLg2j9jD4IjYNPJbFuGR L4Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=vO7cCe8G; 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 dn3-20020a17090794c300b0084514612c26si1800828ejc.611.2023.01.06.07.08.45; Fri, 06 Jan 2023 07:08:59 -0800 (PST) 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=vO7cCe8G; 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 S235143AbjAFOcH (ORCPT + 54 others); Fri, 6 Jan 2023 09:32:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235046AbjAFObh (ORCPT ); Fri, 6 Jan 2023 09:31:37 -0500 Received: from mail-4318.protonmail.ch (mail-4318.protonmail.ch [185.70.43.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9C917F470; 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 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_DNSWL_NONE,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 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 @@ =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