From nobody Sat Jul 25 00:11:03 2026 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (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 B19D446F4A9 for ; Tue, 21 Jul 2026 19:29:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784662172; cv=none; b=WXVr9VXOkbfSH/UDZBizYOu+OF8ZWza32SdZS9TnSGEWWtk91ar+lq95JLb3FcAg3RLzixvQmdY2IigCmKoBNL/O/BHM7RYlS1xy2S/2Cv1zkpCirCd7jSbRpO1dV4Iu5uZ/pRV2eAHyJkBD35QigPCk0I0aB0VM7nUh9TDjqjs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784662172; c=relaxed/simple; bh=5uHrJY3HeWlIs8TynVILl3KyFkLfOhYuUo74OAadzzM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MsO6a9iQ9kiAW9f52sOeueDH0S3nTuVZb4BHbuJGjnPgK+RrvcgTWDcVWpQjyEr17PrR9dafyODCkQDc61EGszEPZhMGvHMfiZLasKR3AhyOJr0vyq5ILK9IA4vz13oEgTuko0Rc4ZuK6ibWDVenBvCFM2JUKaSUXRKtmmANha0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZZBen4NA; arc=none smtp.client-ip=209.85.214.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZZBen4NA" Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-2cea3004256so134056455ad.0 for ; Tue, 21 Jul 2026 12:29:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784662170; x=1785266970; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=748lzqKN3J88b3BEuBiWg6WchFFUdy2hlfv06NfZifk=; b=ZZBen4NAc6oARBow/vHmuiQ1kEhttkgQfiS+3/GBzFzXV7ihRdaWwDefeefXgQi6mY w4Wc0E5vzTXRa6GXb0XhUUyVi5Mh6viHSt0Pg8CgOJWKVqM/pVynHKg2r+r55+728ob5 LgGs8acZNmpFu3f2+AMen/glx8gGtwkTTQy3q9RzPexjyyND+vTI8oZNfae8dvMnpWPG O4t8QMSCKePsUKn82t+RZu3jxSr7Ki/A/hYR0gEmK8+CUvzlUtbl3aiPaIm79umPmyOE C592ZQNn/6C+T9pQND/NVGH6C/kPX3UqDBamjTzoCVUEn7JlQ0Z/zzq69KTSNlHeNxAG Ku+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784662170; x=1785266970; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=748lzqKN3J88b3BEuBiWg6WchFFUdy2hlfv06NfZifk=; b=f7rf37FT10do+8kuTCCw3cq17XPJ71eSyPwrzIyQ3pb+vh75O2KqurdixLtWaOGs3l mBusPUUBsocsJKIfxKsV5dTYRT/lkKJwk7AtbK/mvQ9FMPrQ0SmfO4DWSySfPVyidsf4 jl+ywYAXnV3jkNquAei/e/IMb36dQNyM6vxrUUvaOXXa+zIxIDbkX7yAt9aqE3SGtoV8 NZ1X+VrBSgV7qmpz8NUxaOJBk4tPAqKjbjajgMJky1WsXVl/q1mSdsq/iVbEac6QKOlZ EcC1ezZw5FJCyHRiytvF5qWw56kYkyVepT/irdI57beKOWBinWGSqVFUnoOxY29Oi7mg VVCw== X-Forwarded-Encrypted: i=1; AHgh+RrtxbfxlGSFFZpiYH7CFH44jTjyg16E0fH9a9ysiY/MjmPHho8dxx36cBmlAml2IAeK2fQZqq2nEUXifkc=@vger.kernel.org X-Gm-Message-State: AOJu0YxcYaCmzdvTZFBVnnUrk/5vLdojZmFhJwtoPUVDb3Cp0ii1LRPZ unxkS/nSnN38yJ5YvJa0dc+WKShfe8ybccym2IeFkojHB89OVTUJfX11 X-Gm-Gg: AR+sD11JHW59niw3/2t/L4F+k7EdCVdHzh61/FddWXluKjAkYc8YBCBJVfhjhIrS4BZ 2cgtUpWEAVHh0uPi9JZx192JJr4sI8e7V7HrQ3sWCn/A/r+FCG0G+tuLfJI+1AVJ4INlilvBuV2 fJdCd+2X55qJlMpbdujujCg5UtC8dqgjcj2x59HXnupQKe+7LQz8n0OmEirrhr2pdBWp+gdDDi+ sV/FF2MKV4Fwm1zmoDmzPSAqyOwNxFQ1Ibn6+RHQ8bc2uztwW07wjeBdn1Dx+jZe7yvWFIlaDFi ylXYOC2SBGNRUfmxEjwhe+Dnf/TGM65LYIB8rEy/XTTe7wPBNX9i+HRlPxk+nTUqxBcytfvMy/j Wkgs8GSwCcw4E2eY4ITnXtS4hafp+CkOx/cOQK7RcDLE9kI7Ok8xT6rKO+45g7g8NesKJmUJE9r Yrfz/7QvLVLEtTmRadqXxG8gkDYWuu446PCvyZZUyezCcyrT2jEtKCplJ6GOkvQlwUfurQkt1+Q QhjGGEsTLZjEqwLmfhiE5XTRORFR2q11E69uQWYicPFpxYpj1TZ X-Received: by 2002:a17:902:d4cc:b0:2c9:e9db:8167 with SMTP id d9443c01a7336-2cf348193f5mr215886905ad.7.1784662169923; Tue, 21 Jul 2026 12:29:29 -0700 (PDT) Received: from localhost.localdomain ([202.179.95.46]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3147e07000fsm3063164eec.21.2026.07.21.12.29.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 21 Jul 2026 12:29:29 -0700 (PDT) From: Ninad Naik To: lee@kernel.org, pavel@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, simon.guinot@sequanux.org Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, me@brighamcampbell.com, linux-kernel-mentees@lists.linux.dev, skhan@linuxfoundation.org, Ninad Naik Subject: [PATCH v2] dt-bindings: leds: lacie,ns2-leds: Convert to DT schema Date: Wed, 22 Jul 2026 00:57:54 +0530 Message-ID: <20260721192754.46344-1-ninadnaik07@gmail.com> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert lacie,ns2-leds to DT schema. Signed-off-by: Ninad Naik --- Changes in v2:=20 - Change maintainers from the subsystem maintainers to Simon Guinot.=20 - Drop "|" from the description field and update the description.=20 - Remove patternProperties field and instead use additionalProperties. .../bindings/leds/lacie,ns2-leds.yaml | 80 +++++++++++++++++++ .../devicetree/bindings/leds/leds-ns2.txt | 35 -------- 2 files changed, 80 insertions(+), 35 deletions(-) create mode 100644 Documentation/devicetree/bindings/leds/lacie,ns2-leds.y= aml delete mode 100644 Documentation/devicetree/bindings/leds/leds-ns2.txt diff --git a/Documentation/devicetree/bindings/leds/lacie,ns2-leds.yaml b/D= ocumentation/devicetree/bindings/leds/lacie,ns2-leds.yaml new file mode 100644 index 000000000000..1976669d2218 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/lacie,ns2-leds.yaml @@ -0,0 +1,80 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/lacie,ns2-leds.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Dual-GPIO LEDs found on Network Space v2 (and parents) + +maintainers: + - Simon Guinot + +description: + The Network Space v2 dual-GPIO LED is wired to a CPLD. Three different L= ED + modes are available, off, on and SATA activity blinking. The LED modes a= re + controlled through two GPIOs (command and slow), each combination of val= ues + for the command/slow GPIOs corresponds to a LED mode. + +properties: + compatible: + const: lacie,ns2-leds + +additionalProperties: + type: object + $ref: common.yaml# + unevaluatedProperties: false + + description: Each child node represents a single LED + + properties: + cmd-gpio: + maxItems: 1 + description: GPIO connected to the command LED output + + slow-gpio: + maxItems: 1 + description: GPIO connected to the slow LED output + + modes-map: + $ref: /schemas/types.yaml#/definitions/uint32-matrix + description: + A mapping between LED modes (off, on or SATA activity blinking) and + the corresponding cmd-gpio/slow-gpio values. All the GPIO values + combinations should be given in order to avoid having an unknown + mode at driver probe time. + + items: + items: + - description: LED mode + enum: [0, 1, 2] + - description: Command GPIO level + enum: [0, 1] + - description: Slow GPIO level + enum: [0, 1] + + required: + - cmd-gpio + - slow-gpio + - modes-map + +required: + - compatible + +examples: + - | + #include + + led-controller { + compatible =3D "lacie,ns2-leds"; + + led-0 { + label =3D "ns2:blue:sata"; + slow-gpio =3D <&gpio0 29 0>; + cmd-gpio =3D <&gpio0 30 0>; + modes-map =3D ; + }; + }; +... diff --git a/Documentation/devicetree/bindings/leds/leds-ns2.txt b/Document= ation/devicetree/bindings/leds/leds-ns2.txt deleted file mode 100644 index 9f81258a5b6e..000000000000 --- a/Documentation/devicetree/bindings/leds/leds-ns2.txt +++ /dev/null @@ -1,35 +0,0 @@ -Binding for dual-GPIO LED found on Network Space v2 (and parents). - -Required properties: -- compatible: "lacie,ns2-leds". - -Each LED is represented as a sub-node of the ns2-leds device. - -Required sub-node properties: -- cmd-gpio: Command LED GPIO. See OF device-tree GPIO specification. -- slow-gpio: Slow LED GPIO. See OF device-tree GPIO specification. -- modes-map: A mapping between LED modes (off, on or SATA activity blinkin= g) and - the corresponding cmd-gpio/slow-gpio values. All the GPIO values combina= tions - should be given in order to avoid having an unknown mode at driver probe= time. - -Optional sub-node properties: -- label: Name for this LED. If omitted, the label is taken from the node n= ame. -- linux,default-trigger: Trigger assigned to the LED. - -Example: - -#include - -ns2-leds { - compatible =3D "lacie,ns2-leds"; - - blue-sata { - label =3D "ns2:blue:sata"; - slow-gpio =3D <&gpio0 29 0>; - cmd-gpio =3D <&gpio0 30 0>; - modes-map =3D ; - }; -}; --=20 2.55.0