From patchwork Mon Nov 21 00:53:07 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: 627342 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 E7013C433FE for ; Mon, 21 Nov 2022 00:53:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229813AbiKUAxS (ORCPT ); Sun, 20 Nov 2022 19:53:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229925AbiKUAxP (ORCPT ); Sun, 20 Nov 2022 19:53:15 -0500 Received: from mail-4318.protonmail.ch (mail-4318.protonmail.ch [185.70.43.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CC0A15A27; Sun, 20 Nov 2022 16:53:13 -0800 (PST) Date: Mon, 21 Nov 2022 00:53:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1668991992; x=1669251192; bh=rvgqD3kMhIWmN1uoL7kkpUV34ll+GvDevC8V4e/ofec=; 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=sCcoLWQM3EIAdUJxF6zz8wZEf8U79hqNmtyXgl7QI5kUKXmihQlokkgW6U7pCxTjS EQY+PmUPo4uD5LH1nAnVuh0BgR5R+u3A7H/Dzem4eF2YiQ8PbJot40XpqLES6Cr2lU R3BVneoW4kytwzLXkZI1AxV5y/74/Ygfe+kHNb1pLJuOY3x5Uu6x8HR4Ojpypu5ai/ Asa27fNqTkIBG/PsasMd2Wv2tOOrqTd/Pl8T17FZpETC9IpYTNC01Pu24tbxk9tCad 7G8sOCAaIut9W0H2jsOag2d69EiYphUrNJnQMN/cWjgO6Qd5TZIHOGpQiUPL92d5cG lzLZgARP+ntMw== 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 v2 5/5] arm64: dts: qcom: msm8916-gplus-fl8005a: Add flash LED Message-ID: <20221121005200.4407-1-linmengbo0689@protonmail.com> In-Reply-To: <20221121004813.3883-1-linmengbo0689@protonmail.com> References: <20221121004813.3883-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 --- .../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 73597f1883aa..bd021802cca6 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";