Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4718431rdh; Wed, 29 Nov 2023 08:47:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHWSqHTGkjcf3X8D7Ts6vlMxucgfsq++tiCdfyzazBMKI+GgRT7DHiW6PYmAGPrXvRB2SPB X-Received: by 2002:a17:902:9a85:b0:1cf:b4ac:633e with SMTP id w5-20020a1709029a8500b001cfb4ac633emr12702234plp.51.1701276452405; Wed, 29 Nov 2023 08:47:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701276452; cv=none; d=google.com; s=arc-20160816; b=p4c9AB2P3hegu9JqjruUwTjoF9W5jxk8KPS9b2AGH7iN6ug5Nib4Hg+Ton+/N8tSgR +RTuSQFoQXPDbdJd/df4VZrVH/Kkn/vM0XUSfRrt+fXGR3FoA19J+H1FlBdFQTI6TgFk H5qrc3W6RuIG3uEOtGvVbuBN2aODagYkILQbXvMNzWgxKfWxSGUI9MYQj1KAq30wXIo1 LukXh0mSYnpaIqK6y8VcfctM1DMKrtvbejfuQo5RaAQz9CBvxN9kGG7RPoF2IqdFX1JL SYrZD07R/r/5iqDZnSfwPPgNpJS5fzxx03YZRX2T5WZ19xaBT/ePRisnMniYxUWt6VQ2 Z7uA== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=VkefkReIWzyqiZJSPhEnTXAmzyUb/Ar5C+Xf+28fWzA=; fh=WNhQ8WcCypa98zywOrIgeteLLMdqL5BQrauwRSmGeqo=; b=pNu1hvqdXzMwVGzZz32ephVy4wP7TIGi70RVON7X9LdxWR2UX5eSaZ3XgxD7tb9db8 ImPdsliSRGHXYWR00meX8NdJrGA1CsFrn2Pls6weUoydqYspOXLIWH+HVanABETVIkSl W+qY8zMoob3r9QjCgBGODdhAH1TbANEKFsi/XiKtMGT1trNohjLgbBV6PY7RAZA0J7au bDOzNFPPTEAQdICCKKMbV+a2zodIoAMeRpxVWqD5wfWr+3SB7wX5IYdlSj2sOC/1wPn0 IZ6RvbNDGJw6sJqD2b15ojhCWa9eQgupC8XyOuBEiHKAlVCn22mSMLyORlkoMuttn5mN 0QKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=WLP04NEX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id e2-20020a170902744200b001c3411c9b83si13690656plt.454.2023.11.29.08.47.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 08:47:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=WLP04NEX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 7E3D5802F863; Wed, 29 Nov 2023 08:47:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229535AbjK2QrU (ORCPT + 99 others); Wed, 29 Nov 2023 11:47:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbjK2QrT (ORCPT ); Wed, 29 Nov 2023 11:47:19 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA90190; Wed, 29 Nov 2023 08:47:25 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 5F84BFF813; Wed, 29 Nov 2023 16:47:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1701276444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VkefkReIWzyqiZJSPhEnTXAmzyUb/Ar5C+Xf+28fWzA=; b=WLP04NEXoF/EPNmxNPgwLICEHOen2oXanUWKsWRA1iZ/LZ+Qlo2awceFETEXMG1y8IfaUy 3tTEMg09JL03ejZwL+eEGrpRQ1gyuQzVpW/ZUmxXeIaIKfdLQu/iYafXA0x9a1muGB2ALN h/9O6HydnjVKJS9HwOX/87S7q9ZBkgj08miJRdUhTqNiTiIaDoRjOWjCDgJXhKrY/l4x3s v8OZKcQP66DmMgpFcaH53QUTu8q3+Ilso0ECJ2fgkKANdrAbIBc0uExmedh6m8fwDfVX9l DIzGskzZEn5oMiHPHwEoadfjGwTHhNqey+gjV0KATl+6GmOvQXATEBcw4UWeZg== Date: Wed, 29 Nov 2023 17:47:22 +0100 From: Miquel Raynal To: Bartosz Golaszewski Cc: Marco Felsch , richard@nod.at, vigneshr@ti.com, arnd@arndb.de, gregkh@linuxfoundation.org, linux-i2c@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: Re: [RFC PATCH] mtd: devices: add AT24 eeprom support Message-ID: <20231129174722.7d4e768c@xps-13> In-Reply-To: References: <20231127164623.1008176-1-m.felsch@pengutronix.de> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 29 Nov 2023 08:47:31 -0800 (PST) Hello, brgl@bgdev.pl wrote on Wed, 29 Nov 2023 10:10:28 +0100: > On Mon, Nov 27, 2023 at 5:46=E2=80=AFPM Marco Felsch wrote: > > =20 >=20 > [snip] >=20 > > > > I dropped the backward compatibility since this is a new driver not > > having to deal with it. The old and the new driver can not be used by > > the same kernel config. So it is either using the MTD eeprom driver > > supporting partitioning and NVMEM or the older one which does not > > support partitioning but keeps the backward compatibility. > > > > Comments and suggestions are very welcome :) =20 >=20 > I skimmed through the code. Nothing obviously wrong. What I would > suggest - if we're going to have two at24 drivers - is a lot more code > reuse. I dislike the idea of having basically the same code in two > places in the kernel and having to fix bugs in both. Agreed. > 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 :-) Thanks, Miqu=C3=A8l