From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH RFC] eeprom: at24: extend driver to plug into the NVMEM framework Date: Mon, 17 Aug 2015 17:25:04 +0200 Message-ID: <20150817152504.GI7537@lunn.ch> References: <1439693649-10809-1-git-send-email-andrew@lunn.ch> <2080648987.23864.1439713686409.JavaMail.open-xchange@oxbsltgw04.schlund.de> <20150816131130.GC10094@lunn.ch> <1511754934.28154.1439739426390.JavaMail.open-xchange@oxbsltgw00.schlund.de> <55D1DB24.8090602@linaro.org> <20150817130945.GE7537@lunn.ch> <55D1F6CB.2010606@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <55D1F6CB.2010606-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Srinivas Kandagatla Cc: Stefan Wahren , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org, Maxime Ripard List-Id: linux-i2c@vger.kernel.org On Mon, Aug 17, 2015 at 03:59:23PM +0100, Srinivas Kandagatla wrote: > > > On 17/08/15 14:09, Andrew Lunn wrote: > >On Mon, Aug 17, 2015 at 02:01:24PM +0100, Srinivas Kandagatla wrote: > >> > >>+Adding Maxime in the loop > >> > >>On 16/08/15 16:37, Stefan Wahren wrote: > >>>>>Another question which spring to mind is, do we want the eeprom to be > >>>>>in /sys twice, the old and the new way? Backwards compatibility says > >>>>>the old must stay. Do we want a way to suppress the new? Or should we > >>>>>be going as far as refractoring the code into a core library, and two > >>>>>wrapper drivers, old and new? > >>>I think these are questions for the framework maintainers. > >>> > >>One of the reasons for the NVMEM framework is to remove that > >>duplicate code in the every driver. There was no framework/ABI > >>which was guiding such old eeprom sysfs entry in first place, so I > >>dont see an issue in removing it for good. Correct me if am wrong. > > > >The reason for keeping it is backwards compatibility. Having the > >contents of the EEPROM as a file in /sys via this driver is now a part > >of the Linux ABI. You cannot argue it is not an ABI, just because > >there is no framework. Userspace will be assuming it exists at the > >specified location. So we cannot remove it, for existing uses of the > >driver. > Am Ok as long as someone is happy to maintain it. Wolfram Sang has been maintaining the AT24 driver since 2008. We need his ACK to this change, and since this is an i2c driver, he is also probably the path into mainline for this change. But we should also look at the bigger picture. The AT25, MAX6875 and sunxi_sid drivers also have a binary file in /sys. It would be good to have some sort of plan what to do with these drivers, even if at the moment only AT24 is under discussion. Andrew From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755635AbbHQPcV (ORCPT ); Mon, 17 Aug 2015 11:32:21 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:60679 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755601AbbHQPcU (ORCPT ); Mon, 17 Aug 2015 11:32:20 -0400 Date: Mon, 17 Aug 2015 17:25:04 +0200 From: Andrew Lunn To: Srinivas Kandagatla Cc: Stefan Wahren , linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, wsa@the-dreams.de, Maxime Ripard Subject: Re: [PATCH RFC] eeprom: at24: extend driver to plug into the NVMEM framework Message-ID: <20150817152504.GI7537@lunn.ch> References: <1439693649-10809-1-git-send-email-andrew@lunn.ch> <2080648987.23864.1439713686409.JavaMail.open-xchange@oxbsltgw04.schlund.de> <20150816131130.GC10094@lunn.ch> <1511754934.28154.1439739426390.JavaMail.open-xchange@oxbsltgw00.schlund.de> <55D1DB24.8090602@linaro.org> <20150817130945.GE7537@lunn.ch> <55D1F6CB.2010606@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55D1F6CB.2010606@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 17, 2015 at 03:59:23PM +0100, Srinivas Kandagatla wrote: > > > On 17/08/15 14:09, Andrew Lunn wrote: > >On Mon, Aug 17, 2015 at 02:01:24PM +0100, Srinivas Kandagatla wrote: > >> > >>+Adding Maxime in the loop > >> > >>On 16/08/15 16:37, Stefan Wahren wrote: > >>>>>Another question which spring to mind is, do we want the eeprom to be > >>>>>in /sys twice, the old and the new way? Backwards compatibility says > >>>>>the old must stay. Do we want a way to suppress the new? Or should we > >>>>>be going as far as refractoring the code into a core library, and two > >>>>>wrapper drivers, old and new? > >>>I think these are questions for the framework maintainers. > >>> > >>One of the reasons for the NVMEM framework is to remove that > >>duplicate code in the every driver. There was no framework/ABI > >>which was guiding such old eeprom sysfs entry in first place, so I > >>dont see an issue in removing it for good. Correct me if am wrong. > > > >The reason for keeping it is backwards compatibility. Having the > >contents of the EEPROM as a file in /sys via this driver is now a part > >of the Linux ABI. You cannot argue it is not an ABI, just because > >there is no framework. Userspace will be assuming it exists at the > >specified location. So we cannot remove it, for existing uses of the > >driver. > Am Ok as long as someone is happy to maintain it. Wolfram Sang has been maintaining the AT24 driver since 2008. We need his ACK to this change, and since this is an i2c driver, he is also probably the path into mainline for this change. But we should also look at the bigger picture. The AT25, MAX6875 and sunxi_sid drivers also have a binary file in /sys. It would be good to have some sort of plan what to do with these drivers, even if at the moment only AT24 is under discussion. Andrew