Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1588955
| From | Boris Brezillon <boris.brezillon@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC 0/3] drivers: Add an API to read device specific config data |
| Date | 2017-02-27 22:40 +0100 |
| Message-ID | <tfBbx-31m-9@gated-at.bofh.it> (permalink) |
| References | <tfAfo-2lV-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
+Moritz Hi Alban, On Mon, 27 Feb 2017 21:28:09 +0100 Alban <albeu@free.fr> 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. > > 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. What you're looking for already exists and it's called nvmem[1]. Some work has been done to expose MTD partitions as nvmem cells [2], but it's never been finished. Can you please finish Moritz implementation instead of creating a new API? Thanks, Boris [1]http://lxr.free-electrons.com/source/Documentation/nvmem/nvmem.txt [2]https://patchwork.ozlabs.org/patch/626460/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC 0/3] drivers: Add an API to read device specific config data Alban <albeu@free.fr> - 2017-02-27 21:40 +0100
[PATCH 3/3] ath9k: ahb: Add OF support Alban <albeu@free.fr> - 2017-02-27 21:50 +0100
Re: [PATCH 3/3] ath9k: ahb: Add OF support Rafał Miłecki <zajec5@gmail.com> - 2017-02-27 22:20 +0100
Re: [PATCH 3/3] ath9k: ahb: Add OF support Rafał Miłecki <zajec5@gmail.com> - 2017-02-28 00:00 +0100
Re: [PATCH 3/3] ath9k: ahb: Add OF support Alban <albeu@free.fr> - 2017-02-28 00:20 +0100
Re: [RFC 0/3] drivers: Add an API to read device specific config data Marek Vasut <marek.vasut@gmail.com> - 2017-02-27 21:50 +0100
Re: [RFC 0/3] drivers: Add an API to read device specific config data Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-02-27 22:40 +0100
Re: [RFC 0/3] drivers: Add an API to read device specific config data Moritz Fischer <moritz.fischer@ettus.com> - 2017-02-27 23:30 +0100
Re: [RFC 0/3] drivers: Add an API to read device specific config data Alban <albeu@free.fr> - 2017-02-27 23:50 +0100
csiph-web