Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3669848yba; Tue, 16 Apr 2019 16:55:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqymNy/7rJVjRNbaDp53MENvmrbSFUGdfykWEC0XLxxzFFWPB5245ZkN5bPzQJnNua1cDqVA X-Received: by 2002:a17:902:9884:: with SMTP id s4mr85876506plp.179.1555458918022; Tue, 16 Apr 2019 16:55:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555458918; cv=none; d=google.com; s=arc-20160816; b=LzQDvX/2k3SPlqWOkkSravvtaxyeU+TcPaAFZcApRauZ5L0tJy04yCqVT6AbRrxi5R VKP0lWuxW2zm+tJf4YDG43mhQWPTorzveCJ+Ufc4Sv39LUZMeCdgFAaHzLqMUrFtYLbk QSRubzHbfyeCEbUP/kO8nrv0llShujGLZO5LrMoHQZCuSAOB711+gsjeeWanUrPca4Wh CM74NbEEAVxNIuHHcDjNYxRivFQ773EFVqyGb2/GPqy+/jk4YRMSJc4jmuTpLOiXcGE/ Z9UG4px8xKr/SDM5FL246L+9LxEUxMdWOUGP77GOo5HwG82KO6MAwaqXIurORtVqcIxx B/1g== 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=C+BR51n9GyEbWrmUra9XPLC3rrVLzgz+uZtqIU7mnW4=; b=wp2iUvX+lXylx9wzvxJpuPs+gz6RlHfnlsHLFMFjZ8mGqYvBKgI91C36BXuDzhKZto eVPzpTKhwKsLGJD6arCcRfFY/sNaT8CsXVN63yjmLTDHOoNAklLQ2QGOO8Q2AmHcdTIN 0a0Fw24ya/k7j0y5oVekwd+CrPmOGYodaR24CQ8OmbJHlWkKCteZhodjwiqhvxwLTXuq MGafqy3TG1a1IUEEqBJslorrAXkRgEng/b4NHRUwFEiQDjVH1W1IJSz1cpTskvlSpxy6 INMZaHWYyLGcvOPzlREZb8caxl7CUqJaoREnwfSs/AV1JBg+Nwn7w7EVegzlFMkQueIm v6SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@onstation.org header.s=default header.b=N7899XKD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s7si45471652pgb.567.2019.04.16.16.55.02; Tue, 16 Apr 2019 16:55:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@onstation.org header.s=default header.b=N7899XKD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731088AbfDPXyP (ORCPT + 99 others); Tue, 16 Apr 2019 19:54:15 -0400 Received: from onstation.org ([52.200.56.107]:38642 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731058AbfDPXyN (ORCPT ); Tue, 16 Apr 2019 19:54:13 -0400 Received: from localhost.localdomain (c-98-239-145-235.hsd1.wv.comcast.net [98.239.145.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id 09B5D44894; Tue, 16 Apr 2019 23:54:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=onstation.org; s=default; t=1555458852; bh=wYDfCXPbimDp4JwrV4ABrmlkaKC8gPW27z5BYIQnB+Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N7899XKDaqSENGFYR79GMly336Iz+YSlEm9SJMbtu2zxfHVtyZCXABxM6uuJRcBLF vgeSodUmgUy64NdR90QHli61W2Tq519WEueiybggplcPLeZyDEDHPKfySuFlhqeDmC xR4+Q/8m+xpmtWDYMPiNegNN+Naa4F7b06XgdjP4= From: Brian Masney To: lee.jones@linaro.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, robh+dt@kernel.org Cc: jacek.anaszewski@gmail.com, pavel@ucw.cz, mark.rutland@arm.com, b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, dmurphy@ti.com, jonathan@marek.ca Subject: [PATCH v4 2/3] dt-bindings: backlight: add lm3630a bindings Date: Tue, 16 Apr 2019 19:53:49 -0400 Message-Id: <20190416235350.13742-3-masneyb@onstation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190416235350.13742-1-masneyb@onstation.org> References: <20190416235350.13742-1-masneyb@onstation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add new backlight bindings for the TI LM3630A dual-string white LED. Signed-off-by: Brian Masney --- Rob: Since the common bindings aren't converted to the new JSON schema yet, I'm not sure how to do led-sources here. I would expect that we'd have the uint32-array on the common binding once it exists. I had to add it here to keep 'make dt_binding_check' happy. I left the description off though for that property since that'll come from common once its converted. Changes since v3: - Add label. I didn't add a description for it since that'll come from the common properties once its converted. Changes since v2: - Update description of max-brightness - Add description for reg - Correct typo: s/tranisiton/transition - add reg to control banks - add additionalProperties .../leds/backlight/lm3630a-backlight.yaml | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml diff --git a/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml b/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml new file mode 100644 index 000000000000..5067038ca637 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml @@ -0,0 +1,128 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/backlight/lm3630a-backlight.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI LM3630A High-Efficiency Dual-String White LED + +maintainers: + - Lee Jones + - Daniel Thompson + - Jingoo Han + +description: | + The LM3630A is a current-mode boost converter which supplies the power and + controls the current in up to two strings of 10 LEDs per string. + https://www.ti.com/product/LM3630A + +properties: + compatible: + const: ti,lm3630a + + reg: + description: The I2C address of the device + maxItems: 1 + + ti,linear-mapping-mode: + description: | + Enable linear mapping mode. If disabled, then it will use exponential + mapping mode in which the ramp up/down appears to have a more uniform + transition to the human eye. + type: boolean + +required: + - compatible + - reg + +patternProperties: + "^led@[01]$": + type: object + description: | + Properties for a string of connected LEDs. + + properties: + reg: + description: Control Bank + maxItems: 1 + minimum: 0 + maximum: 1 + + label: + maxItems: 1 + + led-sources: + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 1 + maxItems: 2 + items: + minimum: 0 + maximum: 1 + + default-brightness: + description: Default brightness level on boot. + minimum: 0 + maximum: 255 + + max-brightness: + description: Maximum brightness that is allowed during runtime. + minimum: 0 + maximum: 255 + + required: + - reg + + additionalProperties: false + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + lm3630a_bl@38 { + compatible = "ti,lm3630a"; + status = "ok"; + reg = <0x38>; + + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + led-sources = <0 1>; + label = "lcd-backlight"; + default-brightness = <200>; + max-brightness = <255>; + }; + }; + }; + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + lm3630a_bl@38 { + compatible = "ti,lm3630a"; + status = "ok"; + reg = <0x38>; + + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + default-brightness = <150>; + ti,linear-mapping-mode; + }; + + led@1 { + reg = <1>; + default-brightness = <225>; + ti,linear-mapping-mode; + }; + }; + }; -- 2.20.1