diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-21 02:38:41 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-21 02:38:41 -0500 |
commit | c633e898bde8990a34907c91b7d5245cab866c6e (patch) | |
tree | 2d0ff752000295c65f630ef95f9d8e64cc1a7afb | |
parent | bf8973fc76e456378d3e2d6a13ed62a52281d379 (diff) | |
parent | def4db33e69609a43b28b399d569b6a0d3ba272a (diff) |
Merge tag 'devicetree-fixes-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull DeviceTree fixes from Rob Herring:
- Remove mc13892 as a trivial device
- Improve of_find_node_by_name() documentation
- Fix unit test dtc warnings
- Clean-ups of USB binding documentation
- Fix potential NULL deref in of_pci_map_rid
* tag 'devicetree-fixes-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
dt-bindings: trivial-devices: Remove fsl,mc13892
of: Document exactly what of_find_node_by_name() puts
of: unittest: disable interrupts_property warning
of: unittest: let dtc generate __local_fixups__
dt-bindings: usb: document hub and host-controller properties
dt-bindings: usb: clean up compatible property
dt-bindings: usb: fix reg-property port-number range
dt-bindings: usb: fix example hub node name
of/pci: Fix theoretical NULL dereference
-rw-r--r-- | Documentation/devicetree/bindings/trivial-devices.txt | 1 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/usb/usb-device.txt | 33 | ||||
-rw-r--r-- | drivers/of/base.c | 6 | ||||
-rw-r--r-- | drivers/of/of_pci.c | 2 | ||||
-rw-r--r-- | drivers/of/unittest-data/Makefile | 1 | ||||
-rw-r--r-- | drivers/of/unittest-data/testcases.dts | 65 |
6 files changed, 29 insertions, 79 deletions
diff --git a/Documentation/devicetree/bindings/trivial-devices.txt b/Documentation/devicetree/bindings/trivial-devices.txt index 27dce08edd73..678039d4d5e5 100644 --- a/Documentation/devicetree/bindings/trivial-devices.txt +++ b/Documentation/devicetree/bindings/trivial-devices.txt | |||
@@ -55,7 +55,6 @@ epson,rx8010 I2C-BUS INTERFACE REAL TIME CLOCK MODULE | |||
55 | epson,rx8581 I2C-BUS INTERFACE REAL TIME CLOCK MODULE | 55 | epson,rx8581 I2C-BUS INTERFACE REAL TIME CLOCK MODULE |
56 | emmicro,em3027 EM Microelectronic EM3027 Real-time Clock | 56 | emmicro,em3027 EM Microelectronic EM3027 Real-time Clock |
57 | fsl,mag3110 MAG3110: Xtrinsic High Accuracy, 3D Magnetometer | 57 | fsl,mag3110 MAG3110: Xtrinsic High Accuracy, 3D Magnetometer |
58 | fsl,mc13892 MC13892: Power Management Integrated Circuit (PMIC) for i.MX35/51 | ||
59 | fsl,mma7660 MMA7660FC: 3-Axis Orientation/Motion Detection Sensor | 58 | fsl,mma7660 MMA7660FC: 3-Axis Orientation/Motion Detection Sensor |
60 | fsl,mma8450 MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer | 59 | fsl,mma8450 MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer |
61 | fsl,mpl3115 MPL3115: Absolute Digital Pressure Sensor | 60 | fsl,mpl3115 MPL3115: Absolute Digital Pressure Sensor |
diff --git a/Documentation/devicetree/bindings/usb/usb-device.txt b/Documentation/devicetree/bindings/usb/usb-device.txt index ce02cebac26a..1b27cebb47f4 100644 --- a/Documentation/devicetree/bindings/usb/usb-device.txt +++ b/Documentation/devicetree/bindings/usb/usb-device.txt | |||
@@ -4,24 +4,35 @@ Usually, we only use device tree for hard wired USB device. | |||
4 | The reference binding doc is from: | 4 | The reference binding doc is from: |
5 | http://www.devicetree.org/open-firmware/bindings/usb/usb-1_0.ps | 5 | http://www.devicetree.org/open-firmware/bindings/usb/usb-1_0.ps |
6 | 6 | ||
7 | |||
7 | Required properties: | 8 | Required properties: |
8 | - compatible: usbVID,PID. The textual representation of VID, PID shall | 9 | - compatible: "usbVID,PID", where VID is the vendor id and PID the product id. |
9 | be in lower case hexadecimal with leading zeroes suppressed. The | 10 | The textual representation of VID and PID shall be in lower case hexadecimal |
10 | other compatible strings from the above standard binding could also | 11 | with leading zeroes suppressed. The other compatible strings from the above |
11 | be used, but a device adhering to this binding may leave out all except | 12 | standard binding could also be used, but a device adhering to this binding |
12 | for usbVID,PID. | 13 | may leave out all except for "usbVID,PID". |
13 | - reg: the port number which this device is connecting to, the range | 14 | - reg: the number of the USB hub port or the USB host-controller port to which |
14 | is 1-31. | 15 | this device is attached. The range is 1-255. |
16 | |||
17 | |||
18 | Required properties for hub nodes with device nodes: | ||
19 | - #address-cells: shall be 1 | ||
20 | - #size-cells: shall be 0 | ||
15 | 21 | ||
16 | Example: | ||
17 | 22 | ||
18 | &usb1 { | 23 | Required properties for host-controller nodes with device nodes: |
24 | - #address-cells: shall be 1 | ||
25 | - #size-cells: shall be 0 | ||
26 | |||
27 | |||
28 | Example: | ||
19 | 29 | ||
30 | &usb1 { /* host controller */ | ||
20 | #address-cells = <1>; | 31 | #address-cells = <1>; |
21 | #size-cells = <0>; | 32 | #size-cells = <0>; |
22 | 33 | ||
23 | hub: genesys@1 { | 34 | hub@1 { /* hub connected to port 1 */ |
24 | compatible = "usb5e3,608"; | 35 | compatible = "usb5e3,608"; |
25 | reg = <1>; | 36 | reg = <1>; |
26 | }; | 37 | }; |
27 | } | 38 | }; |
diff --git a/drivers/of/base.c b/drivers/of/base.c index f2e649ff746f..26618ba8f92a 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
@@ -761,10 +761,10 @@ EXPORT_SYMBOL(of_find_node_opts_by_path); | |||
761 | 761 | ||
762 | /** | 762 | /** |
763 | * of_find_node_by_name - Find a node by its "name" property | 763 | * of_find_node_by_name - Find a node by its "name" property |
764 | * @from: The node to start searching from or NULL, the node | 764 | * @from: The node to start searching from or NULL; the node |
765 | * you pass will not be searched, only the next one | 765 | * you pass will not be searched, only the next one |
766 | * will; typically, you pass what the previous call | 766 | * will. Typically, you pass what the previous call |
767 | * returned. of_node_put() will be called on it | 767 | * returned. of_node_put() will be called on @from. |
768 | * @name: The name string to match against | 768 | * @name: The name string to match against |
769 | * | 769 | * |
770 | * Returns a node pointer with refcount incremented, use | 770 | * Returns a node pointer with refcount incremented, use |
diff --git a/drivers/of/of_pci.c b/drivers/of/of_pci.c index e9ec931f5b9a..a7b1cb6c2f65 100644 --- a/drivers/of/of_pci.c +++ b/drivers/of/of_pci.c | |||
@@ -374,7 +374,7 @@ int of_pci_map_rid(struct device_node *np, u32 rid, | |||
374 | 374 | ||
375 | pr_debug("%pOF: %s, using mask %08x, rid-base: %08x, out-base: %08x, length: %08x, rid: %08x -> %08x\n", | 375 | pr_debug("%pOF: %s, using mask %08x, rid-base: %08x, out-base: %08x, length: %08x, rid: %08x -> %08x\n", |
376 | np, map_name, map_mask, rid_base, out_base, | 376 | np, map_name, map_mask, rid_base, out_base, |
377 | rid_len, rid, *id_out); | 377 | rid_len, rid, masked_rid - rid_base + out_base); |
378 | return 0; | 378 | return 0; |
379 | } | 379 | } |
380 | 380 | ||
diff --git a/drivers/of/unittest-data/Makefile b/drivers/of/unittest-data/Makefile index 3031fc2f18f6..32389acfa616 100644 --- a/drivers/of/unittest-data/Makefile +++ b/drivers/of/unittest-data/Makefile | |||
@@ -1,4 +1,5 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0 | 1 | # SPDX-License-Identifier: GPL-2.0 |
2 | DTC_FLAGS_testcases := -Wno-interrupts_property | ||
2 | obj-y += testcases.dtb.o | 3 | obj-y += testcases.dtb.o |
3 | 4 | ||
4 | targets += testcases.dtb testcases.dtb.S | 5 | targets += testcases.dtb testcases.dtb.S |
diff --git a/drivers/of/unittest-data/testcases.dts b/drivers/of/unittest-data/testcases.dts index ce49463d9d32..55fe0ee20109 100644 --- a/drivers/of/unittest-data/testcases.dts +++ b/drivers/of/unittest-data/testcases.dts | |||
@@ -1,5 +1,7 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /dts-v1/; | 2 | /dts-v1/; |
3 | /plugin/; | ||
4 | |||
3 | / { | 5 | / { |
4 | testcase-data { | 6 | testcase-data { |
5 | changeset { | 7 | changeset { |
@@ -15,66 +17,3 @@ | |||
15 | #include "tests-match.dtsi" | 17 | #include "tests-match.dtsi" |
16 | #include "tests-platform.dtsi" | 18 | #include "tests-platform.dtsi" |
17 | #include "tests-overlay.dtsi" | 19 | #include "tests-overlay.dtsi" |
18 | |||
19 | /* | ||
20 | * phandle fixup data - generated by dtc patches that aren't upstream. | ||
21 | * This data must be regenerated whenever phandle references are modified in | ||
22 | * the testdata tree. | ||
23 | * | ||
24 | * The format of this data may be subject to change. For the time being consider | ||
25 | * this a kernel-internal data format. | ||
26 | */ | ||
27 | / { __local_fixups__ { | ||
28 | testcase-data { | ||
29 | phandle-tests { | ||
30 | consumer-a { | ||
31 | phandle-list = <0x00000000 0x00000008 | ||
32 | 0x00000018 0x00000028 | ||
33 | 0x00000034 0x00000038>; | ||
34 | phandle-list-bad-args = <0x00000000 0x0000000c>; | ||
35 | }; | ||
36 | }; | ||
37 | interrupts { | ||
38 | intmap0 { | ||
39 | interrupt-map = <0x00000004 0x00000010 | ||
40 | 0x00000024 0x00000034>; | ||
41 | }; | ||
42 | intmap1 { | ||
43 | interrupt-map = <0x0000000c>; | ||
44 | }; | ||
45 | interrupts0 { | ||
46 | interrupt-parent = <0x00000000>; | ||
47 | }; | ||
48 | interrupts1 { | ||
49 | interrupt-parent = <0x00000000>; | ||
50 | }; | ||
51 | interrupts-extended0 { | ||
52 | interrupts-extended = <0x00000000 0x00000008 | ||
53 | 0x00000018 0x00000024 | ||
54 | 0x0000002c 0x00000034 | ||
55 | 0x0000003c>; | ||
56 | }; | ||
57 | }; | ||
58 | testcase-device1 { | ||
59 | interrupt-parent = <0x00000000>; | ||
60 | }; | ||
61 | testcase-device2 { | ||
62 | interrupt-parent = <0x00000000>; | ||
63 | }; | ||
64 | overlay2 { | ||
65 | fragment@0 { | ||
66 | target = <0x00000000>; | ||
67 | }; | ||
68 | }; | ||
69 | overlay3 { | ||
70 | fragment@0 { | ||
71 | target = <0x00000000>; | ||
72 | }; | ||
73 | }; | ||
74 | overlay4 { | ||
75 | fragment@0 { | ||
76 | target = <0x00000000>; | ||
77 | }; | ||
78 | }; | ||
79 | }; | ||
80 | }; }; | ||