From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A93ADC433F5 for ; Mon, 13 Sep 2021 19:31:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 809FE610D1 for ; Mon, 13 Sep 2021 19:31:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 809FE610D1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ErAyNGUUi7sRuKKl96NcsNQMbkfC+3abZNfpM/Ck1+c=; b=CN3i0S/ZeMxcNT EKWZ5hNFaAV8RJL+YJh6zerV1HVDMZExpWyN+c75woYHJ7uIlvLHGsGPsQ5NEFum+dSaln0YwwgEm 1yQoyu6isCzatmv6iQMYQP3m8KtjGRzNeoBcFoQ1sP7aFpXN/6tU9wCHYNHr6HBAhJkYfnMavmr75 740xOKALsUlKU1kMC3EpwlMr6HRB7ahSF/y3vmfyiEC9qZSYSacR0sgbLa0LJXeYhikjS7QKnRRba VLAZYhoBJkFZaVQF1r566wfO3hj1rmoxGqDWEjTFnX4jIwzHsej1zIaplsj7q1P7YqRmxjs11mjPX 79zE+T0y8VGtfxVaEpGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mPrdH-0034zG-Ri; Mon, 13 Sep 2021 19:28:48 +0000 Received: from mail-ot1-f41.google.com ([209.85.210.41]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mPrcs-0034qu-JK for linux-arm-kernel@lists.infradead.org; Mon, 13 Sep 2021 19:28:24 +0000 Received: by mail-ot1-f41.google.com with SMTP id c42-20020a05683034aa00b0051f4b99c40cso14920088otu.0 for ; Mon, 13 Sep 2021 12:28:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HsJ9yRBqsMmIwK48AF1ryBbOjSrUMVMLDh6+UU2RkmE=; b=PP9i2x/g8FlPaziFJw72eGH0fo2DyO2D8BAFfe5b9Nb9bWjITRTk/8Js7VUJEcgqp6 O6k09zEyEb+IBlBVKYwEB341nprvaCg4/BMhedtw0ay3hCSgyZdwd+79/FuRy3nR7tTh Z2MSe/h3GzAc/U28x5e+J0aoG+u6Q223YjeY7jU1UYGPIAsMw/R39Y06yd4d5UPbwjQv v/IZmO5IgUIS7JD/hupSwvsWiubdP0RFVDaLgQDN4SJ4QJ7SmKLsf0oH8vAhMNvPzHz9 C7lwi4GpqaS2qPbXa2t1mMwhfatjQF+OzM+1PvIzyqC7cVvREew/pADot2H3OBp1N4RE kBZQ== X-Gm-Message-State: AOAM5311HF/Kv+Z74y1ERbfySUQfbO0cn1bRBiGB0w7CbYvaZYGOHE1R H9DGs+wQ4lpcMIy/8MigT8iVnpx35g== X-Google-Smtp-Source: ABdhPJz7zU8VVcPu6j2PnVgAT1gMjODXQvA4mY65E4UmaEnvk9iopp324LfGSG341JgI7l0/WtBXhQ== X-Received: by 2002:a05:6830:4003:: with SMTP id h3mr11364149ots.56.1631561301733; Mon, 13 Sep 2021 12:28:21 -0700 (PDT) Received: from xps15.herring.priv (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.googlemail.com with ESMTPSA id m24sm1907838oie.50.2021.09.13.12.28.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Sep 2021 12:28:21 -0700 (PDT) From: Rob Herring To: Linus Walleij , Stephen Boyd , Pavel Machek Cc: Liviu Dudau , Sudeep Holla , Lorenzo Pieralisi , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org Subject: [PATCH v2 2/8] dt-bindings: leds: register-bit-led: Use 'reg' instead of 'offset' Date: Mon, 13 Sep 2021 14:28:10 -0500 Message-Id: <20210913192816.1225025-3-robh@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210913192816.1225025-1-robh@kernel.org> References: <20210913192816.1225025-1-robh@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210913_122822_718516_E173208C X-CRM114-Status: GOOD ( 14.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 'reg' is the standard property for defining register banks/addresses. Add it to use for the register address and deprecate 'offset'. This also allows for using standard node names with unit-addresses. However, since it is quite possible to have multiple nodes at the same register address, allow for the unit-address to optionally have the bit offset. The unit-address format is '@[,]'. This matches the format recently added for nvmem binding which has the same issue. Cc: Pavel Machek Cc: Linus Walleij Cc: linux-leds@vger.kernel.org Signed-off-by: Rob Herring --- .../bindings/leds/register-bit-led.yaml | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/leds/register-bit-led.yaml b/Documentation/devicetree/bindings/leds/register-bit-led.yaml index 77ba0b824c15..79b8fc0f9d23 100644 --- a/Documentation/devicetree/bindings/leds/register-bit-led.yaml +++ b/Documentation/devicetree/bindings/leds/register-bit-led.yaml @@ -20,9 +20,19 @@ allOf: - $ref: /schemas/leds/common.yaml# properties: + $nodename: + description: + The unit-address is in the form of @, + pattern: '^led@[0-9a-f]+,[0-9a-f]{1,2}$' + compatible: const: register-bit-led + reg: + description: + The register address and size + maxItems: 1 + mask: description: bit mask for the bit controlling this LED in the register @@ -37,11 +47,12 @@ properties: description: register offset to the register controlling this LED $ref: /schemas/types.yaml#/definitions/uint32 + deprecated: true required: - compatible - mask - - offset + - reg unevaluatedProperties: false @@ -51,24 +62,30 @@ examples: syscon@10000000 { compatible = "arm,realview-pb1176-syscon", "syscon"; reg = <0x10000000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x10000000 0x1000>; - led@8.0 { + led@8,0 { compatible = "register-bit-led"; + reg = <0x08 0x04>; offset = <0x08>; mask = <0x01>; label = "versatile:0"; linux,default-trigger = "heartbeat"; default-state = "on"; }; - led@8.1 { + led@8,1 { compatible = "register-bit-led"; + reg = <0x08 0x04>; offset = <0x08>; mask = <0x02>; label = "versatile:1"; default-state = "off"; }; - led@8.2 { + led@8,2 { compatible = "register-bit-led"; + reg = <0x08 0x04>; offset = <0x08>; mask = <0x04>; label = "versatile:2"; -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel