From: Arnd Bergmann <arnd@arndb.de>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Artem Bityutskiy <dedekind1@gmail.com>,
oliver@schinagl.nl,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Wolfram Sang <wsa@the-dreams.de>,
linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
linux-i2c@vger.kernel.org, Jean Delvare <khali@linux-fr.org>,
Shawn Guo <shawn.guo@linaro.org>,
David Woodhouse <dwmw2@infradead.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: MTD EEPROM support and driver integration
Date: Sat, 06 Jul 2013 21:06:49 +0200 [thread overview]
Message-ID: <8997501.Dchyii8uWX@wuerfel> (raw)
In-Reply-To: <20130706120112.GA11069@lukather>
On Saturday 06 July 2013 14:01:12 Maxime Ripard wrote:
> I'm not exactly sure on what happened to the previous mail that has been
> sent empty, but anyway:
>
> On Sat, Jul 06, 2013 at 11:18:00AM +0200, Arnd Bergmann wrote:
> > On Saturday 06 July 2013 10:28:04 Maxime Ripard wrote:
> > > > a) like interrupts, regs, dmas, clocks, pinctrl, reset, pwm: fixed property names
> > > >
> > > > regmap = <&at25 0xstart 0xlen>;
> > > > regmap-names = "mac-address";
> > > >
> > > > b) like gpio, regulator: variable property names
> > > >
> > > > mac-storage = <&at25 0xstart 0xlen>;
> > > >
> > > > It's unfortunate that we already have examples of both. They are largely
> > > > equivalent, but the tendency is towards the first.
> > >
> > > I don't have a strong feeling for one against another, so whatever works
> > > best. Both solutions will be a huge improvement anyway
> > >
> > > Just out of curiosity, is there any advantages besides having a fixed
> > > property name to the first solution?
> >
> > I think it's mostly for consistency: trying to get most subsystems to
> > do it the same way to make it easier for people to write dts files.
> >
> > A lesser point is that it simplifies the driver code if you don't
> > have to pass a name.
>
> So that leave us with mainly one path to achieve this goal:
> - Add a regmap-mtd backend
> - Add DT parsing code for regmap
> - Move the EEPROM drivers from misc to mtd
Yes, I think that would be good. For the last step, we definitely need
buy-in from Wolfgand and Jean, as they are maintaining the current eeprom
drivers.
> What other option would we have?
>
> I also thought about writing an EEPROM framework of its own, but the
> line is really thin between a large EEPROM and say a small SPI
> dataflash, which would make it pretty hard to choose between such a
> framework and MTD.
Isn't flash by definition block based, while EEPROM can be written
in byte or word units? I think that is a significant difference, although
it doesn't necessarily mean that we can't use MTD for both.
We also have a bunch of OTP drivers spread around the kernel, it probably
makes sense to consolidate them at the same time, at least on the DT binding
side if not the device drivers.
Arnd
next prev parent reply other threads:[~2013-07-06 19:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-05 20:11 MTD EEPROM support and driver integration Maxime Ripard
2013-07-05 21:02 ` Arnd Bergmann
2013-07-05 22:23 ` Maxime Ripard
2013-07-05 22:33 ` Arnd Bergmann
2013-07-06 8:28 ` Maxime Ripard
2013-07-06 9:18 ` Arnd Bergmann
2013-07-06 11:43 ` Maxime Ripard
2013-07-06 12:01 ` Maxime Ripard
2013-07-06 19:06 ` Arnd Bergmann [this message]
2013-07-06 19:55 ` Jean Delvare
2013-07-07 7:15 ` Maxime Ripard
2013-07-08 8:36 ` Mark Brown
2013-07-08 21:04 ` Maxime Ripard
2013-07-08 8:34 ` Mark Brown
2013-07-08 20:25 ` Maxime Ripard
2013-07-09 14:55 ` Mark Brown
2013-07-11 17:05 ` Maxime Ripard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8997501.Dchyii8uWX@wuerfel \
--to=arnd@arndb.de \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=gregkh@linuxfoundation.org \
--cc=khali@linux-fr.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=maxime.ripard@free-electrons.com \
--cc=oliver@schinagl.nl \
--cc=shawn.guo@linaro.org \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox