From patchwork Fri Nov 4 13:23:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Knecht X-Patchwork-Id: 13031873 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 5C8BAC43217 for ; Fri, 4 Nov 2022 13:26:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230222AbiKDNZ4 (ORCPT ); Fri, 4 Nov 2022 09:25:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231806AbiKDNZM (ORCPT ); Fri, 4 Nov 2022 09:25:12 -0400 Received: from msg-4.mailo.com (msg-4.mailo.com [213.182.54.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 859F62EF53; Fri, 4 Nov 2022 06:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1667568259; bh=UgO1xNnlTSFaN2qgupbbM8Ur3DOStS+vykVPuifYPLo=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding; b=POxlVPOzyuqsAyHRx/0M92+BPkcY59Ddwh0JhArQ2LWPBuADYp95DX8DqXGoRmDt8 ePMJ8gpMJhbIsHOsy5XrAAhWuk40WrCDjVzicU4ALZJ0bDclzPVw2PB5F1gIWU9lSN JpytAxF/elmeNr3oZwbgwjU9lI+y442Lvt+Dso58= Received: by b-6.in.mailobj.net [192.168.90.16] with ESMTP via proxy.mailoo.org [213.182.55.207] Fri, 4 Nov 2022 14:24:19 +0100 (CET) X-EA-Auth: 4p+PYttiXqTiCOGG50FOja6s6oKhTxS56lC5svw7yIr4FnkQPn3cryCjUKrBJ2w9pr1Aif9YF+wg8uiJ7kMWNSjJISFkiE1sr/OByAIgpU8= From: Vincent Knecht To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vincent Knecht Subject: [PATCH v2 2/3] arm64: dts: qcom: msm8916-alcatel-idol347: add GPIO torch LED Date: Fri, 4 Nov 2022 14:23:59 +0100 Message-Id: <20221104132400.1763218-3-vincent.knecht@mailoo.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221104132400.1763218-1-vincent.knecht@mailoo.org> References: <20221104132400.1763218-1-vincent.knecht@mailoo.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add support for torch LED on GPIO 32. Signed-off-by: Vincent Knecht Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio --- .../boot/dts/qcom/msm8916-alcatel-idol347.dts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts index 668f8ff53229..eadeb1a445fd 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts @@ -5,6 +5,7 @@ #include "msm8916-pm8916.dtsi" #include #include +#include / { model = "Alcatel OneTouch Idol 3 (4.7)"; @@ -34,6 +35,19 @@ button-volume-up { }; }; + gpio-leds { + compatible = "gpio-leds"; + + pinctrl-names = "default"; + pinctrl-0 = <&gpio_leds_default>; + + led-0 { + gpios = <&msmgpio 32 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "torch"; + function = LED_FUNCTION_TORCH; + }; + }; + usb_id: usb-id { compatible = "linux,extcon-usb-gpio"; id-gpio = <&msmgpio 69 GPIO_ACTIVE_HIGH>; @@ -276,6 +290,14 @@ gpio_keys_default: gpio-keys-default-state { bias-pull-up; }; + gpio_leds_default: gpio-leds-default-state { + pins = "gpio32"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + gyro_int_default: gyro-int-default-state { pins = "gpio97", "gpio98"; function = "gpio";