From patchwork Tue Jan 25 18:01:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12724127 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A661AC433F5 for ; Tue, 25 Jan 2022 18:03:29 +0000 (UTC) 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=qXNMTKPkbomAa49d6DkqZTKIFlW3TfdoBz1O9Fsvnyk=; b=Ou2KY02nJCdr2b wpJ3HczRMPyrdOYfUStTopnSSMSMBHkOhnWsxnyArTXf6UXH6f/T2wYMLihvqLW0EPoVK9EXhzHJh jIzAujMotd+AidpseMietC3yjvfQ4fPdIt/GE+MGobsKGr/0oHIP1ZfOqiI9p5fcywWHzGgRHa2cY gzUS3fx4ude7Wk270hajvAEZsj965Gw44z24vy9V2Bz4z6jv0dw7No8vEoe9//nrrTG6V7ALXG3TJ eBQ+am3tPRMzq3XdJQp69RmEuewOB1OWJHmNW6NNTFZVz6EGAmaziTnJea2iqxUqVLaL/EsPjSuet m8PxXC1f+elgbZybF9XQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCQ8p-0098i7-L1; Tue, 25 Jan 2022 18:02:03 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCQ8C-0098ZU-2L; Tue, 25 Jan 2022 18:01:25 +0000 Received: by mail-lf1-x12e.google.com with SMTP id z19so21627288lfq.13; Tue, 25 Jan 2022 10:01:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XBYYHHcrj5iWKbV8iDsJjMg/wgtciWUkHYCjJmxtXi8=; b=YkDBRgLMrF9XmbvguP6Y67CU9AL6lAUs1LjxUejM3fh1klFFdQ4llHjpsv3eZoeYCl f2haVwMHPJcD5Tq0jvJgg8Z4OFcwPba1zlEgDEPe3Xe4L5KilTwWXTgjMJ5iykCmNxhz ZPzGnDFtsNMQ5GPzlsyeZUjOg3lnXXuIfXgXrwBemVyRt2zbT4MBUQzPMSdRn4htoGmg bUcSyI+rtGmoXo7E3JUE7+8coQEUHQB5oQpnl1zuCgC3EIPiMJgoDSmJLomtGwKPTAiv c9s3o37yEN7k5M35blvDgbVMtyEH7gSuIUU6QtTkZFu6Ih4Scs6iArWGeU1HmATokRYV TSSg== 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=XBYYHHcrj5iWKbV8iDsJjMg/wgtciWUkHYCjJmxtXi8=; b=IB02pc/tpsGG18wpnLVV+uDI52ax4NvrRbsqqGbEPZlKDg4RrNOK0cruI27j+uXmfF ohu8JjMUVh8I9gYw83j3Q+jMDWOsXP8YaB9Q9M3bMOTUGLuCZJYttpsdI7gSFu3MogRs BdLdYl9rauqpJTjbDTAng/e4kA6IjIAW8EAioXjSBrRKOJzq2jeawdhRupfBhDdT35i3 OSe08ZI4q0azsqTNyMEQYLvqAQH7VHTmEPhfKzELvSJV7ad6Mh3T2Bjv325oTP5I3YQ3 lV0dynIbSHZmgaNuR6Iq8fMjq10U1H8MMrB+9eEcCRDhs4AJy/pCi0FKkGHOqB3v6tOd xyNA== X-Gm-Message-State: AOAM533H5qbuBqgN1JnGEHEysyd1JRb9kGmrcnU6DBvmovdmVfYvgxqO 1CfvEoAQ3Hz7HbngQfvrzuk= X-Google-Smtp-Source: ABdhPJxEvKovHTQ3+tJlg+4T9j7URvdFNBsGv3zx6ejSUbnCIMZnkAFxMSkZrL3+wPSy2sYnU3HtSg== X-Received: by 2002:a05:6512:3f84:: with SMTP id x4mr17279303lfa.486.1643133681974; Tue, 25 Jan 2022 10:01:21 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id z24sm1149121lfb.206.2022.01.25.10.01.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 10:01:21 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Rob Herring , Srinivas Kandagatla , Michael Walle Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Shawn Guo , Li Yang , Frank Rowand , "David S . Miller" , Jakub Kicinski , Ansuel Smith , Andrew Lunn , Florian Fainelli , Hauke Mehrtens , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH 1/2] dt-bindings: nvmem: extract NVMEM cell to separated file Date: Tue, 25 Jan 2022 19:01:13 +0100 Message-Id: <20220125180114.12286-2-zajec5@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220125180114.12286-1-zajec5@gmail.com> References: <20220125180114.12286-1-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220125_100124_140342_51B043A7 X-CRM114-Status: GOOD ( 15.29 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Rafał Miłecki This will allow adding binding for more specific cells and reusing (sharing) common code. Signed-off-by: Rafał Miłecki --- .../devicetree/bindings/nvmem/cells/cell.yaml | 35 +++++++++++++++++++ .../devicetree/bindings/nvmem/nvmem.yaml | 25 ++----------- 2 files changed, 37 insertions(+), 23 deletions(-) create mode 100644 Documentation/devicetree/bindings/nvmem/cells/cell.yaml diff --git a/Documentation/devicetree/bindings/nvmem/cells/cell.yaml b/Documentation/devicetree/bindings/nvmem/cells/cell.yaml new file mode 100644 index 000000000000..5d62d0c8f1e1 --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/cells/cell.yaml @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/nvmem/cells/cell.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVMEM cell + +maintainers: + - Srinivas Kandagatla + +description: NVMEM cell is a data entry of NVMEM device. + +properties: + reg: + maxItems: 1 + description: + Offset and size in bytes within the storage device. + + bits: + maxItems: 1 + items: + items: + - minimum: 0 + maximum: 7 + description: + Offset in bit within the address range specified by reg. + - minimum: 1 + description: + Size in bit within the address range specified by reg. + +required: + - reg + +additionalProperties: true diff --git a/Documentation/devicetree/bindings/nvmem/nvmem.yaml b/Documentation/devicetree/bindings/nvmem/nvmem.yaml index 456fb808100a..6b075c1db446 100644 --- a/Documentation/devicetree/bindings/nvmem/nvmem.yaml +++ b/Documentation/devicetree/bindings/nvmem/nvmem.yaml @@ -40,29 +40,8 @@ properties: maxItems: 1 patternProperties: - "@[0-9a-f]+(,[0-7])?$": - type: object - - properties: - reg: - maxItems: 1 - description: - Offset and size in bytes within the storage device. - - bits: - maxItems: 1 - items: - items: - - minimum: 0 - maximum: 7 - description: - Offset in bit within the address range specified by reg. - - minimum: 1 - description: - Size in bit within the address range specified by reg. - - required: - - reg + "@[0-9a-f]+$": + $ref: cells/cell.yaml# additionalProperties: true