linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/28] at24: remove at24_platform_data
@ 2018-08-08 15:31 Bartosz Golaszewski
  2018-08-08 15:31 ` [PATCH 01/28] nvmem: add support for cell lookups Bartosz Golaszewski
                   ` (28 more replies)
  0 siblings, 29 replies; 54+ messages in thread
From: Bartosz Golaszewski @ 2018-08-08 15:31 UTC (permalink / raw)
  To: Jonathan Corbet, Sekhar Nori, Kevin Hilman, Russell King,
	Arnd Bergmann, Greg Kroah-Hartman, David Woodhouse, Brian Norris,
	Boris Brezillon, Marek Vasut, Richard Weinberger,
	Grygorii Strashko, David S . Miller, Srinivas Kandagatla, Naren,
	Mauro Carvalho Chehab, Andrew Morton, Lukas Wunner,
	Dan Carpenter, Florian Fainelli, Ivan Khoronzhuk,
	Sven Van Asbroeck, Paolo Abeni, Alban Bedel, Rob Herring,
	David Lechner, Andrew Lunn
  Cc: linux-doc, linux-kernel, linux-arm-kernel, linux-i2c, linux-mtd,
	linux-omap, netdev, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

This is a follow-up to the previously rejected series[1] which partially
removed the at24_platform_data structure. After further development and
taking reviews into account, this series finally removes that struct
completely but not without touching many different parts of the code
base.

Since I took over maintainership of the at24 driver I've been working
towards removing at24_platform_data in favor for device properties.

DaVinci is the only platform that's still using it - all other users
have already been converted.

One of the obstacles in case of DaVinci is removing the setup() callback
from the pdata struct, the only user of which are some davinci boards.

Most boards use the EEPROM to store the MAC address. This series adds
support for cell lookups to the nvmem framework, registers relevant
cells for all users, adds nvmem support to eth_platform_get_mac_address(),
converts davinci_emac driver to using it and replaces at24_platform_data
with device properties.

There's also one board (da850-evm) which uses MTD for reading the MAC
address. I used the patch from Alban Bedel's previous submission[2] to
add support for nvmem to the MTD framework. Since this user doesn't
need device tree, I dropped Alban's patches modifying the DT bindings.
We can add that later once an agreement is reached. For the time being
MTD devices are registered as nvmem devices and we're registering the
mac-address cell using the cell lookup mechanism.

This series adds a blocking notifier chain to the nvmem framework, so
that we can keep the EEPROM reading code in the mityomapl138 board file
with only slight modifications.

I also included some minor fixes to the modified code.

Tested on da850-evm & dm365-evm.

[1] https://lkml.org/lkml/2018/6/29/153
[2] https://lkml.org/lkml/2018/3/24/312

Alban Bedel (1):
  mtd: Add support for reading MTD devices via the nvmem API

Bartosz Golaszewski (27):
  nvmem: add support for cell lookups
  Documentation: nvmem: document lookup entries
  nvmem: add a notifier chain
  nvmem: provide nvmem_device_name()
  nvmem: remove the name field from struct nvmem_device
  ARM: davinci: dm365-evm: use nvmem lookup for mac address
  ARM: davinci: dm644-evm: use nvmem lookup for mac address
  ARM: davinci: dm646x-evm: use nvmem lookup for mac address
  ARM: davinci: da830-evm: use nvmem lookup for mac address
  ARM: davinci: mityomapl138: add nvmem cells lookup entries
  ARM: davinci: da850-evm: use nvmem lookup for mac address
  ARM: davinci: da850-evm: remove unnecessary include
  net: split eth_platform_get_mac_address() into subroutines
  net: add support for nvmem to eth_platform_get_mac_address()
  net: davinci_emac: use eth_platform_get_mac_address()
  ARM: davinci: da850-evm: remove dead MTD code
  ARM: davinci: mityomapl138: don't read the MAC address from machine
    code
  ARM: davinci: dm365-evm: use device properties for at24 eeprom
  ARM: davinci: da830-evm: use device properties for at24 eeprom
  ARM: davinci: dm644x-evm: use device properties for at24 eeprom
  ARM: davinci: dm646x-evm: use device properties for at24 eeprom
  ARM: davinci: sffsdr: fix the at24 eeprom device name
  ARM: davinci: sffsdr: use device properties for at24 eeprom
  ARM: davinci: remove dead code related to MAC address reading
  ARM: davinci: mityomapl138: use nvmem notifiers
  ARM: davinci: mityomapl138: use device properties for at24 eeprom
  eeprom: at24: kill at24_platform_data

 Documentation/nvmem/nvmem.txt              |  28 +++++
 MAINTAINERS                                |   1 -
 arch/arm/mach-davinci/board-da830-evm.c    |  25 ++--
 arch/arm/mach-davinci/board-da850-evm.c    |  45 +++-----
 arch/arm/mach-davinci/board-dm365-evm.c    |  25 ++--
 arch/arm/mach-davinci/board-dm644x-evm.c   |  24 ++--
 arch/arm/mach-davinci/board-dm646x-evm.c   |  25 ++--
 arch/arm/mach-davinci/board-mityomapl138.c |  59 +++++++---
 arch/arm/mach-davinci/board-sffsdr.c       |  13 +--
 arch/arm/mach-davinci/common.c             |  15 ---
 drivers/misc/eeprom/at24.c                 | 127 +++++++++------------
 drivers/mtd/Kconfig                        |   1 +
 drivers/mtd/mtdcore.c                      |  50 ++++++++
 drivers/net/ethernet/ti/davinci_emac.c     |  12 +-
 drivers/nvmem/core.c                       | 106 ++++++++++++++++-
 include/linux/davinci_emac.h               |   2 -
 include/linux/mtd/mtd.h                    |   2 +
 include/linux/nvmem-consumer.h             |  31 +++++
 include/linux/nvmem-provider.h             |  10 ++
 include/linux/platform_data/at24.h         |  60 ----------
 net/ethernet/eth.c                         |  86 ++++++++++++--
 21 files changed, 492 insertions(+), 255 deletions(-)
 delete mode 100644 include/linux/platform_data/at24.h

