All of lore.kernel.org
 help / color / mirror / Atom feed
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>,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.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, 6 Jul 2013 00:33:13 +0200	[thread overview]
Message-ID: <201307060033.13259.arnd@arndb.de> (raw)
In-Reply-To: <20130705222342.GP2959@lukather>

On Saturday 06 July 2013, Maxime Ripard wrote:
> > My first thought is that it should be more generic than that and not
> > have the mac address hardcoded as the purpose. We could possibly use
> > regmap as the in-kernel interface, and come up with a more generic
> > way of referring to registers in another device node.
> 
> Hmm, I maybe wasn't as clear as I wanted. Here mac-storage was just an
> example. It should indeed be completely generic, and a device could have
> several "storage source" defined, each driver knowing what property it
> would need, pretty much like what's done currently for the regulators
> for example.
> 
> We will have such a use case anyway for the Allwinner stuff, since the
> fuses can be used for several thing, including storing the SoC ID,
> serial numbers, and so on.

Ah, I see. In general, we have two ways of expressing the same thing
here:

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.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: MTD EEPROM support and driver integration
Date: Sat, 6 Jul 2013 00:33:13 +0200	[thread overview]
Message-ID: <201307060033.13259.arnd@arndb.de> (raw)
In-Reply-To: <20130705222342.GP2959@lukather>

On Saturday 06 July 2013, Maxime Ripard wrote:
> > My first thought is that it should be more generic than that and not
> > have the mac address hardcoded as the purpose. We could possibly use
> > regmap as the in-kernel interface, and come up with a more generic
> > way of referring to registers in another device node.
> 
> Hmm, I maybe wasn't as clear as I wanted. Here mac-storage was just an
> example. It should indeed be completely generic, and a device could have
> several "storage source" defined, each driver knowing what property it
> would need, pretty much like what's done currently for the regulators
> for example.
> 
> We will have such a use case anyway for the Allwinner stuff, since the
> fuses can be used for several thing, including storing the SoC ID,
> serial numbers, and so on.

Ah, I see. In general, we have two ways of expressing the same thing
here:

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.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	David Woodhouse <dwmw2@infradead.org>,
	Artem Bityutskiy <dedekind1@gmail.com>,
	Shawn Guo <shawn.guo@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, oliver@schinagl.nl,
	linux-mtd@lists.infradead.org
Subject: Re: MTD EEPROM support and driver integration
Date: Sat, 6 Jul 2013 00:33:13 +0200	[thread overview]
Message-ID: <201307060033.13259.arnd@arndb.de> (raw)
In-Reply-To: <20130705222342.GP2959@lukather>

On Saturday 06 July 2013, Maxime Ripard wrote:
> > My first thought is that it should be more generic than that and not
> > have the mac address hardcoded as the purpose. We could possibly use
> > regmap as the in-kernel interface, and come up with a more generic
> > way of referring to registers in another device node.
> 
> Hmm, I maybe wasn't as clear as I wanted. Here mac-storage was just an
> example. It should indeed be completely generic, and a device could have
> several "storage source" defined, each driver knowing what property it
> would need, pretty much like what's done currently for the regulators
> for example.
> 
> We will have such a use case anyway for the Allwinner stuff, since the
> fuses can be used for several thing, including storing the SoC ID,
> serial numbers, and so on.

Ah, I see. In general, we have two ways of expressing the same thing
here:

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.

	Arnd

  reply	other threads:[~2013-07-05 22:33 UTC|newest]

Thread overview: 60+ 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 20:11 ` Maxime Ripard
2013-07-05 20:11 ` Maxime Ripard
2013-07-05 21:02 ` Arnd Bergmann
2013-07-05 21:02   ` Arnd Bergmann
2013-07-05 21:02   ` Arnd Bergmann
2013-07-05 22:23   ` Maxime Ripard
2013-07-05 22:23     ` Maxime Ripard
2013-07-05 22:23     ` Maxime Ripard
2013-07-05 22:33     ` Arnd Bergmann [this message]
2013-07-05 22:33       ` Arnd Bergmann
2013-07-05 22:33       ` Arnd Bergmann
2013-07-06  8:28       ` Maxime Ripard
2013-07-06  8:28         ` Maxime Ripard
2013-07-06  8:28         ` Maxime Ripard
2013-07-06  9:18         ` Arnd Bergmann
2013-07-06  9:18           ` Arnd Bergmann
2013-07-06  9:18           ` Arnd Bergmann
2013-07-06 11:43           ` Maxime Ripard
2013-07-06 11:43             ` Maxime Ripard
2013-07-06 11:43             ` Maxime Ripard
2013-07-06 12:01           ` Maxime Ripard
2013-07-06 12:01             ` Maxime Ripard
2013-07-06 12:01             ` Maxime Ripard
2013-07-06 19:06             ` Arnd Bergmann
2013-07-06 19:06               ` Arnd Bergmann
2013-07-06 19:06               ` Arnd Bergmann
2013-07-06 19:06               ` Arnd Bergmann
2013-07-06 19:55               ` Jean Delvare
2013-07-06 19:55                 ` Jean Delvare
2013-07-06 19:55                 ` Jean Delvare
2013-07-06 19:55                 ` Jean Delvare
2013-07-07  7:15               ` Maxime Ripard
2013-07-07  7:15                 ` Maxime Ripard
2013-07-07  7:15                 ` Maxime Ripard
2013-07-07  7:15                 ` Maxime Ripard
2013-07-08  8:36                 ` Mark Brown
2013-07-08  8:36                   ` Mark Brown
2013-07-08  8:36                   ` Mark Brown
2013-07-08  8:36                   ` Mark Brown
     [not found]                   ` <20130708083614.GP27646-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-07-08 21:04                     ` Maxime Ripard
2013-07-08 21:04                       ` Maxime Ripard
2013-07-08 21:04                       ` Maxime Ripard
2013-07-08 21:04                       ` Maxime Ripard
2013-07-08  8:34               ` Mark Brown
2013-07-08  8:34                 ` Mark Brown
2013-07-08  8:34                 ` Mark Brown
2013-07-08  8:34                 ` Mark Brown
     [not found]                 ` <20130708083426.GO27646-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-07-08 20:25                   ` Maxime Ripard
2013-07-08 20:25                     ` Maxime Ripard
2013-07-08 20:25                     ` Maxime Ripard
2013-07-08 20:25                     ` Maxime Ripard
2013-07-09 14:55                     ` Mark Brown
2013-07-09 14:55                       ` Mark Brown
2013-07-09 14:55                       ` Mark Brown
2013-07-09 14:55                       ` Mark Brown
     [not found]                       ` <20130709145510.GZ27646-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-07-11 17:05                         ` Maxime Ripard
2013-07-11 17:05                           ` Maxime Ripard
2013-07-11 17:05                           ` Maxime Ripard
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=201307060033.13259.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.