From patchwork Wed Aug 19 20:51:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 247996 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp781459ils; Wed, 19 Aug 2020 13:52:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfIPYECSOTftC/ngjDmOsrKvnmUi+mdqAopAtmoXKW7rgLF5MWhCSgP7Xsl1Cin+ghXnRE X-Received: by 2002:a17:906:d18c:: with SMTP id c12mr124921ejz.151.1597870324101; Wed, 19 Aug 2020 13:52:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597870324; cv=none; d=google.com; s=arc-20160816; b=XNMxd8Ali/J6Wi96aFiJ8YKoaS7Za/5hKpsLXG3NihnzG8wsnpYDN5c6nhCs9Lu2xz gkRnE28AAk7QvutxnHpqf+1+ihK5u5kFzg+32MflHG4tXKrcR00ikOKI4Li1HUuCE/q0 N+eDJdz1O6dA9baaIzQBdWc5uG8omqRKu3jTSEWM4lPnP+rAtfcKtRW8YE5bCP4ibK11 l5Wwj21NFJZQhcMd5OxC+nNtzBDqyImTfEgKJFpW1tzV4wJOf3AOVZc+sIGVsYfgmjkt 9HV8rOPLtueEpiWhgPAh8W6RN/DM5UfS/TcWMh/JfWN7b3WUrCoHh3AJ2YX8RuYaLx38 lwHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=DrnAOfNeMY45Zc2VAynDzTk+Pika+bbdhzqu0uIz8TM=; b=rzbxExb5I/8iRsQoHPXzz1oQr5fYlbO/0X3ZlpoVzVx5+ctIH9PLAcYsWhxbD1AdUx HnZK5MUvl7sC3/0bLzVoEnV/vhToCcGJWOQjxB40HmM6aBTepqgZdB+QqbnWfs28r8ww Blvs7Fc9F2360hnR4WRu/KtBgexxpfGWMDWwM82h2R7odyk1FUZ7TA3lv0kInhig2NVC giuivtl7XEZ2U8HbLsn1miLN4/2rouv60ny4rSNkJGpg+gn5lxeCgBurFSZsm9h6PDOU auIzoUlU9vhI7yDx4Ch+HTDVl8eloJ5TPVtWU+yyuMlpRJQlIFYL9jBzVJ/t5rRHxMuX b4pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="LXqQ/fx4"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a23si15861949ejx.244.2020.08.19.13.52.03; Wed, 19 Aug 2020 13:52:04 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="LXqQ/fx4"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726729AbgHSUwD (ORCPT + 6 others); Wed, 19 Aug 2020 16:52:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726689AbgHSUwC (ORCPT ); Wed, 19 Aug 2020 16:52:02 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F134C061757 for ; Wed, 19 Aug 2020 13:52:01 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id j22so12800896lfm.2 for ; Wed, 19 Aug 2020 13:52:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DrnAOfNeMY45Zc2VAynDzTk+Pika+bbdhzqu0uIz8TM=; b=LXqQ/fx4gASCmZtcHjHDguMZZ92GvjofBVvXPDlt6vO7HSmPDQfvI/a/1vyZzNRgCX jZ12bFn+2i3bNm8Vwhp2CRp3Kf4137UrglxaGOSBJrPBn4EoOKc5erpsRjErMoF/aOK0 4mbTxt6DBylQ2k0lHNyEEDV/K9XjHFG7X27bDQoflaUbym7Zrb6zTkrPHbkyk+q/AWiw NpxZzk75/qrynlhb8vXjuStzilomVCS4k1FHz1/ImOxhlq2jY/vkv8eDYBpoIr3wXeKp BXY5Cd36msSs24beVkJdlDqGRkl+r2B5Tk2obFnE+Siy0Qmdz0M5aXogdXgPOhG3hOvX Pi1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DrnAOfNeMY45Zc2VAynDzTk+Pika+bbdhzqu0uIz8TM=; b=oZw7zWt2jc5Jqd7UjVinYG2K6oBuyiFX5KVn1spdqY4J/y3K5UvxqahwZhrQdfF4mC 3gGh2dstFIs2wBWYU0FgcxBIG4W2smPJTTBKPhw5tIkxxYaLK6mjXv4ek8s/tbDVuxSi pI2flDEIPZAKVM1kZAJ8whDMfjHyLvPBrF5RH3t1Z0FMbspri2UdbVmIFcWmVaB8a80h 9Fom3R/iGGt7EeGUoBiVwga+s4p5kVPWOv3/IoBvrSbePuIlyXvFthpecnEJdG5hBC7B xdScyvwCgd39cWtSTJU1ryck0R3vxttjdTP/KZ5pL4yBS0LsCO7pJGdN/a5xyFefFset icTw== X-Gm-Message-State: AOAM530FKqLQtPX0eHuUm8alK9m6LixCp/jrPnOkITmk5REHs7KBCO9h /CGyaDd0qVqbQhlxz75mw9ZIZ50wZIR3fw== X-Received: by 2002:a19:3f57:: with SMTP id m84mr1052364lfa.128.1597870320184; Wed, 19 Aug 2020 13:52:00 -0700 (PDT) Received: from localhost.bredbandsbolaget (c-92d7225c.014-348-6c756e10.bbcust.telenor.se. [92.34.215.146]) by smtp.gmail.com with ESMTPSA id u10sm8188lfo.39.2020.08.19.13.51.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Aug 2020 13:51:59 -0700 (PDT) From: Linus Walleij To: Lee Jones , Daniel Thompson , Jingoo Han , dri-devel@lists.freedesktop.org Cc: Linus Walleij , devicetree@vger.kernel.org, Sam Ravnborg Subject: [PATCH 1/3 v3] dt-bindings: backlight: Add some common backlight properties Date: Wed, 19 Aug 2020 22:51:48 +0200 Message-Id: <20200819205150.164403-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Let's use a common.yaml include for the backlight like we do with the LEDs. The LEDs are inherently incompatible so their bindings cannot be reused for backlight. Cc: devicetree@vger.kernel.org Suggested-by: Sam Ravnborg Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Drop the | for the description - Drop the "default-on" property, we're not using it. - Drop the minimum 0 for unsigned u32:s ChangeLog v1->v2: - New patch as suggested by Sam. --- .../bindings/leds/backlight/common.yaml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/common.yaml -- 2.26.2 diff --git a/Documentation/devicetree/bindings/leds/backlight/common.yaml b/Documentation/devicetree/bindings/leds/backlight/common.yaml new file mode 100644 index 000000000000..4e7e95e331a5 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/backlight/common.yaml @@ -0,0 +1,34 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/backlight/common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common backlight properties + +maintainers: + - Lee Jones + - Daniel Thompson + - Jingoo Han + +description: + Backlight devices provide backlight for different types of graphical + displays. They are typically but not necessarily implemented using a white + LED powered by a boost converter. + +properties: + default-brightness: + description: + The default brightness that should be applied to the LED by the operating + system on start-up. The brightness should not exceed the brightness the + LED can provide. + $ref: /schemas/types.yaml#definitions/uint32 + + max-brightness: + description: + Normally the maximum brightness is determined by the hardware and this + property is not required. This property is used to put a software limit + on the brightness apart from what the driver says, as it could happen + that a LED can be made so bright that it gets damaged or causes damage + due to restrictions in a specific system, such as mounting conditions. + $ref: /schemas/types.yaml#definitions/uint32 From patchwork Wed Aug 19 20:51:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 247997 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp781477ils; Wed, 19 Aug 2020 13:52:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygCIW2Sr2x/iJHoPvkYoZ/phjnIlz9NGbonHDyrFueI/etxt/Raxc3vN3flrO4d5TS7BAK X-Received: by 2002:a17:906:8149:: with SMTP id z9mr152756ejw.356.1597870326474; Wed, 19 Aug 2020 13:52:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597870326; cv=none; d=google.com; s=arc-20160816; b=PzKNHHrX2B1CKshIB4C6RAZcRAl+bQny1RyfLNnXmuXdErFTS0xLByM+x3qcpBvuIL nsbyGY5/qNLRFEZxQfyAfE2JM3CRy7fDAaaU52Of4oPcszoSWkav1Ya1WQu1iiNAH/bZ Va1k9l/5L4UIGgQ2VCDQca8uQ/wxX0vFE5yTmzy8nbDibWI/F2OiH13Fp1ZiJwE2i/Yv 3Ph4pTaVn3w6BvPjrKOfCSj8pjxYUKVH2JkLcjH/+Lui7TAaP/HY4xzMn18L6jMYOdjD p/74d47C4xNEPYxjFN9FaY391tAbhPjk87y1+2J9NuMmFwrY4D3zkXAWin5FRwrpF77V jDxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=klnwjmccKXa83diz/UPM1wfkPLBuKxflt6KGqDpoJIA=; b=xcY11TzZgD9i9C8wi2wa3d3/CJYOzcsIs9VqDaFUGIzzIKR1u0nUlft/aAzZc9lfCF qU8J9VOEXxFuifvECEaIuwwzKjOutz4zffatKL6TEd7bz5beXMUpf8H4k15bENSfuH5P pICtgR0cjNZrWpokRFJqBRji/Xtnw4hXu+vfWBD4JBM9fz1Jqmu96TgPEkcfzgrxBd+G DEitjw5RKCo+n8ob7u51ASUo9nPKGEWBg2cAaZiJ3HRZm99Vs81RlVPYPDipDuNDpuTD 8L/GcRhNVFSdmVW2wNCGq2wmHhcPyxRHFtq+VGTMUoZ7eVmRqkXN+vdv6eKovWDoMr+8 4nag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iqx9MNXu; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a23si15861949ejx.244.2020.08.19.13.52.06; Wed, 19 Aug 2020 13:52:06 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iqx9MNXu; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726689AbgHSUwF (ORCPT + 6 others); Wed, 19 Aug 2020 16:52:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726617AbgHSUwE (ORCPT ); Wed, 19 Aug 2020 16:52:04 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81671C061757 for ; Wed, 19 Aug 2020 13:52:04 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id w25so26870789ljo.12 for ; Wed, 19 Aug 2020 13:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=klnwjmccKXa83diz/UPM1wfkPLBuKxflt6KGqDpoJIA=; b=iqx9MNXuK9IoffrzNcqTU41PFdUMB91XH71inx1n2Tiz4S5KKqLMmBMh2CkqU+HxTK 2NodYjaUeQBcdmgPNeWEwyUgePGIoo5qWkdmI7x0ITRwV6yUIEGHVWLHPYm62g1ZfgLe 06BETNmHkSkmN1fZ6q8o4fzGgUNIZJAy1/dXU64TqjyuQrZsTsYxx8ivEJzwYQ+IKi7W 1U/sU1KgFu84MyeJkOJN/3VzwhW2LKAKn5Pm/Gv/2HN9RkMAPa7KApzb6AN0I3yx760B D9YYJByO495l8YChELhS10ikO2fb6z5pFV1FbppTFHLDj6Cfqk5nW0CeZu7QqcwaClmK DveQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=klnwjmccKXa83diz/UPM1wfkPLBuKxflt6KGqDpoJIA=; b=E34nhPpvuBwZe/Ipr7Gv8bxEHBnAYyCEn1Fdl7R+m+AamcTGUW8JaxNDlblEDXaWbb ImSO7Kz/jXthk7L1cU13DWcN9Uj840yqZ86+vbqPQqVrIj3yUHsmAAijOpqqWtsW8v5K ao4ezNbO4ZdpUmN+CEkqC3cDEGfjo4TOTvEwCzgTIlEamUC1jv7EQPG82rWDjMTz7Jnb ycWO9fXqOi+X0QsDA06OmF3lkwAmb79JewFKbsYTvKrbjlmnIxWybfYvpkXF0Kf9JBPU fC6SK4EMGEcjD4+ae4UCQc90+7Mek5DyYrz9AcJ9xjajs9yCRd0VFI7tlb9GLPMGuCb7 w9Pw== X-Gm-Message-State: AOAM531weMP/7FIQHHwHM/Ix2fS4JfkzEpMj/NwIiuRTyHcXnO9qus1B 4Qh+f+hBhTZtnPZfXUJ4rnYK6w== X-Received: by 2002:a2e:531c:: with SMTP id h28mr33256ljb.322.1597870322914; Wed, 19 Aug 2020 13:52:02 -0700 (PDT) Received: from localhost.bredbandsbolaget (c-92d7225c.014-348-6c756e10.bbcust.telenor.se. [92.34.215.146]) by smtp.gmail.com with ESMTPSA id u10sm8188lfo.39.2020.08.19.13.52.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Aug 2020 13:52:02 -0700 (PDT) From: Linus Walleij To: Lee Jones , Daniel Thompson , Jingoo Han , dri-devel@lists.freedesktop.org Cc: Linus Walleij , devicetree@vger.kernel.org, Sam Ravnborg Subject: [PATCH 2/3 v3] dt-bindings: backlight: Add Kinetic KTD253 bindings Date: Wed, 19 Aug 2020 22:51:49 +0200 Message-Id: <20200819205150.164403-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200819205150.164403-1-linus.walleij@linaro.org> References: <20200819205150.164403-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds device tree bindings for the Kinetic KTD253 white LED backlight driver. Cc: devicetree@vger.kernel.org Cc: Sam Ravnborg Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Drop the pointless cargo-culted "default-on" property that we were not using - Correct the brightness in the example to something legal (13) ChangeLog v1->v2: - Create common.yaml for backlight as suggested by Sam and use that. - Rename the GPIO line "enable-gpios" --- .../leds/backlight/kinetic,ktd253.yaml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/kinetic,ktd253.yaml -- 2.26.2 Reviewed-by: Daniel Thompson Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/leds/backlight/kinetic,ktd253.yaml b/Documentation/devicetree/bindings/leds/backlight/kinetic,ktd253.yaml new file mode 100644 index 000000000000..7a6ec1f8c0f3 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/backlight/kinetic,ktd253.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/backlight/kinetic,ktd253.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Kinetic Technologies KTD253 one-wire backlight + +maintainers: + - Linus Walleij + +description: | + The Kinetic Technologies KTD253 is a white LED backlight that is + controlled by a single GPIO line. If you just turn on the backlight + it goes to maximum backlight then you can set the level of backlight + using pulses on the enable wire. This is sometimes referred to as + "expresswire". + +allOf: + - $ref: common.yaml# + +properties: + compatible: + const: kinetic,ktd253 + + enable-gpios: + description: GPIO to use to enable/disable and dim the backlight. + maxItems: 1 + + default-brightness: true + max-brightness: true + +required: + - compatible + - enable-gpios + +additionalProperties: false + +examples: + - | + #include + backlight { + compatible = "kinetic,ktd253"; + enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>; + default-brightness = <13>; + };