-- 
2.18.0


^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2018-08-10  8:16 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 15:31 [PATCH 00/28] at24: remove at24_platform_data Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 01/28] nvmem: add support for cell lookups Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 02/28] Documentation: nvmem: document lookup entries Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 03/28] nvmem: add a notifier chain Bartosz Golaszewski
2018-08-08 16:13   ` Andrew Lunn
2018-08-08 16:30     ` Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 04/28] nvmem: provide nvmem_device_name() Bartosz Golaszewski
2018-08-08 17:42   ` Andy Shevchenko
2018-08-08 15:31 ` [PATCH 05/28] nvmem: remove the name field from struct nvmem_device Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 06/28] mtd: Add support for reading MTD devices via the nvmem API Bartosz Golaszewski
2018-08-08 16:20   ` Andrew Lunn
2018-08-08 16:26     ` Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 07/28] ARM: davinci: dm365-evm: use nvmem lookup for mac address Bartosz Golaszewski
2018-08-08 17:43   ` Andy Shevchenko
2018-08-08 15:31 ` [PATCH 08/28] ARM: davinci: dm644-evm: " Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 09/28] ARM: davinci: dm646x-evm: " Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 10/28] ARM: davinci: da830-evm: " Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 11/28] ARM: davinci: mityomapl138: add nvmem cells lookup entries Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 12/28] ARM: davinci: da850-evm: use nvmem lookup for mac address Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 13/28] ARM: davinci: da850-evm: remove unnecessary include Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 14/28] net: split eth_platform_get_mac_address() into subroutines Bartosz Golaszewski
2018-08-08 17:50   ` Andy Shevchenko
2018-08-09 11:12     ` Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 15/28] net: add support for nvmem to eth_platform_get_mac_address() Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 16/28] net: davinci_emac: use eth_platform_get_mac_address() Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 17/28] ARM: davinci: da850-evm: remove dead MTD code Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 18/28] ARM: davinci: mityomapl138: don't read the MAC address from machine code Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 19/28] ARM: davinci: dm365-evm: use device properties for at24 eeprom Bartosz Golaszewski
2018-08-08 17:54   ` Andy Shevchenko
2018-08-08 15:31 ` [PATCH 20/28] ARM: davinci: da830-evm: " Bartosz Golaszewski
2018-08-08 17:55   ` Andy Shevchenko
2018-08-08 15:31 ` [PATCH 21/28] ARM: davinci: dm644x-evm: " Bartosz Golaszewski
2018-08-08 17:55   ` Andy Shevchenko
2018-08-08 17:59     ` Andy Shevchenko
2018-08-08 15:31 ` [PATCH 22/28] ARM: davinci: dm646x-evm: " Bartosz Golaszewski
2018-08-08 17:56   ` Andy Shevchenko
2018-08-08 15:31 ` [PATCH 23/28] ARM: davinci: sffsdr: fix the at24 eeprom device name Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 24/28] ARM: davinci: sffsdr: use device properties for at24 eeprom Bartosz Golaszewski
2018-08-08 17:57   ` Andy Shevchenko
2018-08-08 18:00     ` Andy Shevchenko
2018-08-08 15:31 ` [PATCH 25/28] ARM: davinci: remove dead code related to MAC address reading Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 26/28] ARM: davinci: mityomapl138: use nvmem notifiers Bartosz Golaszewski
2018-08-08 15:31 ` [PATCH 27/28] ARM: davinci: mityomapl138: use device properties for at24 eeprom Bartosz Golaszewski
2018-08-08 17:58   ` Andy Shevchenko
2018-08-08 18:00     ` Andy Shevchenko
2018-08-08 15:31 ` [PATCH 28/28] eeprom: at24: kill at24_platform_data Bartosz Golaszewski
2018-08-08 18:03   ` Andy Shevchenko
2018-08-09 11:33     ` Bartosz Golaszewski
2018-08-09 11:35       ` Bartosz Golaszewski
2018-08-08 15:55 ` [PATCH 00/28] at24: remove at24_platform_data Wolfram Sang
2018-08-08 16:27   ` Bartosz Golaszewski
2018-08-08 16:44     ` Andrew Lunn
2018-08-08 16:52       ` Bartosz Golaszewski
2018-08-10  8:12         ` Sekhar Nori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).