Skip to content

Commit 8947e39

Browse files
Documentation: dt: mtd: replace "nor-jedec" binding with "jedec, spi-nor"
In commit 8ff16cf ("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 <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Rafał Miłecki <[email protected]> Cc: Rob Herring <[email protected]> Cc: Pawel Moll <[email protected]> Cc: Ian Campbell <[email protected]> Cc: Kumar Gala <[email protected]> Cc: [email protected] Acked-by: Stephen Warren <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Acked-by: Mark Rutland <[email protected]>
1 parent db7c727 commit 8947e39

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Documentation/devicetree/bindings/mtd/m25p80.txt renamed to Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Required properties:
88
is not Linux-only, but in case of Linux, see the "m25p_ids"
99
table in drivers/mtd/devices/m25p80.c for the list of supported
1010
chips.
11-
Must also include "nor-jedec" for any SPI NOR flash that can be
12-
identified by the JEDEC READ ID opcode (0x9F).
11+
Must also include "jedec,spi-nor" for any SPI NOR flash that can
12+
be identified by the JEDEC READ ID opcode (0x9F).
1313
- reg : Chip-Select number
1414
- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
1515

@@ -25,7 +25,7 @@ Example:
2525
flash: m25p80@0 {
2626
#address-cells = <1>;
2727
#size-cells = <1>;
28-
compatible = "spansion,m25p80", "nor-jedec";
28+
compatible = "spansion,m25p80", "jedec,spi-nor";
2929
reg = <0>;
3030
spi-max-frequency = <40000000>;
3131
m25p,fast-read;

drivers/mtd/devices/m25p80.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ static int m25p_probe(struct spi_device *spi)
223223
*/
224224
if (data && data->type)
225225
flash_name = data->type;
226-
else if (!strcmp(spi->modalias, "nor-jedec"))
226+
else if (!strcmp(spi->modalias, "spi-nor"))
227227
flash_name = NULL; /* auto-detect */
228228
else
229229
flash_name = spi->modalias;
@@ -255,7 +255,7 @@ static int m25p_remove(struct spi_device *spi)
255255
* since most of these flash are compatible to some extent, and their
256256
* differences can often be differentiated by the JEDEC read-ID command, we
257257
* encourage new users to add support to the spi-nor library, and simply bind
258-
* against a generic string here (e.g., "nor-jedec").
258+
* against a generic string here (e.g., "jedec,spi-nor").
259259
*
260260
* Many flash names are kept here in this list (as well as in spi-nor.c) to
261261
* keep them available as module aliases for existing platforms.
@@ -305,7 +305,7 @@ static const struct spi_device_id m25p_ids[] = {
305305
* Generic support for SPI NOR that can be identified by the JEDEC READ
306306
* ID opcode (0x9F). Use this, if possible.
307307
*/
308-
{"nor-jedec"},
308+
{"spi-nor"},
309309
{ },
310310
};
311311
MODULE_DEVICE_TABLE(spi, m25p_ids);

0 commit comments

Comments
 (0)