Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1084187rdb; Fri, 1 Dec 2023 06:45:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpl9nGrRfYLZGTW89AZRQxczmu9fWGfWsPvxs3sbTpKWjsaQH3HIf7Kz5i3sWMNRMpZDC2 X-Received: by 2002:a05:6a20:7d91:b0:18c:ae67:c1e8 with SMTP id v17-20020a056a207d9100b0018cae67c1e8mr18417860pzj.24.1701441906327; Fri, 01 Dec 2023 06:45:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701441906; cv=none; d=google.com; s=arc-20160816; b=Otd+snxJsmK8DK3Wb1gSjDmIiEgeRAWzSbuflCC41J9iX1cnfu1RZJAU9nqK+UkMSH PrCEvcwnaWOE7PIdu22b9sOj6pRna2SkjY9DrV8vMe5vxJli3Z+1ozODTJZ2Ox1OEqC8 KpXHWoDv4TqHFg7pHlrSTWYP/bAPhU63UslwTtX5K7qS5uiCtI0mrbsoPPMAXO0aGnhE 0T3STT0D86eHtRl2ddxD3Z1IMgyMpm5Ay+6TFRGK8f5hekS8N+frvF/Gas4hZvCbBDN8 NbTH+WEHP73nVTyXe+JTip8d3RLUSm/V75yPBfuYX8f/W6uAx5aVUo5XEf2bus6U8aze T6hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=JhQGqQyjaU34qRTLhY+VvydHnaR0QJ6lFd+hz53P+ko=; fh=t0NrhIDdG1/nxwj75ohM4c3kBoOdUl/3zhLTy7gVI+M=; b=oL8yazn4p/DrUCBhwrrddo22XZP5hgXHD310O9WENj1dPeU+KRhJpBVbSY+UyMTjnH 2i/H48yC0h7cbKKkV9ggKgZmItYVc2dEG4Smc6UoaN0govw0rab+2DoYcxjrqFmjglKh /i29pDR1Matn7JjEW63QvpCRLhj8W2jqNSBRd1hC0LkF6BHPavnJZjwOReUyWnzlJTyR jCwUP7LRkZVI7rx7BjgC0uMQxT+Ut9uf5sJ3+IV4/9H8wrlwuYQDRg2oBsON4Cm/u0LO tJGr6GK9qC1GorPdlSGj/47E6o/dbpvHXGhE9a9R/I2na17qVrjdWhwSAYZQiMKbPa1h tScw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id n11-20020a63ee4b000000b005be1955657esi3425200pgk.127.2023.12.01.06.45.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 06:45:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id BE9FC836E45B; Fri, 1 Dec 2023 06:45:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379226AbjLAOos (ORCPT + 99 others); Fri, 1 Dec 2023 09:44:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379192AbjLAOor (ORCPT ); Fri, 1 Dec 2023 09:44:47 -0500 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BA091700 for ; Fri, 1 Dec 2023 06:44:54 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r94l0-0007sC-5O; Fri, 01 Dec 2023 15:44:42 +0100 Received: from [2a0a:edc0:2:b01:1d::c0] (helo=ptx.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r94kz-00CsJd-4O; Fri, 01 Dec 2023 15:44:41 +0100 Received: from mfe by ptx.whiteo.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1r94kz-004lis-1Q; Fri, 01 Dec 2023 15:44:41 +0100 Date: Fri, 1 Dec 2023 15:44:41 +0100 From: Marco Felsch To: Arnd Bergmann Cc: Miquel Raynal , Bartosz Golaszewski , Richard Weinberger , Vignesh Raghavendra , Greg Kroah-Hartman , linux-i2c@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Pengutronix Kernel Team , Heiner Kallweit , Jean Delvare Subject: Re: [RFC PATCH] mtd: devices: add AT24 eeprom support Message-ID: <20231201144441.imk7rrjnv2dugo7p@pengutronix.de> References: <20231127164623.1008176-1-m.felsch@pengutronix.de> <20231129174722.7d4e768c@xps-13> <0cb00798-6510-4456-81fd-90131b97fdb8@app.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0cb00798-6510-4456-81fd-90131b97fdb8@app.fastmail.com> User-Agent: NeoMutt/20180716 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 morse.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 (morse.vger.email [0.0.0.0]); Fri, 01 Dec 2023 06:45:01 -0800 (PST) Hi all, On 23-11-29, Arnd Bergmann wrote: > On Wed, Nov 29, 2023, at 17:47, Miquel Raynal wrote: > > brgl@bgdev.pl wrote on Wed, 29 Nov 2023 10:10:28 +0100: > >> Though if I'm being honest - I would prefer a single driver with > >> backwards compatibility. Have you estimated the effort it would take > >> to abstract both nvmem and mtd? > > > > Also agreed :-) > > +1 Thank you very much for the input :) Of course having a single driver would be better. Before spending to much effort for this I went the simple way to gather some input in case of you don't like the approach at all. I also hoped that we could deprecate the non MTD variant later on. That beeinng said, MTD does not mean that we don't have access to NVMEM since NVMEM is already supported by MTD as well. It's just not under the same name and the backward/compatibility config is not set. Therefore it's not a drop-in replacement right now. > I think this particularly makes sense in the light the other > at24 driver that was recently removed in commit 0113a99b8a75 > ("eeprom: Remove deprecated legacy eeprom driver"). > > The other problem with having two drivers is the need to > arbitrate between them, e.g. when you have a machine with > two at24 devices but want to use one of each for the two > subsystems. This does not really work with our DT probing > logic at the moment. Yes this is not possible, but I also can't imagine such use-case. You can use the MTD version for both since NVMEM is supported for the MTD version as well. Let me check how I can keep the backward compatiblity e.g. by guessing which in case can be error prone as well. Regards, Marco