Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2463587rdb; Wed, 4 Oct 2023 01:46:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGhfi0PXJqK6oXBUyyPArfMDuX78lVSuIw7ox1ryCW7CTE5jFKMDM6gWkMG+iNHdjDDeu2Y X-Received: by 2002:a05:6358:7e8b:b0:133:7c4:e752 with SMTP id o11-20020a0563587e8b00b0013307c4e752mr1537561rwn.26.1696409203477; Wed, 04 Oct 2023 01:46:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696409203; cv=none; d=google.com; s=arc-20160816; b=H0CPxeImgnR+goq6Lcg5cqxiALKPM3pJHfm7y/fPoIQq5TN4xmDfx1IiaO3sDnsjSF a6bZdUBah2IcIvU1FrOogVlT7EOTeOxkFosQc5XJMfQ8/G3rt0/OlTNJSaF1Twlxtn2v wLwyEfCvvv/AQ+snhpoXl722DuiBxl3R93Gb+4JuLgx9MIFOiczJiojOsYMo3wC3zcXW tPohc0aPS6LnPTMWSG04o65mrgK3IuKItJBZa3ysZIQZ1Q+EGhsaanYwExhyCLit4k5L NSiWQdnt4tC1vhpz3/P3gR5wLUvq/UsjEis24bGFvO3wMOFA3quyi2f9V8dXU5sONQog eJ1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=iwt6yecZwQb9RsRqs87uClcaB8jIHdaxjvckvEuQJXo=; fh=M4zjPuU5EUvCknCG34elBlGRDDgPMfe++B0TFoy99LE=; b=rw2y0b2Hf2fpLUXSiTqEvfx/HYLoimYiv/fDOwgOZO4qLuQC1qiKu1MPnBJImY075B Makjx+zZSt88RonD3XGWSk+HNdGFlFG7ZngXONUHmIX+FuOB52Vi2kOxe3LrJ50AZiog 4CLQj6bURdz+IpnBVe/OHl0uRL2HXJewC7OaQZkZwWq0tN+WfZbpwC6h5tIm7Awkxk8D SGaB1s2rd3E0yF12GkKsCQmCsTgFF/n8SoSHNQeLj0PCk2gIvfM3DEanwXllClhRNgeX 37F24NBHmCYauDFpWGnWyCefTobmQ2Y395CbWFuttAcQuTxhnWy5ol0b3VC84zFDF0p0 wmjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=nRJ0qxoX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id bb9-20020a17090b008900b00274afd5346esi1046062pjb.151.2023.10.04.01.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 01:46:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=nRJ0qxoX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 06E1E81A4FF1; Wed, 4 Oct 2023 01:46:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241844AbjJDIqN (ORCPT + 99 others); Wed, 4 Oct 2023 04:46:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241822AbjJDIqI (ORCPT ); Wed, 4 Oct 2023 04:46:08 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6CA4B4 for ; Wed, 4 Oct 2023 01:46:01 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-533f193fc8dso3197952a12.2 for ; Wed, 04 Oct 2023 01:46:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696409160; x=1697013960; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=iwt6yecZwQb9RsRqs87uClcaB8jIHdaxjvckvEuQJXo=; b=nRJ0qxoXTurn8d4tvmMIZ13t25YOpBr5ruGzC82VzC8y3r7tknX3W7w/s6JiTvewyI //1uAKErgNb0fntnAmAVnzOLwo9BFRct7ff5nT7XEj9DH4hH9tLbdCBQXiynJMDpNw/m zgy0AlgpZP7vQGkCfcQRAwYvYaCLdsw6dlVskBqAbJLM3LstqZvKKWSaznIWyb+orW+F mStgP/XUAsKpa2lW7g1omToKqXlwz3QchhD/EUTUktLb2eH8XYWvfhvtEMqlISlt0V/k NdCQtykKAxIiirniLGWqsB+Yv8hs/sFQ1ocBY2IUiWcdSupPsguHwOshzNSDVinLR2m4 S+Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696409160; x=1697013960; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iwt6yecZwQb9RsRqs87uClcaB8jIHdaxjvckvEuQJXo=; b=gf0vf7VU0khkvQJ9wjt0qIXWJSb71hXg90OFF5GTmdrw5UtvU0m0Crez2pzF+kNRzn yY7ffHK20tLbXAjTh6TTZesqyOdG25olgn+mzUlbENh8c8G2VzYQkMkr5XZEJAdYYrOz ax7OKCMuX+appP6JJK6RnmiQiMLlLZuXyD4Dt6403bvjVqXY9PEqkI+mwa8ll3COAYuY La0SdaGeWmJsa7acJy/XSkE5jd1w5oFUREDB33rBMGFjKTZWAjmIrw8z6d4IJCPkeq4d xYEgdoAnjogl1li22N7TRsThnGywqooXRYHyxfpS4SBrjzEV4qxaKrZoO22VmMInrYLi rbng== X-Gm-Message-State: AOJu0Yw/kxBzAB2KRgAEbgbOIpikX5f7UGBq7AYaM8kubyvAOE9UJHYJ bJLwzJpsQzPWyeumDX+7CC0= X-Received: by 2002:aa7:db46:0:b0:532:ac24:3081 with SMTP id n6-20020aa7db46000000b00532ac243081mr1398036edt.30.1696409160139; Wed, 04 Oct 2023 01:46:00 -0700 (PDT) Received: from [192.168.26.149] (031011218106.poznan.vectranet.pl. [31.11.218.106]) by smtp.googlemail.com with ESMTPSA id i18-20020aa7dd12000000b0052889d090bfsm2082065edv.79.2023.10.04.01.45.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Oct 2023 01:45:59 -0700 (PDT) Message-ID: <691f908e-37ed-4f3a-8c7f-e9615819d3db@gmail.com> Date: Wed, 4 Oct 2023 10:45:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Revert "nvmem: add new config option" To: Srinivas Kandagatla Cc: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Bartosz Golaszewski , Alban Bedel , Christian Marangi , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= References: <20230718084804.20139-1-zajec5@gmail.com> Content-Language: en-US From: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 04 Oct 2023 01:46:41 -0700 (PDT) Srini, On 26.08.2023 22:15, Rafał Miłecki wrote: > On 18.07.2023 10:48, Rafał Miłecki wrote: >> From: Rafał Miłecki >> >> This reverts commit 517f14d9cf3533d5ab4fded195ab6f80a92e378f. >> >> It seems that "no_of_node" config option was added to help mtd's case. >> >> DT nodes of MTD partitions (that are also NVMEM devices) may contain >> subnodes that SHOULD NOT be treated as NVMEM fixed cells. To prevent >> NVMEM core code from parsing them "no_of_node" was set to true and that >> made for_each_child_of_node() in NVMEM a no-op. >> >> With the introduction of "add_legacy_fixed_of_cells" config option >> things got more explicit. MTD subsystem simply tells NVMEM when to look >> for fixed cells and there is no need to hack "of_node" pointer anymore. >> >> Signed-off-by: Rafał Miłecki >> --- >> Important: this is based on top of the >> [PATCH V4] nvmem: add explicit config option to read old syntax fixed OF cells > > I see you skipped those two patches for 6.6. > > Can you queue them for 6.7, please? Did you have a chance to look at this one? >> --- >>   drivers/mtd/mtdcore.c          | 1 - >>   drivers/nvmem/core.c           | 2 +- >>   include/linux/nvmem-provider.h | 2 -- >>   3 files changed, 1 insertion(+), 4 deletions(-) >> >> diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c >> index 9db8d7853639..3d781ffb8c32 100644 >> --- a/drivers/mtd/mtdcore.c >> +++ b/drivers/mtd/mtdcore.c >> @@ -554,7 +554,6 @@ static int mtd_nvmem_add(struct mtd_info *mtd) >>       config.read_only = true; >>       config.root_only = true; >>       config.ignore_wp = true; >> -    config.no_of_node = !of_device_is_compatible(node, "nvmem-cells"); >>       config.priv = mtd; >>       mtd->nvmem = nvmem_register(&config); >> diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c >> index 58d8919e6682..a0c9153cda28 100644 >> --- a/drivers/nvmem/core.c >> +++ b/drivers/nvmem/core.c >> @@ -1027,7 +1027,7 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config) >>       nvmem->nkeepout = config->nkeepout; >>       if (config->of_node) >>           nvmem->dev.of_node = config->of_node; >> -    else if (!config->no_of_node) >> +    else >>           nvmem->dev.of_node = config->dev->of_node; >>       switch (config->id) { >> diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h >> index 1b81adebdb8b..e3930835235b 100644 >> --- a/include/linux/nvmem-provider.h >> +++ b/include/linux/nvmem-provider.h >> @@ -89,7 +89,6 @@ struct nvmem_cell_info { >>    * @read_only:    Device is read-only. >>    * @root_only:    Device is accessibly to root only. >>    * @of_node:    If given, this will be used instead of the parent's of_node. >> - * @no_of_node:    Device should not use the parent's of_node even if it's !NULL. >>    * @reg_read:    Callback to read data. >>    * @reg_write:    Callback to write data. >>    * @size:    Device size. >> @@ -122,7 +121,6 @@ struct nvmem_config { >>       bool            ignore_wp; >>       struct nvmem_layout    *layout; >>       struct device_node    *of_node; >> -    bool            no_of_node; >>       nvmem_reg_read_t    reg_read; >>       nvmem_reg_write_t    reg_write; >>       int    size; >