Documentation: dt: mtd: replace "nor-jedec" binding with "jedec, spi-nor"

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri May 15 13:59:01 PDT 2015


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=8947e396a8296c5297928b60043f35dfa56baa05
Commit:     8947e396a8296c5297928b60043f35dfa56baa05
Parent:     db7c727402b3f6a604f0c52be5f6df8ca3797030
Author:     Brian Norris <computersforpeace at gmail.com>
AuthorDate: Thu May 14 10:32:53 2015 -0700
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Fri May 15 13:04:00 2015 -0700

    Documentation: dt: mtd: replace "nor-jedec" binding with "jedec, spi-nor"
    
    In commit 8ff16cf77ce3 ("Documentation: devicetree: m25p80: add "nor-jedec"
    binding"), we added a generic "nor-jedec" binding to catch all
    mostly-compatible SPI NOR flash which can be detected via the READ ID
    opcode (0x9F). This was discussed and reviewed at the time, however
    objections have come up since then as part of this discussion:
    
      http://lkml.kernel.org/g/20150511224646.GJ32500@ld-irv-0074
    
    It seems the parties involved agree that "jedec,spi-nor" does a better
    job of capturing the fact that this is SPI-specific, not just any NOR
    flash.
    
    This binding was only merged for v4.1-rc1, so it's still OK to change
    the naming.
    
    At the same time, let's move the documentation to a better name.
    
    Next up: stop referring to code (drivers/mtd/devices/m25p80.c) from the
    documentation.
    
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
    Cc: Marek Vasut <marex at denx.de>
    Cc: Rafał Miłecki <zajec5 at gmail.com>
    Cc: Rob Herring <robh+dt at kernel.org>
    Cc: Pawel Moll <pawel.moll at arm.com>
    Cc: Ian Campbell <ijc+devicetree at hellion.org.uk>
    Cc: Kumar Gala <galak at codeaurora.org>
    Cc: devicetree at vger.kernel.org
    Acked-by: Stephen Warren <swarren at nvidia.com>
    Acked-by: Geert Uytterhoeven <geert+renesas at glider.be>
    Acked-by: Mark Rutland <mark.rutland at arm.com>
---
 .../devicetree/bindings/mtd/jedec,spi-nor.txt      | 32 ++++++++++++++++++++++
 Documentation/devicetree/bindings/mtd/m25p80.txt   | 32 ----------------------
 drivers/mtd/devices/m25p80.c                       |  6 ++--
 3 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt
new file mode 100644
index 0000000..2bee681
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt
@@ -0,0 +1,32 @@
+* MTD SPI driver for ST M25Pxx (and similar) serial flash chips
+
+Required properties:
+- #address-cells, #size-cells : Must be present if the device has sub-nodes
+  representing partitions.
+- compatible : May include a device-specific string consisting of the
+               manufacturer and name of the chip. Bear in mind the DT binding
+               is not Linux-only, but in case of Linux, see the "m25p_ids"
+               table in drivers/mtd/devices/m25p80.c for the list of supported
+               chips.
+               Must also include "jedec,spi-nor" for any SPI NOR flash that can
+               be identified by the JEDEC READ ID opcode (0x9F).
+- reg : Chip-Select number
+- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
+
+Optional properties:
+- m25p,fast-read : Use the "fast read" opcode to read data from the chip instead
+                   of the usual "read" opcode. This opcode is not supported by
+                   all chips and support for it can not be detected at runtime.
+                   Refer to your chips' datasheet to check if this is supported
+                   by your chip.
+
+Example:
+
+	flash: m25p80 at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "spansion,m25p80", "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <40000000>;
+		m25p,fast-read;
+	};
diff --git a/Documentation/devicetree/bindings/mtd/m25p80.txt b/Documentation/devicetree/bindings/mtd/m25p80.txt
deleted file mode 100644
index f20b111..0000000
--- a/Documentation/devicetree/bindings/mtd/m25p80.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-* MTD SPI driver for ST M25Pxx (and similar) serial flash chips
-
-Required properties:
-- #address-cells, #size-cells : Must be present if the device has sub-nodes
-  representing partitions.
-- compatible : May include a device-specific string consisting of the
-               manufacturer and name of the chip. Bear in mind the DT binding
-               is not Linux-only, but in case of Linux, see the "m25p_ids"
-               table in drivers/mtd/devices/m25p80.c for the list of supported
-               chips.
-               Must also include "nor-jedec" for any SPI NOR flash that can be
-               identified by the JEDEC READ ID opcode (0x9F).
-- reg : Chip-Select number
-- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
-
-Optional properties:
-- m25p,fast-read : Use the "fast read" opcode to read data from the chip instead
-                   of the usual "read" opcode. This opcode is not supported by
-                   all chips and support for it can not be detected at runtime.
-                   Refer to your chips' datasheet to check if this is supported
-                   by your chip.
-
-Example:
-
-	flash: m25p80 at 0 {
-		#address-cells = <1>;
-		#size-cells = <1>;
-		compatible = "spansion,m25p80", "nor-jedec";
-		reg = <0>;
-		spi-max-frequency = <40000000>;
-		m25p,fast-read;
-	};
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 7c8b169..3af137f 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -223,7 +223,7 @@ static int m25p_probe(struct spi_device *spi)
 	 */
 	if (data && data->type)
 		flash_name = data->type;
-	else if (!strcmp(spi->modalias, "nor-jedec"))
+	else if (!strcmp(spi->modalias, "spi-nor"))
 		flash_name = NULL; /* auto-detect */
 	else
 		flash_name = spi->modalias;
@@ -255,7 +255,7 @@ static int m25p_remove(struct spi_device *spi)
  * since most of these flash are compatible to some extent, and their
  * differences can often be differentiated by the JEDEC read-ID command, we
  * encourage new users to add support to the spi-nor library, and simply bind
- * against a generic string here (e.g., "nor-jedec").
+ * against a generic string here (e.g., "jedec,spi-nor").
  *
  * Many flash names are kept here in this list (as well as in spi-nor.c) to
  * keep them available as module aliases for existing platforms.
@@ -305,7 +305,7 @@ static const struct spi_device_id m25p_ids[] = {
 	 * Generic support for SPI NOR that can be identified by the JEDEC READ
 	 * ID opcode (0x9F). Use this, if possible.
 	 */
-	{"nor-jedec"},
+	{"spi-nor"},
 	{ },
 };
 MODULE_DEVICE_TABLE(spi, m25p_ids);



More information about the linux-mtd-cvs mailing list