Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2322235rwe; Sun, 28 Aug 2022 08:33:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR5r/22ZyRD/st7Hc7BVhb2/bxgGzKfEquoErXSDWeTfwjxGJPQ2vHfcTEju/k8E/P1gVylR X-Received: by 2002:a05:6402:84e:b0:440:4bac:be5a with SMTP id b14-20020a056402084e00b004404bacbe5amr13972909edz.103.1661700785238; Sun, 28 Aug 2022 08:33:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661700785; cv=none; d=google.com; s=arc-20160816; b=j+CGOszYf3lZDiByv3OfZ4Grp477uZ9jEoqq729j59K98ADnCyn+mdut55ae8dBmzi xCB3Mg9cnclDUKoTFJY3pQFRqUGokZ3PpKzAJjZ3jkrdmU+RzVMTPpVyALUFWp2u07QN iHk67ZAcIZGCXJ9PCWnX8mT6put9e3o7redQWLz5cESO5znOEMmmmNXj4gjoQVLUz5gW GB77xY+Zo5GFBLbXILTPV1jU9TooWxGdaZFlMqVjwQTTJFhSUl9kgfzzSYsYlV+pp1/p viXYz6rN5cbfxPy8jfbIpVvPoGW+FqlklaUxpSBFzOwFtzRIhDtQoy3Xj+PqFmtqR2Ui 6VNg== 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:subject:user-agent:mime-version:date:message-id; bh=6u1G1+JtTLY4YGIgdzZn2Xw7qBwjbRtX98CugFMhnSg=; b=WwCeJqZOh1ojcPg/iiN37CGrKlLgx/BTwXRrBfIKnlZPrZVQan29tVxIDNQpB+2rpp GDxYCHIX5QlNeszoVjAEInr17YbVbJCwVwhLTBKZAODC5iAsrMub6FW1ZPs/wgz4sZKB BseMNBkD+QQAOTHTyVLzsssvgElMccM/0DMvc27A+f3+3PYmREj2fPsOHsbBEmDEJ9WN zFeWQEbuXJVWhKeJ7IIEE/i7Wu/zJVXDKVi1h5upa4RGyQaYB8TgmxxWms1JS8ROMveW ACP/liwbv4IqcmZ+UxwFWXvcTmXqQVDqbZ8ua8u6yyJkxXjedmHO8G5EJHeK80h+jium lx3Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sh6-20020a1709076e8600b0073da40f26c2si5285957ejc.835.2022.08.28.08.32.17; Sun, 28 Aug 2022 08:33:05 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229910AbiH1PY0 (ORCPT + 99 others); Sun, 28 Aug 2022 11:24:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbiH1PYX (ORCPT ); Sun, 28 Aug 2022 11:24:23 -0400 X-Greylist: delayed 4200 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 28 Aug 2022 08:24:22 PDT Received: from 4.mo550.mail-out.ovh.net (4.mo550.mail-out.ovh.net [46.105.76.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3BA030575 for ; Sun, 28 Aug 2022 08:24:22 -0700 (PDT) Received: from player157.ha.ovh.net (unknown [10.111.172.22]) by mo550.mail-out.ovh.net (Postfix) with ESMTP id 4E24B2277E for ; Sun, 28 Aug 2022 14:05:11 +0000 (UTC) Received: from milecki.pl (ip-194-187-74-233.konfederacka.maverick.com.pl [194.187.74.233]) (Authenticated sender: rafal@milecki.pl) by player157.ha.ovh.net (Postfix) with ESMTPSA id 61D582DF32C4F; Sun, 28 Aug 2022 14:04:50 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-101G00488ca032a-118b-4694-88e1-9351a19d5173, E8B3FA25B4F8D98D1FC0498694F8FFDB0E70245B) smtp.auth=rafal@milecki.pl X-OVh-ClientIp: 194.187.74.233 Message-ID: Date: Sun, 28 Aug 2022 16:04:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Thunderbird/96.0 Subject: Re: [RFC PATCH v1 12/14] nvmem: layouts: rewrite the u-boot-env driver as a NVMEM layout To: Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Srinivas Kandagatla , Shawn Guo , Li Yang , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Frank Rowand 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, Ahmad Fatoum References: <20220825214423.903672-1-michael@walle.cc> <20220825214423.903672-13-michael@walle.cc> From: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= In-Reply-To: <20220825214423.903672-13-michael@walle.cc> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Ovh-Tracer-Id: 8509270023987571643 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrvdejledgjeehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeftrghfrghlucfoihhlvggtkhhiuceorhgrfhgrlhesmhhilhgvtghkihdrphhlqeenucggtffrrghtthgvrhhnpedtgeetheeutddvudekuddtkeetveehteegleehffetkeehjeetfffgveegkeefueenucfkpheptddrtddrtddrtddpudelgedrudekjedrjeegrddvfeefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopehplhgrhigvrhduheejrdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheprhgrfhgrlhesmhhilhgvtghkihdrphhlpdhnsggprhgtphhtthhopedupdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdfovfetjfhoshhtpehmohehhedt X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On 25.08.2022 23:44, Michael Walle wrote: > Instead of hardcoding the underlying access method mtd_read() and > duplicating all the error handling, rewrite the driver as a nvmem > layout which just uses nvmem_device_read() and thus works with any > NVMEM device. > > But because this is now not a device anymore, the compatible string > will have to be changed so the device will still be probed: > compatible = "u-boot,env"; > to > compatible = "u-boot,env", "nvmem-cells"; > > "nvmem-cells" will tell the mtd layer to register a nvmem_device(). > "u-boot,env" will tell the NVMEM that it should apply the u-boot > environment layout to the NVMEM device. That's fishy but maybe we can ignore backward compatibility at point. Still you need to update DT binding.