Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4220797rwe; Tue, 30 Aug 2022 06:41:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR6oMOwsL80YdUPCyWROJViXue7TV63GHjT+aL/3WCE8a5ESbJWeNoN/3flHHUpdY4icGMAf X-Received: by 2002:a17:907:72d6:b0:742:133b:42be with SMTP id du22-20020a17090772d600b00742133b42bemr2834757ejc.581.1661866914688; Tue, 30 Aug 2022 06:41:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661866914; cv=none; d=google.com; s=arc-20160816; b=bZhS1TZGes4DwCHpzbfDexBpq22+XdWsAkLwOrdPVmZPvRh/qNJ02S2kI6p8y7/OO7 nvIPAAvUMjpzzBxpC5DVkH3rZaSdW9FN/SxGKm+3ekHNlhG7ac2LNBXC0OJm85W8JYOV 2QF6qaVlCCSfKL+EYEUIJ/xa46/3WPtti7GcMzfvgRap7fVpmGUSCvEYNY1EMwVoPvQf Iqn0RWn6ZrPgR/C50f73W0/pZ68KTNJY9kVqSD7zdbff3oSsKSDfKUWTprXdPF4jUQuJ +2tx7fGGO80ZEW+pEZj1AtEnQOi5X+7FVdr5gx4boRRZAMbnriX73VFck+GbwO6/ScQG x9XQ== 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 :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=eJwvPnyxYM+rkWN/B5T3u9GVEhfio+TrUX3WU5XcQn0=; b=CKOVxR4ruocFyKBrTWy5Oe91MtVnOnSWm22f7WaG5puILWLwrE82kGbqG591x3hy3X XRekQk3jEKPLmXeHKNGZy+2z2OCfFrIwlc6L5vHQWiJXtQA0SaSmWcsNcwHM/88OrCBI ds56R3N2uxMj3zr9JTz+jmmdFMi8/N3oie1fbJzn1O59rTLQTFt+ZDdQZ85TchMTUEHQ Z0kO9KIPoNcxSKkyWQ95haIc5G3O8cakfq6jkvu4mjKQkEvNng1OOPuBqByvl31z9wvF aeDSI4TkXrGSiMLwRvryaCYrutln+Icbawtezm0KzsSWGpj5C1Cg3CIqFdzBWJSWqOtQ YtEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="eJ8Q9S1/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs36-20020a1709072d2400b00730a4424a40si8859252ejc.160.2022.08.30.06.41.29; Tue, 30 Aug 2022 06:41:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="eJ8Q9S1/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229740AbiH3Nht (ORCPT + 99 others); Tue, 30 Aug 2022 09:37:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229777AbiH3Nhp (ORCPT ); Tue, 30 Aug 2022 09:37:45 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C35A6612A for ; Tue, 30 Aug 2022 06:37:44 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id k9so14309914wri.0 for ; Tue, 30 Aug 2022 06:37:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=eJwvPnyxYM+rkWN/B5T3u9GVEhfio+TrUX3WU5XcQn0=; b=eJ8Q9S1/vCT7cijJVAWN8HR5xnr4XG/bT9gfNLUDKdyxQxPABjo+s4Y6pUxKK4Tl4O jPc2/lY4v59LZSUGa9aKxBb01w/WAWEog2r8xqVxzlhi7sYloua5sSMoo8h1Ju3qINN/ 3avwaD6Hws/C4g+njGzPWYxF+RusS9DNMyl9nt2y5ZJnNdOG5bGLLNdGTXWMMHpi5f2E IIjR87c/vXSr0+OPP2cwmM1pzjUy5FHA+vG4pvTZWF9oCnm1SdWfv32yZASc1o+ERboZ XMrCHtZPBtVNx/gkiYGlNPnexb2ABfjXNmkHIEWQAhFq4YntlmA92bdCXkafb7r0LXVd 7Eiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=eJwvPnyxYM+rkWN/B5T3u9GVEhfio+TrUX3WU5XcQn0=; b=PYG/bUuxVD86hxp1AwCPX33hKVvjsNIRDJtBFwzXv3l342UbaFDJA9ODxK0YGXaw26 2NQ7K+7MvvzhAZyyOLIolooaHZHYE2d+xfMF/MopPTR86CYXbqy8bf57dLOcQXHqNI4b haS4rfFOsr+TasMsj+Eg99IswmuXi5U4AmjbJEfdBce93RdUMEoKNqTG0nBVsmAf4ccv uSKMt7Jml4Ihpo2pEd2o3I6ioAcfn0V/9BYe8ofkgKs++Q9E8tll4hrFFd08j9bmXMK/ 2SroJ4HUYDIOKCpbGV2x23mDw4LTMC3OorwdqV5EqexlRrOENfT3jF6MQH5mh6nBaqeq QfFg== X-Gm-Message-State: ACgBeo1tK+o+M+unyK3Kf9UKXNk3lpYTjQPM20G6k8LufahCKzvG458O //RCAkewBNf+MofYOn0Ci0OGaw== X-Received: by 2002:adf:dec9:0:b0:226:e033:c048 with SMTP id i9-20020adfdec9000000b00226e033c048mr3225813wrn.577.1661866663228; Tue, 30 Aug 2022 06:37:43 -0700 (PDT) Received: from [192.168.86.238] (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.googlemail.com with ESMTPSA id n8-20020a5d4848000000b00226d01a4635sm9658965wrs.35.2022.08.30.06.37.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Aug 2022 06:37:42 -0700 (PDT) Message-ID: <791ea3b6-c326-9e71-e23b-93206e305c85@linaro.org> Date: Tue, 30 Aug 2022 14:37:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v1 00/14] nvmem: core: introduce NVMEM layouts Content-Language: en-US To: Michael Walle , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Cc: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Li Yang , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Frank Rowand , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, Ahmad Fatoum References: <20220825214423.903672-1-michael@walle.cc> <768ff63a-54f5-9cde-e888-206cdf018df3@milecki.pl> <267821eee5dcab79fd0ecebe0d9f8b0c@walle.cc> From: Srinivas Kandagatla In-Reply-To: <267821eee5dcab79fd0ecebe0d9f8b0c@walle.cc> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Thanks Michael for the work. On 29/08/2022 09:22, Michael Walle wrote: > >> One thing I believe you need to handle is replacing "cell_post_process" >> callback with your layout thing. >> >> I find it confusing to have >> 1. cell_post_process() CB at NVMEM device level >> 2. post_process() CB at NVMEM cell level > > What is wrong with having a callback at both levels? we should converge this tbh, its more than one code paths to deal with similar usecases. I have put down some thoughts in "[PATCH v1 06/14] nvmem: core: introduce NVMEM layouts" and "[PATCH v1 07/14] nvmem: core: add per-cell post processing" review. --srini > > Granted, in this particular case (it is just used at one place), I still > think that it is the wrong approach to add this transformation in the > driver (in this particular case). The driver is supposed to give you > access to the SoC's fuse box, but it will magically change the content > of a cell if the nvmem consumer named this cell "mac-address" (which > you also found confusing the last time and I do too!). > > The driver itself doesn't add any cells on its own, so I cannot register > a .post_process hook there. Therefore, you'd need that post_process hook > on every cell, which is equivalent to have a post_process hook at > device level. > > Unless you have a better idea. I'll leave that up to NXP to fix that (or > leave it like that). > > -michael