From patchwork Wed Nov 23 04:14:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 628431 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 E1AEEC4332F for ; Wed, 23 Nov 2022 04:17:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235790AbiKWERD (ORCPT ); Tue, 22 Nov 2022 23:17:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235833AbiKWEQN (ORCPT ); Tue, 22 Nov 2022 23:16:13 -0500 Received: from mail-40132.protonmail.ch (mail-40132.protonmail.ch [185.70.40.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BF7AB865; Tue, 22 Nov 2022 20:14:05 -0800 (PST) Date: Wed, 23 Nov 2022 04:14:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1669176844; x=1669436044; bh=mKT0b3j/bY3j0Y2khrfg5ryVKfOy6kNma6mcjHf4UFk=; 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=QlzoiIgIT1vfZMLnPBiYQwgr5bxtWJ4jO5ZgkfOpyKANElPswtZ31Qulx5qnKcvcn Xmx7dep6ZZiyA9Bv1II9vhj5K5uIArfLh82n4mqNQGMBJN3oDFbD0lIKY/815ZSNyv UIREjBtljutP9mZCZqxtdyWeo8G3tR6SQcZR1YcwcT89ETB1JPXvaRgOmACVuW3zRX QU8pajwn+pgu745hK0ucrrrli8/BCyIEPRK057KN7P6AD1AsP3O+FovzrJYb5nR5my jB6Bujw9qXWc/xHAgfOzeL95l+YK+slX79r5FL+rBozMtA4MWxZfPwiB3S/EyYakjc SpcksM36VeNkA== 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 , Shawn Guo , Stephan Gerhold , Nikita Travkin , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: [PATCH v4 5/5] arm64: dts: qcom: msm8916-gplus-fl8005a: Add flash LED Message-ID: <20221123041312.151109-1-linmengbo0689@protonmail.com> In-Reply-To: <20221123041110.150837-1-linmengbo0689@protonmail.com> References: <20221123041110.150837-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org FL8005A uses 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 2cac99e3e52c..b28d7d0f1ed5 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts @@ -21,6 +21,21 @@ chosen { stdout-path = "serial0"; }; + flash-led-controller { + compatible = "sgmicro,sgm3140"; + enable-gpios = <&msmgpio 31 GPIO_ACTIVE_HIGH>; + flash-gpios = <&msmgpio 32 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <&camera_flash_default>; + + flash_led: led { + function = LED_FUNCTION_FLASH; + color = ; + flash-max-timeout-us = <250000>; + }; + }; + gpio-keys { compatible = "gpio-keys"; @@ -239,6 +254,14 @@ 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";