All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/18] Export SPI and OF module aliases in missing drivers
@ 2015-08-20  7:07 ` Javier Martinez Canillas
  0 siblings, 0 replies; 80+ messages in thread
From: Javier Martinez Canillas @ 2015-08-20  7:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Javier Martinez Canillas, Andrzej Hajda, linux-fbdev,
	Michael Hennerich, linux-iio, linux-wireless, Lee Jones,
	Jean-Christophe Plagniol-Villard, linux-mtd,
	Lauro Ramos Venancio, Søren Andersen, devel, Randy Dunlap,
	Masanari Iida, Jiri Kosina, Devendra Naga, Tomi Valkeinen,
	Kyungmin Park, Krzysztof Kozlowski, Greg Kroah-Hartman,
	Aloisio Almeida Jr, Jonathan Cameron, Stephen Warren,
	Urs Fässler, Adrian Hunter, Mauro Carvalho Chehab,
	Aya Mahfouz, Brian Norris, George McCollister, Samuel Ortiz,
	Manfred Schlaegl, linux-omap, Hartmut Knaack, Ulf Hansson,
	Antonio Borneo, Andrea Galbusera, Michael Welling,
	Fabian Frederick, Mark Brown, linux-mmc, linux-spi,
	Lars-Peter Clausen, David Woodhouse, netdev, linux-media,
	Peter Meerwald

Hello,

Short version:

This patch series is the SPI equivalent of the I2C one posted before [0].

This series add the missing MODULE_DEVICE_TABLE() for OF and SPI tables
to export that information so modules have the correct aliases built-in
and autoloading works correctly.

Longer version:

The SPI core always reports the MODALIAS uevent as "spi:<modalias>"
regardless of the mechanism that was used to register the device (i.e:
OF or board code) and the table that is used later to match the driver
with the device (i.e: SPI id table or OF match table).

But this means that OF-only drivers needs to have both OF and SPI id
tables that have to be kept in sync and also the device node's compatible
manufacturer prefix is stripped when reporting the MODALIAS. Which can
lead to issues if two vendors use the same SPI device name for example.

Also, there are many SPI drivers whose module auto-loading is not working
because of this fact that the SPI core always reports the MODALIAS as
spi:<modalias> and many developers didn't expect this since is not how
other subsystems behave.

I've identified SPI drivers with 3 types of different issues:

a) Those that have an spi_table but are not exported. The match works
   if the driver is built-in but since the ID table is not exported,
   module auto-load won't work.

b) Those that have a of_table but are not exported. This is currently
   not an issue since even when the of_table is used to match the dev
   with the driver, an OF modalias is not reported by the SPI core.
   But if the SPI core is changed to report the MODALIAS of the form
   of:N*T*C as it's made by other subsystems, then module auto-load
   will break for these drivers.

c) Those that don't have an of_table but should since are OF drivers
   with DT bindings doc for them. Since the SPI core does not report
   a OF modalias and since spi_match_device() fallbacks to match the
   device part of the compatible string with the SPI device ID table,
   many OF drivers don't have an of_table to match. After all having
   a SPI device ID table is mandatory so it works without a of_table.

So, in order to not make mandatory to have a SPI device ID table, all
these three kind of issues have to be addressed. This series does that.

I split the changes so the patches in this series are independent and
can be picked individually by subsystem maintainers.

Patches #1 and #2 solves a), patches #3 to #8 solves b) and patches

Patch #18 changes the logic of spi_uevent() to report an OF modalias if
the device was registered using OF. But this patch is included in the
series only as an RFC for illustration purposes since changing that
without first applying all the other patches in this series, will break
module autoloading for the drivers of devices registered using OF but
that lacks an of_match_table. I'll repost patch #18 once all the patches
in this series have landed.

[0]: https://lkml.org/lkml/2015/7/30/519

Best regards,
Javier


Javier Martinez Canillas (18):
  iio: Export SPI module alias information in missing drivers
  staging: iio: hmc5843: Export missing SPI module alias information
  mtd: dataflash: Export OF module alias information
  OMAPDSS: panel-sony-acx565akm: Export OF module alias information
  mmc: mmc_spi: Export OF module alias information
  staging: mt29f_spinand: Export OF module alias information
  net: ks8851: Export OF module alias information
  [media] s5c73m3: Export OF module alias information
  mfd: cros_ec: spi: Add OF match table
  iio: dac: ad7303: Add OF match table
  iio: adc: max1027: Set struct spi_driver .of_match_table
  mfd: stmpe: Add OF match table
  iio: adc: mcp320x: Set struct spi_driver .of_match_table
  iio: as3935: Add OF match table
  iio: adc128s052: Add OF match table
  iio: frequency: adf4350: Add OF match table
  NFC: trf7970a: Add OF match table
  spi: (RFC, don't apply) report OF style modalias when probing using DT

 drivers/iio/adc/max1027.c                                   |  1 +
 drivers/iio/adc/mcp320x.c                                   |  1 +
 drivers/iio/adc/ti-adc128s052.c                             |  8 ++++++++
 drivers/iio/amplifiers/ad8366.c                             |  1 +
 drivers/iio/dac/ad7303.c                                    |  7 +++++++
 drivers/iio/frequency/adf4350.c                             |  9 +++++++++
 drivers/iio/proximity/as3935.c                              |  7 +++++++
 drivers/media/i2c/s5c73m3/s5c73m3-spi.c                     |  1 +
 drivers/mfd/cros_ec_spi.c                                   |  7 +++++++
 drivers/mfd/stmpe-spi.c                                     | 13 +++++++++++++
 drivers/mmc/host/mmc_spi.c                                  |  1 +
 drivers/mtd/devices/mtd_dataflash.c                         |  1 +
 drivers/net/ethernet/micrel/ks8851.c                        |  1 +
 drivers/nfc/trf7970a.c                                      |  7 +++++++
 drivers/spi/spi.c                                           |  8 ++++++++
 drivers/staging/iio/magnetometer/hmc5843_spi.c              |  1 +
 drivers/staging/mt29f_spinand/mt29f_spinand.c               |  1 +
 .../video/fbdev/omap2/displays-new/panel-sony-acx565akm.c   |  1 +
 18 files changed, 76 insertions(+)

-- 
2.4.3


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

end of thread, other threads:[~2015-09-11 10:33 UTC | newest]

Thread overview: 80+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-20  7:07 [PATCH 00/18] Export SPI and OF module aliases in missing drivers Javier Martinez Canillas
2015-08-20  7:07 ` Javier Martinez Canillas
2015-08-20  7:07 ` Javier Martinez Canillas
2015-08-20  7:07 ` [PATCH 01/18] iio: Export SPI module alias information " Javier Martinez Canillas
2015-08-20 15:49   ` Lars-Peter Clausen
2015-08-22 18:08     ` Jonathan Cameron
2015-08-20  7:07 ` [PATCH 02/18] staging: iio: hmc5843: Export missing SPI module alias information Javier Martinez Canillas
2015-08-22 17:59   ` Jonathan Cameron
2015-08-31 23:09     ` Javier Martinez Canillas
2015-09-05 16:31       ` Jonathan Cameron
2015-09-05 23:34         ` Javier Martinez Canillas
2015-08-20  7:07 ` [PATCH 03/18] mtd: dataflash: Export OF " Javier Martinez Canillas
2015-08-20 21:54   ` Brian Norris
2015-08-20 22:13     ` Javier Martinez Canillas
2015-08-20 22:34       ` Brian Norris
2015-08-20 22:57         ` Javier Martinez Canillas
2015-08-21 22:47           ` Brian Norris
2015-08-22  0:26             ` Javier Martinez Canillas
2015-08-22  1:05               ` Brian Norris
2015-08-22  1:10                 ` Javier Martinez Canillas
2015-08-20  7:07 ` [PATCH 04/18] OMAPDSS: panel-sony-acx565akm: " Javier Martinez Canillas
2015-08-20  7:07   ` Javier Martinez Canillas
2015-08-20  7:07 ` [PATCH 05/18] mmc: mmc_spi: " Javier Martinez Canillas
2015-08-20  7:07 ` [PATCH 06/18] staging: mt29f_spinand: " Javier Martinez Canillas
2015-08-20  7:07 ` [PATCH 07/18] net: ks8851: " Javier Martinez Canillas
2015-08-20  7:07 ` [PATCH 08/18] [media] s5c73m3: " Javier Martinez Canillas
2015-09-11  1:19   ` Javier Martinez Canillas
2015-09-11  9:37     ` Andrzej Hajda
2015-09-11 10:10     ` Andrzej Hajda
2015-09-11 10:33       ` Javier Martinez Canillas
2015-08-20  7:07 ` [PATCH 09/18] mfd: cros_ec: spi: Add OF match table Javier Martinez Canillas
2015-08-24 14:00   ` Lee Jones
2015-08-20  7:07 ` [PATCH 10/18] iio: dac: ad7303: " Javier Martinez Canillas
2015-08-20 15:49   ` Lars-Peter Clausen
2015-08-22 18:06     ` Jonathan Cameron
2015-08-20  7:07 ` [PATCH 11/18] iio: adc: max1027: Set struct spi_driver .of_match_table Javier Martinez Canillas
2015-08-22 18:00   ` Jonathan Cameron
2015-08-20  7:07 ` [PATCH 12/18] mfd: stmpe: Add OF match table Javier Martinez Canillas
2015-08-24 13:59   ` Lee Jones
2015-08-20  7:07 ` [PATCH 13/18] iio: adc: mcp320x: Set struct spi_driver .of_match_table Javier Martinez Canillas
2015-08-20 20:09   ` Michael Welling
2015-08-20 22:02     ` Javier Martinez Canillas
2015-08-20 22:29       ` Michael Welling
2015-08-20 22:48         ` Javier Martinez Canillas
2015-08-20 23:53           ` Michael Welling
2015-08-22 18:09             ` Jonathan Cameron
2015-08-22 17:48           ` Jonathan Cameron
2015-08-22 17:48             ` Jonathan Cameron
2015-08-23 22:10             ` Rob Herring
2015-08-23 22:10               ` Rob Herring
2015-08-24  7:19               ` Javier Martinez Canillas
2015-08-24  7:19                 ` Javier Martinez Canillas
2015-08-20  7:07 ` [PATCH 14/18] iio: as3935: Add OF match table Javier Martinez Canillas
2015-08-22 18:02   ` Jonathan Cameron
2015-08-20  7:07 ` [PATCH 15/18] iio: adc128s052: " Javier Martinez Canillas
2015-08-22 18:03   ` Jonathan Cameron
2015-08-20  7:07 ` [PATCH 16/18] iio: frequency: adf4350: " Javier Martinez Canillas
2015-08-20 15:49   ` Lars-Peter Clausen
2015-08-22 18:04     ` Jonathan Cameron
2015-08-20  7:07 ` [PATCH 17/18] NFC: trf7970a: " Javier Martinez Canillas
2015-08-20  7:07 ` [PATCH 18/18] spi: (RFC, don't apply) report OF style modalias when probing using DT Javier Martinez Canillas
2015-08-20 18:36   ` Mark Brown
2015-08-20 18:36     ` Mark Brown
2015-08-20 21:08     ` Brian Norris
2015-08-20 21:08       ` Brian Norris
2015-08-20 21:45       ` Javier Martinez Canillas
2015-08-20 21:45         ` Javier Martinez Canillas
2015-08-20 23:25         ` Mark Brown
2015-08-20 23:25           ` Mark Brown
2015-08-20 23:47           ` Javier Martinez Canillas
2015-08-21 17:29             ` Mark Brown
2015-08-21 17:29               ` Mark Brown
2015-08-24  8:00               ` Javier Martinez Canillas
2015-08-24  8:00                 ` Javier Martinez Canillas
2015-08-20 21:11 ` [PATCH 00/18] Export SPI and OF module aliases in missing drivers Brian Norris
2015-08-20 21:11   ` Brian Norris
2015-08-20 21:11   ` Brian Norris
2015-08-20 21:50   ` Javier Martinez Canillas
2015-08-20 21:50     ` Javier Martinez Canillas
2015-08-20 21:50     ` Javier Martinez Canillas

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.