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: 15519 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp401571wru; Fri, 4 Nov 2022 06:28:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6p0vMvdJAp++hOp5UGxBMpGn4/56Vk/e5PaPzMvX4kcd5OnUwpHPoECehU1rUOsqYm9v3g X-Received: by 2002:a17:906:7948:b0:7ac:d6f9:eb3e with SMTP id l8-20020a170906794800b007acd6f9eb3emr33572696ejo.350.1667568522108; Fri, 04 Nov 2022 06:28:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667568522; cv=none; d=google.com; s=arc-20160816; b=IJg1G7dUy/Z+tQXX9VAkA8tLk+7ADfzwmBrG1Twi0HX+v5urO/I//7BTpw6y9MzRI6 LsGnsoZdZ2Hsexekyt1EJsBokIlzBWZyMFRKXB8mQ6nT7gnFBqEaYa8mSTRMVvX44iBj QSKuPHuaFI9+tvhBDXle5eEBc1M/l5KSr4gqewKlfScer5eD90PCfbdKq1YTEOAVfd+m g1Sn6VGfdtghrqWSl52cMIPJO7lr81n8Agsiryi2pbdZFh1+yUR9J0Kz9WEUQ/VsS+do LP+GZgdOSs1d4Iexy2/41FwYC+YpTORME5rmb4l5CJs88He3y/MgmmWAovgU1Xdlt72g TCEg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KDmQQPVKbQuVc8h8Ht9FG8CkZGcpb3J+slpdbOhsaRQ=; b=kA6hTMEPqzH3Upz+0rZipThmaGONeUsyMDBnJr31J954Eq/RmrJhLeek3GgS/ejLqF iOHmqFrkIaS93f5cPNY4wIWdRh2biZnfHDBtaVecvv4DV0NDKuDcUJnXOsVCwH2e7AsL M2INycu4Ljm082Qe/vvxSGnr7+Q8hNmJQUysEjg3IrIDOjniGT9j0NqLhlecMJqnPcOs Yq3MoRDsPF2GVe4fO4HbibTW5tSlqqlh6uB7Mj3BBinRO4hdnYRP+2su7GdYo5mdOoPy exQDX1m5gjqZgxVINRvBxfYtfmtqzeiD2F3urSpr4JE4sJYOrpFksMcO/Fxf/d9UX8v/ avPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailoo.org header.s=mailo header.b=POxlVPOz; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mailoo.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wy8-20020a170906fe0800b007801a579899si5153578ejb.448.2022.11.04.06.28.18; Fri, 04 Nov 2022 06:28:42 -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=fail header.i=@mailoo.org header.s=mailo header.b=POxlVPOz; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mailoo.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230428AbiKDN0B (ORCPT + 99 others); Fri, 4 Nov 2022 09:26:01 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748572330475444961?= X-GMAIL-MSGID: =?utf-8?q?1748572330475444961?= 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";