From: Marek Vasut <marek.vasut@gmail.com>
To: Alban <albeu@free.fr>, linux-kernel@vger.kernel.org
Cc: linux-mtd@lists.infradead.org,
Cyrille Pitchen <cyrille.pitchen@atmel.com>,
Richard Weinberger <richard@nod.at>,
Boris Brezillon <boris.brezillon@free-electrons.com>,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [RFC 0/3] drivers: Add an API to read device specific config data
Date: Mon, 27 Feb 2017 21:42:38 +0100 [thread overview]
Message-ID: <56dbc1bb-236f-09ff-dae9-f4afea1298e7@gmail.com> (raw)
In-Reply-To: <1488227292-18906-1-git-send-email-albeu@free.fr>
On 02/27/2017 09:28 PM, Alban wrote:
> Hi all,
>
> while looking at adding OF support for the ath9k driver I had the problem of
> reading the EEPROM data. On the SoC platforms this data is stored in an SPI
> flash along with a few other things. In OpenWRT/LEDE this data is read from
> the board init code using the fact that the flash is (normaly) readable from
> a memory map. A bit too hackish for my taste.
>
> This is just one example, there is various other similar cases, mostly with
> MAC addresses. I thought it would be nicer if we had a clean API for this,
> similar to the firmware API but per device instance instead of beeing per
> driver. The device driver wouldn't have to care where the data is stored,
> they just request it and the backend take care of reading the EEPROM, MTD
> or whatever is used on the board.
Can't we use the NVMEM for this stuff ?
> This series implement such an API along with an implementation for MTD
> devices and a use in the ath9k driver. As this is an RFC I didn't yet
> write the OF binding documentation, that will come later if the feedback
> is positive.
>
> Alban Bedel (3):
> drivers: Add an API to read device specific config data
> mtd: Add support for reading device data out of MTD devices
> ath9k: ahb: Add OF support
>
> drivers/base/Kconfig | 6 +
> drivers/base/Makefile | 1 +
> drivers/base/devdata.c | 204 +++++++++++++++++++++++++++++++++
> drivers/mtd/Kconfig | 9 ++
> drivers/mtd/Makefile | 1 +
> drivers/mtd/devdata.c | 70 +++++++++++
> drivers/net/wireless/ath/ath9k/Kconfig | 1 +
> drivers/net/wireless/ath/ath9k/ahb.c | 55 +++++++--
> drivers/net/wireless/ath/ath9k/init.c | 41 ++++++-
> include/linux/devdata.h | 79 +++++++++++++
> 10 files changed, 459 insertions(+), 8 deletions(-)
> create mode 100644 drivers/base/devdata.c
> create mode 100644 drivers/mtd/devdata.c
> create mode 100644 include/linux/devdata.h
>
--
Best regards,
Marek Vasut
prev parent reply other threads:[~2017-02-27 20:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-27 20:28 [RFC 0/3] drivers: Add an API to read device specific config data Alban
2017-02-27 20:28 ` [PATCH 1/3] " Alban
2017-02-27 20:28 ` [PATCH 2/3] mtd: Add support for reading device data out of MTD devices Alban
2017-02-27 20:28 ` [PATCH 3/3] ath9k: ahb: Add OF support Alban
2017-02-27 21:13 ` Rafał Miłecki
2017-02-27 22:48 ` Alban
2017-02-27 22:54 ` Rafał Miłecki
2017-02-28 18:03 ` kbuild test robot
2017-02-27 20:42 ` [RFC 0/3] drivers: Add an API to read device specific config data Boris Brezillon
2017-02-27 22:26 ` Moritz Fischer
2017-02-27 22:41 ` Alban
2017-02-27 20:42 ` Marek Vasut [this message]
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=56dbc1bb-236f-09ff-dae9-f4afea1298e7@gmail.com \
--to=marek.vasut@gmail.com \
--cc=albeu@free.fr \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@atmel.com \
--cc=dwmw2@infradead.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
/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