[PATCH] Remove all references to "device_type" property from examples

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



While the "device_type" property is still used and supported, it is
deprecated so it should be removed from examples in the documentation.
There is no value in encouraging developers to keep using that
property, so just quietly disappear it from examples, but leave its
explanation in the spec.

Signed-off-by: Robert P. J. Day <rpjday@xxxxxxxxxxxxxx>

---

  according to the spec, that property is still marginally acceptable
for memory and cpu nodes, but it really has no place being used for
any other types of nodes.

diff --git a/source/devicenodes.rst b/source/devicenodes.rst
index b161f07..751a6a8 100644
--- a/source/devicenodes.rst
+++ b/source/devicenodes.rst
@@ -137,7 +137,6 @@ If the VLE storage attribute is supported, with VLE=0.
    ======================= ===== ========================= ===============================================
    Property Name           Usage Value Type                Definition
    ======================= ===== ========================= ===============================================
-   ``device_type``         R      ``<string>``             Value shall be "memory"
    ``reg``                 R      ``<prop-encoded-array>`` Consists of an arbitrary number of address and
                                                            size pairs that specify the physical address
                                                            and size of the memory ranges.
@@ -171,7 +170,6 @@ and ``#size-cells = <2>``.
 .. code-block:: dts

     memory@0 {
-        device_type = "memory";
         reg = <0x000000000 0x00000000 0x00000000 0x80000000
                0x000000001 0x00000000 0x00000001 0x00000000>;
     };
@@ -181,11 +179,9 @@ and ``#size-cells = <2>``.
 .. code-block:: dts

     memory@0 {
-        device_type = "memory";
         reg = <0x000000000 0x00000000 0x00000000 0x80000000>;
     };
     memory@100000000 {
-        device_type = "memory";
         reg = <0x000000001 0x00000000 0x00000001 0x00000000>;
     };

@@ -318,7 +314,6 @@ standard properties with specific applicable detail.
    ====================== ===== ================== ===============================================
    Property Name          Usage Value Type         Definition
    ====================== ===== ================== ===============================================
-   ``device_type``        | R   | ``<string>``     Value shall be ``"cpu"``.
    ``reg``                R     array              The value of *reg* is a ``<prop-encoded-array>``
                                                    that defines a unique CPU/thread id for the
                                                    CPU/threads represented by the CPU node.
@@ -625,7 +620,6 @@ Here is an example of a ``/cpus`` node with one child cpu node:
         #address-cells = <1>;
         #size-cells = <0>;
         cpu@0 {
-            device_type = "cpu";
             reg = <0>;
             d-cache-block-size = <32>; // L1 - 32 bytes
             i-cache-block-size = <32>; // L1 - 32 bytes
@@ -687,7 +681,6 @@ each with their own on-chip L2 and a shared L3.
         #address-cells = <1>;
         #size-cells = <0>;
         cpu@0 {
-            device_type = "cpu";
             reg = <0>;
             cache-unified;
             cache-size = <0x8000>; // L1, 32KB
@@ -717,7 +710,6 @@ each with their own on-chip L2 and a shared L3.
         };

         cpu@1 {
-            device_type = "cpu";
             reg = <1>;
             cache-unified;
             cache-block-size = <32>;
diff --git a/source/devicetree-basics.rst b/source/devicetree-basics.rst
index ba4f0cb..67162d7 100644
--- a/source/devicetree-basics.rst
+++ b/source/devicetree-basics.rst
@@ -62,19 +62,16 @@ with properties and values inside each node.
    #size-cells=\<0\>\l"]

    "cpu@0" [ label="\N |
-   device_type=\"cpu\"\l
    reg=\<0\>\l
    timebase-frequency=\<825000000\>\l
    clock-frequency=\<825000000\>\l"]

    "cpu@1" [ label="\N |
-   device_type=\"cpu\"\l
    reg=\<1\>\l
    timebase-frequency=\<825000000\>\l
    clock-frequency=\<825000000\>\l"]

    "memory@0" [ label="\N |
-   device_type=\"memory\"\l
    reg=\<0 0x20000000\>\l"]

    "uart@fe001000" [ label="\N |
@@ -738,7 +735,6 @@ Address Translation Example:
           ranges = <0x0 0xe0000000 0x00100000>;

           serial {
-             device_type = "serial";
              compatible = "ns16550";
              reg = <0x4600 0x100>;
              clock-frequency = <0>;

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                  http://crashcourse.ca/dokuwiki

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
--
To unsubscribe from this list: send the line "unsubscribe devicetree-spec" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Photos]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]

  Powered by Linux