Skip to content

Commit c633e89

Browse files
committed
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
2 parents bf8973f + def4db3 commit c633e89

File tree

6 files changed

+29
-79
lines changed

6 files changed

+29
-79
lines changed

Documentation/devicetree/bindings/trivial-devices.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ epson,rx8010 I2C-BUS INTERFACE REAL TIME CLOCK MODULE
5555
epson,rx8581 I2C-BUS INTERFACE REAL TIME CLOCK MODULE
5656
emmicro,em3027 EM Microelectronic EM3027 Real-time Clock
5757
fsl,mag3110 MAG3110: Xtrinsic High Accuracy, 3D Magnetometer
58-
fsl,mc13892 MC13892: Power Management Integrated Circuit (PMIC) for i.MX35/51
5958
fsl,mma7660 MMA7660FC: 3-Axis Orientation/Motion Detection Sensor
6059
fsl,mma8450 MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer
6160
fsl,mpl3115 MPL3115: Absolute Digital Pressure Sensor

Documentation/devicetree/bindings/usb/usb-device.txt

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,35 @@ Usually, we only use device tree for hard wired USB device.
44
The reference binding doc is from:
55
http://www.devicetree.org/open-firmware/bindings/usb/usb-1_0.ps
66

7+
78
Required properties:
8-
- compatible: usbVID,PID. The textual representation of VID, PID shall
9-
be in lower case hexadecimal with leading zeroes suppressed. The
10-
other compatible strings from the above standard binding could also
11-
be used, but a device adhering to this binding may leave out all except
12-
for usbVID,PID.
13-
- reg: the port number which this device is connecting to, the range
14-
is 1-31.
9+
- compatible: "usbVID,PID", where VID is the vendor id and PID the product id.
10+
The textual representation of VID and PID shall be in lower case hexadecimal
11+
with leading zeroes suppressed. The other compatible strings from the above
12+
standard binding could also be used, but a device adhering to this binding
13+
may leave out all except for "usbVID,PID".
14+
- reg: the number of the USB hub port or the USB host-controller port to which
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
1521

16-
Example:
1722

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:
1929

30+
&usb1 { /* host controller */
2031
#address-cells = <1>;
2132
#size-cells = <0>;
2233

23-
hub: genesys@1 {
34+
hub@1 { /* hub connected to port 1 */
2435
compatible = "usb5e3,608";
2536
reg = <1>;
2637
};
27-
}
38+
};

drivers/of/base.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -761,10 +761,10 @@ EXPORT_SYMBOL(of_find_node_opts_by_path);
761761

762762
/**
763763
* 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
765765
* you pass will not be searched, only the next one
766-
* will; typically, you pass what the previous call
767-
* returned. of_node_put() will be called on it
766+
* will. Typically, you pass what the previous call
767+
* returned. of_node_put() will be called on @from.
768768
* @name: The name string to match against
769769
*
770770
* Returns a node pointer with refcount incremented, use

drivers/of/of_pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ int of_pci_map_rid(struct device_node *np, u32 rid,
374374

375375
pr_debug("%pOF: %s, using mask %08x, rid-base: %08x, out-base: %08x, length: %08x, rid: %08x -> %08x\n",
376376
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);
378378
return 0;
379379
}
380380

drivers/of/unittest-data/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0
2+
DTC_FLAGS_testcases := -Wno-interrupts_property
23
obj-y += testcases.dtb.o
34

45
targets += testcases.dtb testcases.dtb.S
Lines changed: 2 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0
22
/dts-v1/;
3+
/plugin/;
4+
35
/ {
46
testcase-data {
57
changeset {
@@ -15,66 +17,3 @@
1517
#include "tests-match.dtsi"
1618
#include "tests-platform.dtsi"
1719
#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-
}; };

0 commit comments

Comments
 (0)