From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75D26192B78 for ; Wed, 6 Nov 2024 06:18:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730873908; cv=none; b=lGMANeV5DgQbul7tbjOZOzfxUPqgf9VFRTWQzUe8LceXv+Zc+aUYAo7BteHq6oK1dArkqalBmVYW7YBKCysO3M9g/xXkCxZ4NOAxZWEozbBqroKyznOM2oGH1KuqbyKUSVsjIn94AKrvNzF9GtH8cG2NsjXM9Go48CoYnPCupZA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730873908; c=relaxed/simple; bh=w+XHq9w7Bz9O2dHFT5zj8vUvIOCoNUqwqvDDMjf/3u0=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ovZJ8jI9SHyBuDBIhdKm2YLp5wZfMrAzCIdgwkoxR5DYOwXkTerMIEPIBw+v29Pn8QGuby/5Ievpqn1QYr4y4XxDQ4WElT0dKhPhXldz2tkXgoYgM1Gjlg0nbWyOayy3rkPwl6EmqGE6DTI5+XWgWpWX6KVTp3nsfvPV7QieDX0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=remote-tech.co.uk; spf=pass smtp.mailfrom=remote-tech.co.uk; dkim=pass (2048-bit key) header.d=remote-tech-co-uk.20230601.gappssmtp.com header.i=@remote-tech-co-uk.20230601.gappssmtp.com header.b=k26eFjfO; arc=none smtp.client-ip=209.85.208.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=remote-tech.co.uk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=remote-tech.co.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=remote-tech-co-uk.20230601.gappssmtp.com header.i=@remote-tech-co-uk.20230601.gappssmtp.com header.b="k26eFjfO" Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-5ceb03aaddeso6834531a12.2 for ; Tue, 05 Nov 2024 22:18:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=remote-tech-co-uk.20230601.gappssmtp.com; s=20230601; t=1730873902; x=1731478702; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=zHi7Lp38jT8FmPt7TMK4PF42l87ejDv0GI3ZM6aDB/0=; b=k26eFjfOXSZJzH0CGSVlqHcOczgctV2x/O3PQaAm4AKSzj2LKoKjkwUb3JkyaB2EAW txz2gxsGP9BzaKV2WEhsmlhBLCodcukcD3qx8iKwHB6z98dZwXpcMXkvGUbZZr2LX9xS ON4pR2+qatpTJ4pjKR3BxbwpUqZmLBsj4vgRu32OgsqzUOtbtg8J6sGK8Lm7YBkn2qoD aafh9OWcvZi30EgfrWELgSGotcgg/QVNPFjwXkUESYsRYdcz0siZpsMwomJNVKTXKTBx mhsLlhkPOrBvAmYlc3KXFx3dPiOwYVOt1Z4JLEtxfY3eMWn5V0s0MKb0piozM1786oWr 6zXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730873902; x=1731478702; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zHi7Lp38jT8FmPt7TMK4PF42l87ejDv0GI3ZM6aDB/0=; b=Q9kGldUC3jt/haA7uNAiPf7ar5F9Rso8dIqtc0u+U13Hu5KBFTaZQpaw7u96xW9fjT aOm8ofDh3YBlNeBTqpSmuAJ0zMpWiRwVdgUjfRGN/HFQzk+DaCehe90n/fpFDZHNiIpZ eGLpvpyraByfndtdxwAzHCUzDXsV4c88BJt3dzNAWkneq3HMJ3D0LUSbOg8FTQJJjiPh pK9fKFGyZD4SOXuNKhIqVBS6w5O17dNvZml0zLITcfcMGmrRd5q/MlTWJoyCmN+QfdQx /hu0uB1aU8YmLh4vb1jVCBkZuMvcJaBH3W+AWdqWtW++cNCAAF1/CdzOHd4IFi1XHtsN BL1A== X-Forwarded-Encrypted: i=1; AJvYcCXuvME4rhbRzut+j/sBiNNeYDCXkOP0NsUhGbnO+l6ehvw4fH44vtCNurmy4YNN6dte3aGHO3xF3ZOlVfI=@vger.kernel.org X-Gm-Message-State: AOJu0YxFC3wW8Cl2sNVicPpQh3TX/fX5oVQHMEjk76BE+EMvb7FCNlri JBc6bjVJZzh2BaVEb+lFf7Y9wVDbnxk738py1lvs3KWqSNDLk4Xj+YY02eSInYciuFNH4oj6y7v WfcOY1/kz+DJajMXfQA0cNuyVsmfBRuj4U0KqJ9LfFhPYzkCkBT3aKjd93C3taJd4CxJoRLCpXw IM9nlnkTMJbcEHIohwIwPmIfLabdI= X-Google-Smtp-Source: AGHT+IEvauvbIcdk/auONxb/0Op8p4Q/d+ZwECWBvxyMYvWi4k33l5h9kT3lkSNfqa2WgLCbhk+6ow== X-Received: by 2002:a17:907:7e8e:b0:a99:e939:d69e with SMTP id a640c23a62f3a-a9de61d1a8cmr3138392066b.51.1730873901592; Tue, 05 Nov 2024 22:18:21 -0800 (PST) Received: from localhost.localdomain ([178.27.36.125]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9eb17cecccsm232360866b.102.2024.11.05.22.18.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Nov 2024 22:18:20 -0800 (PST) From: Vicentiu Galanopulo To: Pavel Machek , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , Vicentiu Galanopulo , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH 2/3] [PATCH v4] dt-bindings: leds: Add LED1202 LED Controller Date: Wed, 6 Nov 2024 06:18:08 +0000 Message-Id: <20241106061812.6819-2-vicentiu.galanopulo@remote-tech.co.uk> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241106061812.6819-1-vicentiu.galanopulo@remote-tech.co.uk> References: <20241106061812.6819-1-vicentiu.galanopulo@remote-tech.co.uk> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The LED1202 is a 12-channel low quiescent current LED driver with: * Supply range from 2.6 V to 5 V * 20 mA current capability per channel * 1.8 V compatible I2C control interface * 8-bit analog dimming individual control * 12-bit local PWM resolution * 8 programmable patterns If the led node is present in the controller then the channel is set to active. v1: https://lore.kernel.org/lkml/ZnCnnQfwuRueCIQ0@admins-Air/T/ v2: https://lore.kernel.org/all/ZniNdGgKyUMV-hjq@admins-Air/T/ v3: https://lore.kernel.org/all/ZniNdGgKyUMV-hjq@admins-Air/T/ Signed-off-by: Vicentiu Galanopulo --- Changes in v4: - remove label property, use devm_led_classdev_register_ext instead - use as base patch the v3 Changes in v3: - remove active property Changes in v2: - renamed label to remove color from it - add color property for each node - add function and function-enumerator property for each node --- .../devicetree/bindings/leds/st,led1202.yaml | 132 ++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/st,led1202.yaml diff --git a/Documentation/devicetree/bindings/leds/st,led1202.yaml b/Documentation/devicetree/bindings/leds/st,led1202.yaml new file mode 100644 index 000000000000..7e49e6464d41 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/st,led1202.yaml @@ -0,0 +1,132 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/st,led1202.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ST LED1202 LED controllers + +maintainers: + - Vicentiu Galanopulo + +description: | + The LED1202 is a 12-channel low quiescent current LED controller + programmable via I2C; The output current can be adjusted separately + for each channel by 8-bit analog and 12-bit digital dimming control. + Datasheet available at + https://www.st.com/en/power-management/led1202.html + +properties: + compatible: + const: st,led1202 + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^led@[0-9a-f]$": + type: object + $ref: common.yaml# + unevaluatedProperties: false + + properties: + reg: + minimum: 0 + maximum: 11 + + required: + - reg + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + +additionalProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@58 { + compatible = "st,led1202"; + reg = <0x58>; + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0x0>; + function = LED_FUNCTION_STATUS; + color = ; + function-enumerator = <1>; + }; + + led@1 { + reg = <0x1>; + function = LED_FUNCTION_STATUS; + color = ; + function-enumerator = <2>; + }; + + led@2 { + reg = <0x2>; + function = LED_FUNCTION_STATUS; + color = ; + function-enumerator = <3>; + }; + + led@3 { + reg = <0x3>; + function = LED_FUNCTION_STATUS; + color = ; + function-enumerator = <4>; + }; + + led@4 { + reg = <0x4>; + function = LED_FUNCTION_STATUS; + color = ; + function-enumerator = <5>; + }; + + led@5 { + reg = <0x5>; + function = LED_FUNCTION_STATUS; + color = ; + function-enumerator = <6>; + }; + + led@6 { + reg = <0x6>; + function = LED_FUNCTION_STATUS; + color = ; + function-enumerator = <7>; + }; + + led@7 { + reg = <0x7>; + function = LED_FUNCTION_STATUS; + color = ; + function-enumerator = <8>; + }; + + led@8 { + reg = <0x8>; + function = LED_FUNCTION_STATUS; + color = ; + function-enumerator = <9>; + }; + }; + }; +... -- 2.25.1