linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/29] at24: remove at24_platform_data
@ 2018-08-10  8:04 Bartosz Golaszewski
  2018-08-10  8:04 ` [PATCH v2 01/29] nvmem: add support for cell lookups Bartosz Golaszewski
                   ` (30 more replies)
  0 siblings, 31 replies; 92+ messages in thread
From: Bartosz Golaszewski @ 2018-08-10  8:04 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

v1 -> v2:

  PATCH 4/29:
  - change name to nvmem_dev_name()
  - return NULL instead of ERR_PTR(-ENOSYS) from nvmem_dev_name() if nvmem is
    not configured

  PATCH 5/29:
  - s/nvmem_device_name/nvmem_dev_name/

  PATCH 6/29:
  - fix the commit message: remove the part mentioning the OF systems

  PATCH 7/29:
  - fix ordering of includes

  PATCH 8/29:
  - fix ordering of includes

  PATCH 9/29:
  - fix ordering of includes

  PATCH 10/29:
  - fix ordering of includes

  PATCH 11/29:
  - fix ordering of includes

  PATCH 14/29:
  - new patch

  PATCH 22/29:
  - added missing terminator

  PATCH 25/29:
  - removed unneeded coma

  PATCH 27/29:
  - s/nvmem_device_name/nvmem_dev_name/
  - fix ordering of includes

  PATCH 28/29:
  - added missing terminator

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

Bartosz Golaszewski (28):
  nvmem: add support for cell lookups
  Documentation: nvmem: document lookup entries
  nvmem: add a notifier chain
  nvmem: provide nvmem_dev_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: simplify eth_platform_get_mac_address()
  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   |  25 ++--
 arch/arm/mach-davinci/board-dm646x-evm.c   |  25 ++--
 arch/arm/mach-davinci/board-mityomapl138.c |  60 +++++++---
 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                         |  84 ++++++++++++--
 21 files changed, 492 insertions(+), 255 deletions(-)
 delete mode 100644 include/linux/platform_data/at24.h

-- 
2.18.0


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

end of thread, other threads:[~2018-10-04 14:39 UTC | newest]

