Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp224845iob; Mon, 2 May 2022 17:45:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIGiCB2wb25fFOH4cQR7k3OB8U1bVIABneu/ZBYwPJ72Uf9qwnUVtR5NO1UWjO/ggmjrse X-Received: by 2002:a17:90a:d081:b0:1d2:89b0:83a8 with SMTP id k1-20020a17090ad08100b001d289b083a8mr1969008pju.143.1651538718402; Mon, 02 May 2022 17:45:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651538718; cv=none; d=google.com; s=arc-20160816; b=QUXq6BDDv5NYSJRaWyh94MF4bsSLnxV9IJfw95c8KgdNpJIxwW77soORCpzHDgj22g sFiPvbZh5oGZSyqXXJXiO8zVVG6EbIAPDg7fm5rr4An84pbfXFHwCF25N29ultVnRAc2 MLUh8ftCHILBprnPqSExNzpxTtGsy8JGNt1dCYlLMkOoEpuY/jDTohw0lEtOnxB6rMEp utzPw6zO4isxyntJc6X5SMvRTeqCFGunT5/in/T2tZreA88tjZCO6fWQGB4HNKE4POrP iFq+Kv10LYHh7hWUbGlysiI6/+TEMMq3Vn1Rl18k+4exKZ9N+t3TSQZZhsx9OdmUQwUo Gp3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mI7n1NLRE2SJ0nGq1GuXHkLC+FfGx13T6nrAvtwR/WM=; b=VvjOL7ILZerZ8+qMWKzCH+phQn9W8jnVxqnYD3GkdB5M8X0jMd8tyY9P9SR75Y4yGp sDPzdP+DGVXUvG6g3Jb6JK2Ni6GOKWXunOFkjEQ1nAKhdl0PyaAGo7wjOBvv2K7NWjw/ gvfYIUYthMRTMdhGsxKd2j3eyAccrej5MyUJ4FxtuzU9tCc/ff7krTc0VOh4HAlgsBqG iANNfV0gRn/XbXo7umvIUf9mpMZMymqjpTGsi5bzdR1VYcN66/OYbjdesMhNvf/PxWHB btRyuk6HUCPKwAiNldLHyhlj0HIHJjGnSFKDEhqNf4XMOLTE9BuLhXjX8ZDcYncdK6QB qARg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PriGK0hS; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id o13-20020a170903300d00b00153b2d16646si12638796pla.590.2022.05.02.17.45.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:45:18 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PriGK0hS; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 781923E0CB; Mon, 2 May 2022 17:34:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379121AbiD2QbV (ORCPT + 99 others); Fri, 29 Apr 2022 12:31:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379091AbiD2QbO (ORCPT ); Fri, 29 Apr 2022 12:31:14 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99448D8933 for ; Fri, 29 Apr 2022 09:27:55 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id e24so11442200wrc.9 for ; Fri, 29 Apr 2022 09:27:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mI7n1NLRE2SJ0nGq1GuXHkLC+FfGx13T6nrAvtwR/WM=; b=PriGK0hSLnTS2cEJ+8PWs2vh9pUtjydmRrC3DSfgUHwogh0l2BHrOQYPMmQ9NnT00m JWsLo/RVbQV8IqxodaIw3hgYW5ZWti1Iyqa/i2k+38+s1hIpfv4dHTWCgwwY++uHARYr wbnoZIA3qYMz3YKu+3AAn7edSudw0xSwPsI3oBtMOQ/hiOzXZKORETz6HS7jqeX5AL8h IrDJULRDRD3TvPypBfwUkFvk6flChvXpixC3Q+uPKp11/ELD2pHEMKDgdzuhwugb8Eht qBPkK8ygajUnpMQa5Ia5mWMLsswnjWSEbGQtvOirttoKjsOcKZTTCQt35E12Ymfos9ds w89g== 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=mI7n1NLRE2SJ0nGq1GuXHkLC+FfGx13T6nrAvtwR/WM=; b=sMbq9iF7L9Uokj3/XleizFwHNAtA0rk93aYaW9/ebDLEdwYVrJxDVcok6ACvNEUAdU rAJQxAcrI1N1Qb7+7W/cShREBKrIqRel2th5fq3OpUOi5RYLutqVhAtd66HKXhNwpsIH iw9vc9GV9Z0eGkFRDfVJLSfX8WNJytw8C8lI5F75/LQekqIwmNQE13OGl1z9KBabVrJH jMNCCs3x7YJ9YJOPzTzZ/F8XFDrF3WeIDsqO0BhurnhzyfHTvzsokHGtJr3+w/vG9ugy EToJLcuPTZ1ZLPLHaLNWGsdwig/PQfa8nn8FK/HMSN54EC57hysQ5mjTPHRg3JS5OL0V Tkxw== X-Gm-Message-State: AOAM5325JkqolWgPMjM4dgBlA1qqKodg2rUl7vcvn0OOl/SscW3DSkoY YxI5pVrLMReJqx+Uviex5lhk/w== X-Received: by 2002:adf:ef01:0:b0:20a:8068:ca5e with SMTP id e1-20020adfef01000000b0020a8068ca5emr30867930wro.661.1651249674218; Fri, 29 Apr 2022 09:27:54 -0700 (PDT) Received: from srini-hackbox.lan (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.gmail.com with ESMTPSA id b5-20020adff905000000b0020a8781be70sm2781801wrr.12.2022.04.29.09.27.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 09:27:53 -0700 (PDT) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Srinivas Kandagatla Subject: [PATCH 02/16] nvmem: brcm_nvram: find Device Tree nodes for NVMEM cells Date: Fri, 29 Apr 2022 17:26:47 +0100 Message-Id: <20220429162701.2222-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20220429162701.2222-1-srinivas.kandagatla@linaro.org> References: <20220429162701.2222-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafał Miłecki DT binding for Broadcom's NVRAM supports specifying NVMEM cells as NVMEM device (provider) subnodes. Look for such subnodes when collecing NVMEM cells. This allows NVMEM consumers to use NVRAM variables. Signed-off-by: Rafał Miłecki Signed-off-by: Srinivas Kandagatla --- drivers/nvmem/brcm_nvram.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/nvmem/brcm_nvram.c b/drivers/nvmem/brcm_nvram.c index 439f00b9eef6..450b927691c3 100644 --- a/drivers/nvmem/brcm_nvram.c +++ b/drivers/nvmem/brcm_nvram.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -72,6 +73,7 @@ static int brcm_nvram_add_cells(struct brcm_nvram *priv, uint8_t *data, return -ENOMEM; priv->cells[idx].offset = value - (char *)data; priv->cells[idx].bytes = strlen(value); + priv->cells[idx].np = of_get_child_by_name(dev->of_node, priv->cells[idx].name); } return 0; -- 2.21.0