linux/drivers/mtd/devices
Brian Norris 4316302292 mtd: m25p80: allow arbitrary OF matching for "jedec,spi-nor"
When we added the "jedec,spi-nor" compatible string for use in this
driver, we added it as a modalias option. The modalias can be derived in
different ways for platform devices vs. device tree (of_*) matching. But
for device tree matching (the primary target of this identifier string),
the modalias is determined from the first entry in the 'compatible'
property. IOW, the following properties would bind to this driver:

	// Option (a), modalias = "spi-nor"
	compatible = "jedec,spi-nor";

	// Option (b), modalias = "spi-nor"
	compatible = "idontknowwhatimdoing,spi-nor";

But the following would not:

	// Option (c), modalias = "shinynewdevice"
	compatible = "myvendor,shinynewdevice", "jedec,spi-nor";

So, we'd like to match (a) and (c) (even when we don't have an explicit
entry for "shinynewdevice"), and we'd rather not allow (b).

To do this, we
  (1) always (for devices without specific platform data) pass the
      modalias to the spi-nor library;
  (2) rework the spi-nor library to not reject "bad" names, and
      instead just fall back to autodetection; and
  (3) add the .of_match_table to properly catch all "jedec,spi-nor".

This allows (a) and (c) without warnings, and rejects (b).

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2015-07-21 09:33:42 -07:00
..
bcm47xxsflash.c mtd: devices: drop owner assignment from platform_drivers 2014-10-20 16:20:57 +02:00
bcm47xxsflash.h mtd: bcm47xxsflash: implement ChipCommon R/W ops 2013-08-05 18:20:32 +01:00
block2mtd.c writeback: separate out include/linux/backing-dev-defs.h 2015-06-02 08:33:34 -06:00
docg3.c mtd: docg3: Fix kasprintf() usage 2015-06-16 18:58:47 -07:00
docg3.h mtd: docg3 add protection against concurrency 2012-03-27 01:03:27 +01:00
Kconfig mtd: powernv: Add powernv flash MTD abstraction driver 2015-06-11 13:23:30 +10:00
lart.c mtd: move zero length verification to MTD API functions 2012-03-27 00:32:19 +01:00
m25p80.c mtd: m25p80: allow arbitrary OF matching for "jedec,spi-nor" 2015-07-21 09:33:42 -07:00
Makefile mtd: powernv: Add powernv flash MTD abstraction driver 2015-06-11 13:23:30 +10:00
ms02-nv.c mtd: ms02-nv: remove superfluous name cast 2014-01-03 11:22:09 -08:00
ms02-nv.h MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
mtd_dataflash.c mtd: dataflash: Remove use of tx_dma 2014-11-05 12:57:24 -08:00
mtdram.c mtd: mtdram: add missing 'const' 2014-01-20 11:55:23 -08:00
phram.c mtd: phram: fix asm/io.h include usage 2014-10-22 01:59:30 -07:00
pmc551.c mtd: delete unnecessary checks before two function calls 2014-11-25 22:44:10 -08:00
powernv_flash.c mtd: powernv: Add powernv flash MTD abstraction driver 2015-06-11 13:23:30 +10:00
serial_flash_cmds.h mtd: st_spi_fsm: begin using spi-nor.h opcodes 2014-04-14 11:23:01 -07:00
slram.c mtd: slram: fix unused variable warning 2014-05-28 00:05:24 -07:00
spear_smi.c mtd: remove incorrect file name 2015-05-22 10:57:46 -07:00
sst25l.c mtd: delete non-required instances of include <linux/init.h> 2014-03-10 22:42:22 -07:00
st_spi_fsm.c mtd: st_spi_fsm: Fix [-Wsign-compare] build warning 2015-01-12 21:08:10 -08:00