Thread overview: 92+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-10  8:04 [PATCH v2 00/29] at24: remove at24_platform_data Bartosz Golaszewski
2018-08-10  8:04 ` [PATCH v2 01/29] nvmem: add support for cell lookups Bartosz Golaszewski
2018-08-24 15:08   ` Boris Brezillon
2018-08-24 15:27     ` Andrew Lunn
2018-08-25  6:27       ` Boris Brezillon
2018-08-27  8:56         ` Bartosz Golaszewski
2018-08-27  9:00           ` Boris Brezillon
2018-08-27 13:37             ` Bartosz Golaszewski
2018-08-27 14:01               ` Boris Brezillon
2018-08-28 10:15               ` Srinivas Kandagatla
2018-08-28 11:56                 ` Bartosz Golaszewski
2018-08-28 13:45                   ` Srinivas Kandagatla
2018-08-28 14:41                     ` Bartosz Golaszewski
2018-08-28 14:48                       ` Srinivas Kandagatla
2018-08-28 14:53                       ` Boris Brezillon
2018-08-28 15:09                         ` Srinivas Kandagatla
2018-08-10  8:04 ` [PATCH v2 02/29] Documentation: nvmem: document lookup entries Bartosz Golaszewski
2018-08-31 20:30   ` Brian Norris
2018-09-01 13:11     ` Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 03/29] nvmem: add a notifier chain Bartosz Golaszewski
2018-08-10  8:33   ` Srinivas Kandagatla
2018-08-10  8:05 ` [PATCH v2 04/29] nvmem: provide nvmem_dev_name() Bartosz Golaszewski
2018-08-10  8:10   ` Srinivas Kandagatla
2018-08-10  8:05 ` [PATCH v2 05/29] nvmem: remove the name field from struct nvmem_device Bartosz Golaszewski
2018-08-10  8:33   ` Srinivas Kandagatla
2018-08-10  8:05 ` [PATCH v2 06/29] mtd: Add support for reading MTD devices via the nvmem API Bartosz Golaszewski
2018-08-17 16:27   ` Boris Brezillon
2018-08-19 11:31     ` Alban
2018-08-19 16:46       ` Boris Brezillon
2018-08-20 10:43         ` Srinivas Kandagatla
2018-08-20 18:20           ` Boris Brezillon
2018-08-20 18:50             ` Bartosz Golaszewski
2018-08-20 19:06               ` Boris Brezillon
2018-08-20 21:27             ` Alban
2018-08-21  5:07               ` Boris Brezillon
2018-08-21  9:50             ` Srinivas Kandagatla
2018-08-21  9:56               ` Boris Brezillon
2018-08-21 10:11                 ` Srinivas Kandagatla
2018-08-21 10:43                   ` Boris Brezillon
2018-08-21 11:39               ` Alban
2018-08-21 12:00                 ` Srinivas Kandagatla
2018-08-21 13:01                   ` Boris Brezillon
2018-08-23 10:29                     ` Alban
2018-08-24 14:39                       ` Boris Brezillon
2018-08-28 10:20                       ` Srinivas Kandagatla
2018-08-20 22:53         ` Alban
2018-08-21  5:44           ` Boris Brezillon
2018-08-21  9:38             ` Srinivas Kandagatla
2018-08-21 11:31               ` Boris Brezillon
2018-08-21 13:34                 ` Srinivas Kandagatla
2018-08-21 13:37                   ` Srinivas Kandagatla
2018-08-21 13:57                     ` Boris Brezillon
2018-08-21 12:27             ` Alban
2018-08-21 12:57               ` Boris Brezillon
2018-08-21 13:57                 ` Alban
2018-08-21 14:26                   ` Boris Brezillon
2018-08-21 14:33                     ` Srinivas Kandagatla
2018-08-10  8:05 ` [PATCH v2 07/29] ARM: davinci: dm365-evm: use nvmem lookup for mac address Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 08/29] ARM: davinci: dm644-evm: " Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 09/29] ARM: davinci: dm646x-evm: " Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 10/29] ARM: davinci: da830-evm: " Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 11/29] ARM: davinci: mityomapl138: add nvmem cells lookup entries Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 12/29] ARM: davinci: da850-evm: use nvmem lookup for mac address Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 13/29] ARM: davinci: da850-evm: remove unnecessary include Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 14/29] net: simplify eth_platform_get_mac_address() Bartosz Golaszewski
2018-08-10 14:39   ` Andy Shevchenko
2018-08-10 16:17     ` Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 15/29] net: split eth_platform_get_mac_address() into subroutines Bartosz Golaszewski
2018-08-31 19:54   ` Brian Norris
2018-08-10  8:05 ` [PATCH v2 16/29] net: add support for nvmem to eth_platform_get_mac_address() Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 17/29] net: davinci_emac: use eth_platform_get_mac_address() Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 18/29] ARM: davinci: da850-evm: remove dead MTD code Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 19/29] ARM: davinci: mityomapl138: don't read the MAC address from machine code Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 20/29] ARM: davinci: dm365-evm: use device properties for at24 eeprom Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 21/29] ARM: davinci: da830-evm: " Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 22/29] ARM: davinci: dm644x-evm: " Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 23/29] ARM: davinci: dm646x-evm: " Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 24/29] ARM: davinci: sffsdr: fix the at24 eeprom device name Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 25/29] ARM: davinci: sffsdr: use device properties for at24 eeprom Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 26/29] ARM: davinci: remove dead code related to MAC address reading Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 27/29] ARM: davinci: mityomapl138: use nvmem notifiers Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 28/29] ARM: davinci: mityomapl138: use device properties for at24 eeprom Bartosz Golaszewski
2018-08-10  8:05 ` [PATCH v2 29/29] eeprom: at24: kill at24_platform_data Bartosz Golaszewski
2018-08-10  8:41 ` [PATCH v2 00/29] at24: remove at24_platform_data Srinivas Kandagatla
2018-08-31 19:46 ` Brian Norris
2018-10-03 20:15   ` Bartosz Golaszewski
2018-10-03 20:30     ` Lukas Wunner
2018-10-03 21:04     ` Florian Fainelli
2018-10-04 11:06       ` Bartosz Golaszewski
2018-10-04 13:58         ` Arnd Bergmann
2018-10-04 14:35           ` Sowmini Varadhan
2018-10-04 14:38             ` Arnd Bergmann

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).