From patchwork Sat Jan 7 13:33:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 40397 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1302638wrt; Sat, 7 Jan 2023 05:36:41 -0800 (PST) X-Google-Smtp-Source: AMrXdXtsk5ooJYlaES/ZlGoAP9CWdZeooS4d7b6FGYIRstl/g6j9lw1fji+elKPpW4pOByh+qJJw X-Received: by 2002:a05:6402:220e:b0:483:a6d8:7ad with SMTP id cq14-20020a056402220e00b00483a6d807admr38038341edb.24.1673098601052; Sat, 07 Jan 2023 05:36:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673098601; cv=none; d=google.com; s=arc-20160816; b=V6cIC+1FNrVLtWYm6f7vME+v2eWRIEdf9Y/k5aouQLTaHp2EUGTbrvGxbm4zIc989y Q9fEOK5M2uEY+flXNvwi1ntbKQCzN2z7q5nEVdb93Z2ILZjQ09pvSKs2xdxiQvfwF6HM 2RnJspcy3rw/Q2YmH9hsh5Cl4LXLHsWNzEe2CToCH/Q3O0ZAwbuH5eRUwWOq3RwTrPMq n0xS3NGdKyXdemNWK4CsiEBg4OdCLamYpV/XQEh9MlKMnNZyiIH4GI52S5Zx65OoQTra 2cAb69LiNtgL7ovL1lP/MAVW/uMBRmsQJhQV1yv5eVfN0tgfMA9gFux382FQhr/wt9Eg KeoA== 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=pZqBx8JCAkeYcPAdWXRIi74S0JqcHdu0E5A9iWrKaZ0=; b=UP5F9oy3mU9HKhaWR+yQZ1thJUKf8iO1nBkvM0ukdqNx635z8Ayp96tR5lOd2oQ0d6 FD11lzWf7Kh7cMEQG0GYknOnC13Ikej9AYX1IiXvnMVoHNxzGYHgGUzgujoB9To2GnQO FA1lPv5tjcVvvjHxxiRAGh8R7hpOoA21huJPwpJTGOsFFGoQLXAiKIimLfYL7egmpKDz EXxRnqnDoPy4EQmXQ1hzeazRxmnucYLxRfU5rCnxopRxTXpgHq312B+atJ4KCB6dy8Ca oMA2WRhNllMfi2wOGiw0jFSNn2XlQ4IplFo3EAmsb9qMlxqPBPBcCMLkwGHJ3Rpy4s4y R7Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=iwAYvSsj; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n8-20020a05640205c800b0049529a46539si5190613edx.283.2023.01.07.05.36.16; Sat, 07 Jan 2023 05:36:41 -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=iwAYvSsj; 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 S232495AbjAGNdw (ORCPT + 99 others); Sat, 7 Jan 2023 08:33:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232491AbjAGNda (ORCPT ); Sat, 7 Jan 2023 08:33:30 -0500 Received: from mail-4318.protonmail.ch (mail-4318.protonmail.ch [185.70.43.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58B6E5DE5B; Sat, 7 Jan 2023 05:33:29 -0800 (PST) Date: Sat, 07 Jan 2023 13:33:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1673098407; x=1673357607; bh=pZqBx8JCAkeYcPAdWXRIi74S0JqcHdu0E5A9iWrKaZ0=; 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=iwAYvSsjrQSZuFbs2zt+tiSusDB2d8hfwq8/9fFHEO4sCXF6sxCQ4P/CTlahI7uJm nngNB0rN4GrRIA+hGFE0z2nl4vnG5KXqbv7w8tXYMfuL1gOC3TXs4tYNqL+vFtXZrV of1Fvxqvy5u3AdTv4SIytFGDcMMNiWIuiJMFETEeza9UDgayz8c6P9XGaomq3nvKP1 j373SK7vwHMMPMJE+mrk+lpQeQddmflWo00lH21z7yY27X875cYEpt5Y1AfZnxqygo oM5YckNNNlqHVOLjKW1YYBEgb9y0rEe3IgkB/IXNCX5mt7tWWJXNDxQoRYqa/QtFp8 By28DbQIB8JyA== To: linux-kernel@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Linus Walleij , Stanislav Jakubek , Miquel Raynal , Jagan Teki , Chris Morgan , Stephan Gerhold , Nikita Travkin , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: [PATCH v6 5/5] arm64: dts: qcom: msm8916-gplus-fl8005a: Add flash LED Message-ID: <20230107133235.139947-1-linmengbo0689@protonmail.com> In-Reply-To: <20230107132932.139669-1-linmengbo0689@protonmail.com> References: <20230107132932.139669-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754371038908195264?= X-GMAIL-MSGID: =?utf-8?q?1754371038908195264?= FL8005A uses Qualcomm GPIO flash LEDs which is compatible with SGM3140 Flash LED driver. Add it to the device tree. Signed-off-by: Lin, Meng-Bo Reviewed-by: Konrad Dybcio --- .../boot/dts/qcom/msm8916-gplus-fl8005a.dts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts index b44c30a72784..a0e520edde02 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts @@ -21,6 +21,22 @@ chosen { stdout-path = "serial0"; }; + flash-led-controller { + /* Actually qcom,leds-gpio-flash */ + compatible = "sgmicro,sgm3140"; + enable-gpios = <&msmgpio 31 GPIO_ACTIVE_HIGH>; + flash-gpios = <&msmgpio 32 GPIO_ACTIVE_HIGH>; + + pinctrl-0 = <&camera_flash_default>; + pinctrl-names = "default"; + + flash_led: led { + function = LED_FUNCTION_FLASH; + color = ; + flash-max-timeout-us = <250000>; + }; + }; + gpio-keys { compatible = "gpio-keys"; @@ -237,6 +253,13 @@ l18 { }; &msmgpio { + camera_flash_default: camera-flash-default-state { + pins = "gpio31", "gpio32"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + gpio_keys_default: gpio-keys-default-state { pins = "gpio107"; function = "gpio";