From patchwork Thu Dec 1 20:21:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 630066 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 276A4C63703 for ; Thu, 1 Dec 2022 20:21:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231252AbiLAUVy (ORCPT ); Thu, 1 Dec 2022 15:21:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230415AbiLAUVv (ORCPT ); Thu, 1 Dec 2022 15:21:51 -0500 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F2CABFCD6 for ; Thu, 1 Dec 2022 12:21:49 -0800 (PST) Received: by mail-lf1-x132.google.com with SMTP id j16so4235202lfe.12 for ; Thu, 01 Dec 2022 12:21:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iF6o3uPyABz/JCGS6mnoQHfG46FmIuXFpnlO4Zq7ZHg=; b=f+fcwi4CQzJW8ZkO4WEjn5M6xr060pyBYRag6KT0553j4iRKyzxDf+vDKr9jLvyGWM EbZ/fD4CeEwjTmGYWAsiCrKhHm/d7ugchP3M5ptCcFWuvNub3fSzLOsfWv0RqJjnqbO3 bwUzjpqfpqM0CTFsOfTYcaNFz79VDt3x5Aodgf08XyEliE9h9gVfPdrMWzRsFjr2gUQZ 5ZoZrZU7KembWHy5YRGnj1pmzZj4VVtFngg6NrYd/kl+F5dEikfLKFmLsWaPUbtlNEPb OrW6Y809soPTgHf5yuvxk4pz1PL+5BwTfC1IHsDgQqk/LxIUW+XZZNWQNldWa6tjxsnu io8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iF6o3uPyABz/JCGS6mnoQHfG46FmIuXFpnlO4Zq7ZHg=; b=UL4BoyDFolUfD8zLT2WNwHd2h6udLCAzUXpgwxc8jmhyyp8qHvEKKk0KQisy8LzJCx rxd6zxWuRELS8bF/OvuJdQTXiHIYL/x9hf8Tz0+L2n2BWxQxRZseasdHtTvZd87RdQLd zDGeQl++eKV6RcyiO/9KDk3UKXSI+Hc1bBL4wq12KcxyVw7TYMnw/n35EvpRotkX/rIv Q5XoFDFMOUK4sVQDRjdZqJlCKgQMjLQgie/bmSDNVUL7L2PA4Xz6CKdDyZoyDYNpIMOa zag9auoKLJjTPPLS/EBlVVNBY3tvA0LPxSvqBmQ3rzL9p3oruH8tKu5kO2obk4hJXB5Z KhkA== X-Gm-Message-State: ANoB5pkyw8R04Hv/w3r6z0gSfqK0/kMcx4UMsKurYX6Yc5h19+v1brxd IgEPoPhusVEvNC3tkMiSAgrJfw== X-Google-Smtp-Source: AA0mqf5kUlQyWDWL6WaRuqUuiBGnYZgINSU+I31mAkOyo4uzdi8VNv4sdz5kTjTvEE5BC9Bi1HbfzA== X-Received: by 2002:ac2:58ca:0:b0:4b4:eed:ec3e with SMTP id u10-20020ac258ca000000b004b40eedec3emr22276212lfo.446.1669926107482; Thu, 01 Dec 2022 12:21:47 -0800 (PST) Received: from eriador.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id l30-20020a19495e000000b004b514b27c86sm769679lfj.13.2022.12.01.12.21.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Dec 2022 12:21:47 -0800 (PST) From: Dmitry Baryshkov To: devicetree@vger.kernel.org, Lee Jones , Rob Herring , Krzysztof Kozlowski Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , linux-arm-msm@vger.kernel.org, Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org, Dmitry Torokhov , linux-input@vger.kernel.org, Pavel Machek , linux-leds@vger.kernel.org Subject: [PATCH 2/5] dt-bindings: leds: pm8058: convert from txt to YAML format Date: Thu, 1 Dec 2022 22:21:41 +0200 Message-Id: <20221201202144.448694-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221201202144.448694-1-dmitry.baryshkov@linaro.org> References: <20221201202144.448694-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Convert the bindings for the leds subdevice of Qualcomm PM8058 PMIC from text to YAML format. Signed-off-by: Dmitry Baryshkov --- .../devicetree/bindings/leds/leds-pm8058.txt | 67 --------------- .../devicetree/bindings/leds/leds-pm8058.yaml | 81 +++++++++++++++++++ 2 files changed, 81 insertions(+), 67 deletions(-) delete mode 100644 Documentation/devicetree/bindings/leds/leds-pm8058.txt create mode 100644 Documentation/devicetree/bindings/leds/leds-pm8058.yaml diff --git a/Documentation/devicetree/bindings/leds/leds-pm8058.txt b/Documentation/devicetree/bindings/leds/leds-pm8058.txt deleted file mode 100644 index 89584c49aab2..000000000000 --- a/Documentation/devicetree/bindings/leds/leds-pm8058.txt +++ /dev/null @@ -1,67 +0,0 @@ -Qualcomm PM8058 LED driver - -The Qualcomm PM8058 is a multi-functional device which contains -an LED driver block for up to six LEDs: three normal LEDs, two -"flash" LEDs and one "keypad backlight" LED. The names are -quoted because sometimes these LED drivers are used for wildly -different things than flash or keypad backlight: their names -are more of a suggestion than a hard-wired usecase. - -Hardware-wise the different LEDs support slightly different -output currents. The "flash" LEDs do not need to charge nor -do they support external triggers. They are just powerful LED -drivers. - -The LEDs appear as children to the PM8058 device, with the -proper compatible string. For the PM8058 bindings see: -mfd/qcom-pm8xxx.txt. - -Each LED is represented as a sub-node of the syscon device. Each -node's name represents the name of the corresponding LED. - -LED sub-node properties: - -Required properties: -- compatible: one of - "qcom,pm8058-led" (for the normal LEDs at 0x131, 0x132 and 0x133) - "qcom,pm8058-keypad-led" (for the "keypad" LED at 0x48) - "qcom,pm8058-flash-led" (for the "flash" LEDs at 0x49 and 0xFB) - -Optional properties: -- label: see Documentation/devicetree/bindings/leds/common.txt -- default-state: see Documentation/devicetree/bindings/leds/common.txt -- linux,default-trigger: see Documentation/devicetree/bindings/leds/common.txt - -Example: - -qcom,ssbi@500000 { - pmicintc: pmic@0 { - compatible = "qcom,pm8058"; - led@48 { - compatible = "qcom,pm8058-keypad-led"; - reg = <0x48>; - label = "pm8050:white:keypad"; - default-state = "off"; - }; - led@131 { - compatible = "qcom,pm8058-led"; - reg = <0x131>; - label = "pm8058:red"; - default-state = "off"; - }; - led@132 { - compatible = "qcom,pm8058-led"; - reg = <0x132>; - label = "pm8058:yellow"; - default-state = "off"; - linux,default-trigger = "mmc0"; - }; - led@133 { - compatible = "qcom,pm8058-led"; - reg = <0x133>; - label = "pm8058:green"; - default-state = "on"; - linux,default-trigger = "heartbeat"; - }; - }; -}; diff --git a/Documentation/devicetree/bindings/leds/leds-pm8058.yaml b/Documentation/devicetree/bindings/leds/leds-pm8058.yaml new file mode 100644 index 000000000000..a73bffb36808 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-pm8058.yaml @@ -0,0 +1,81 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/leds-pm8058.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm PM8058 LED driver + +maintainers: + - Dmitry Baryshkov + +description: | + The Qualcomm PM8058 is a multi-functional device which contains + an LED driver block for up to six LEDs: three normal LEDs, two + "flash" LEDs and one "keypad backlight" LED. The names are + quoted because sometimes these LED drivers are used for wildly + different things than flash or keypad backlight: their names + are more of a suggestion than a hard-wired usecase. + + Hardware-wise the different LEDs support slightly different + output currents. The "flash" LEDs do not need to charge nor + do they support external triggers. They are just powerful LED + drivers. + + The LEDs appear as children to the PM8058 device, with the + proper compatible string. For the PM8058 bindings see: + mfd/qcom-pm8xxx.txt. + + Each LED is represented as a sub-node of the syscon device. Each + node's name represents the name of the corresponding LED. + +$ref: common.yaml# + +properties: + compatible: + enum: + - qcom,pm8058-led + - qcom,pm8058-keypad-led + - qcom,pm8058-flash-led + + reg: + description: resource address + +unevaluatedProperties: false + +examples: + - | + #include + #include + pmic { + #address-cells = <1>; + #size-cells = <0>; + + led@48 { + compatible = "qcom,pm8058-keypad-led"; + reg = <0x48>; + label = "pm8050:white:keypad"; + default-state = "off"; + }; + led@131 { + compatible = "qcom,pm8058-led"; + reg = <0x131>; + label = "pm8058:red"; + default-state = "off"; + }; + led@132 { + compatible = "qcom,pm8058-led"; + reg = <0x132>; + label = "pm8058:yellow"; + default-state = "off"; + linux,default-trigger = "mmc0"; + }; + led@133 { + compatible = "qcom,pm8058-led"; + reg = <0x133>; + label = "pm8058:green"; + default-state = "on"; + linux,default-trigger = "heartbeat"; + }; + }; +...