Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+29 -79
-1
Documentation/devicetree/bindings/trivial-devices.txt
··· 55 55 epson,rx8581 I2C-BUS INTERFACE REAL TIME CLOCK MODULE 56 56 emmicro,em3027 EM Microelectronic EM3027 Real-time Clock 57 57 fsl,mag3110 MAG3110: Xtrinsic High Accuracy, 3D Magnetometer 58 - fsl,mc13892 MC13892: Power Management Integrated Circuit (PMIC) for i.MX35/51 59 58 fsl,mma7660 MMA7660FC: 3-Axis Orientation/Motion Detection Sensor 60 59 fsl,mma8450 MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer 61 60 fsl,mpl3115 MPL3115: Absolute Digital Pressure Sensor
+22 -11
Documentation/devicetree/bindings/usb/usb-device.txt
··· 4 4 The reference binding doc is from: 5 5 http://www.devicetree.org/open-firmware/bindings/usb/usb-1_0.ps 6 6 7 + 7 8 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 21 + 22 + 23 + Required properties for host-controller nodes with device nodes: 24 + - #address-cells: shall be 1 25 + - #size-cells: shall be 0 26 + 15 27 16 28 Example: 17 29 18 - &usb1 { 19 - 30 + &usb1 { /* host controller */ 20 31 #address-cells = <1>; 21 32 #size-cells = <0>; 22 33 23 - hub: genesys@1 { 34 + hub@1 { /* hub connected to port 1 */ 24 35 compatible = "usb5e3,608"; 25 36 reg = <1>; 26 37 }; 27 - } 38 + };
+3 -3
drivers/of/base.c
··· 761 761 762 762 /** 763 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 765 * 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. 768 768 * @name: The name string to match against 769 769 * 770 770 * Returns a node pointer with refcount incremented, use
+1 -1
drivers/of/of_pci.c
··· 374 374 375 375 pr_debug("%pOF: %s, using mask %08x, rid-base: %08x, out-base: %08x, length: %08x, rid: %08x -> %08x\n", 376 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 378 return 0; 379 379 } 380 380
+1
drivers/of/unittest-data/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 + DTC_FLAGS_testcases := -Wno-interrupts_property 2 3 obj-y += testcases.dtb.o 3 4 4 5 targets += testcases.dtb testcases.dtb.S
+2 -63
drivers/of/unittest-data/testcases.dts
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 /dts-v1/; 3 + /plugin/; 4 + 3 5 / { 4 6 testcase-data { 5 7 changeset { ··· 17 15 #include "tests-match.dtsi" 18 16 #include "tests-platform.dtsi" 19 17 #include "tests-overlay.dtsi" 20 - 21 - /* 22 - * phandle fixup data - generated by dtc patches that aren't upstream. 23 - * This data must be regenerated whenever phandle references are modified in 24 - * the testdata tree. 25 - * 26 - * The format of this data may be subject to change. For the time being consider 27 - * this a kernel-internal data format. 28 - */ 29 - / { __local_fixups__ { 30 - testcase-data { 31 - phandle-tests { 32 - consumer-a { 33 - phandle-list = <0x00000000 0x00000008 34 - 0x00000018 0x00000028 35 - 0x00000034 0x00000038>; 36 - phandle-list-bad-args = <0x00000000 0x0000000c>; 37 - }; 38 - }; 39 - interrupts { 40 - intmap0 { 41 - interrupt-map = <0x00000004 0x00000010 42 - 0x00000024 0x00000034>; 43 - }; 44 - intmap1 { 45 - interrupt-map = <0x0000000c>; 46 - }; 47 - interrupts0 { 48 - interrupt-parent = <0x00000000>; 49 - }; 50 - interrupts1 { 51 - interrupt-parent = <0x00000000>; 52 - }; 53 - interrupts-extended0 { 54 - interrupts-extended = <0x00000000 0x00000008 55 - 0x00000018 0x00000024 56 - 0x0000002c 0x00000034 57 - 0x0000003c>; 58 - }; 59 - }; 60 - testcase-device1 { 61 - interrupt-parent = <0x00000000>; 62 - }; 63 - testcase-device2 { 64 - interrupt-parent = <0x00000000>; 65 - }; 66 - overlay2 { 67 - fragment@0 { 68 - target = <0x00000000>; 69 - }; 70 - }; 71 - overlay3 { 72 - fragment@0 { 73 - target = <0x00000000>; 74 - }; 75 - }; 76 - overlay4 { 77 - fragment@0 { 78 - target = <0x00000000>; 79 - }; 80 - }; 81 - }; 82 - }; };