Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c633e898 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents bf8973fc def4db33
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -55,7 +55,6 @@ epson,rx8010 I2C-BUS INTERFACE REAL TIME CLOCK MODULE
epson,rx8581		I2C-BUS INTERFACE REAL TIME CLOCK MODULE
emmicro,em3027		EM Microelectronic EM3027 Real-time Clock
fsl,mag3110		MAG3110: Xtrinsic High Accuracy, 3D Magnetometer
fsl,mc13892		MC13892: Power Management Integrated Circuit (PMIC) for i.MX35/51
fsl,mma7660		MMA7660FC: 3-Axis Orientation/Motion Detection Sensor
fsl,mma8450		MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer
fsl,mpl3115		MPL3115: Absolute Digital Pressure Sensor
+22 −11
Original line number Diff line number Diff line
@@ -4,24 +4,35 @@ Usually, we only use device tree for hard wired USB device.
The reference binding doc is from:
http://www.devicetree.org/open-firmware/bindings/usb/usb-1_0.ps


Required properties:
- compatible: usbVID,PID. The textual representation of VID, PID shall
  be in lower case hexadecimal with leading zeroes suppressed. The
  other compatible strings from the above standard binding could also
  be used, but a device adhering to this binding may leave out all except
  for usbVID,PID.
- reg: the port number which this device is connecting to, the range
  is 1-31.
- compatible: "usbVID,PID", where VID is the vendor id and PID the product id.
  The textual representation of VID and PID shall be in lower case hexadecimal
  with leading zeroes suppressed. The other compatible strings from the above
  standard binding could also be used, but a device adhering to this binding
  may leave out all except for "usbVID,PID".
- reg: the number of the USB hub port or the USB host-controller port to which
  this device is attached. The range is 1-255.


Required properties for hub nodes with device nodes:
- #address-cells: shall be 1
- #size-cells: shall be 0

Example:

&usb1 {
Required properties for host-controller nodes with device nodes:
- #address-cells: shall be 1
- #size-cells: shall be 0


Example:

&usb1 {	/* host controller */
	#address-cells = <1>;
	#size-cells = <0>;

	hub: genesys@1 {
	hub@1 {	/* hub connected to port 1 */
		compatible = "usb5e3,608";
		reg = <1>;
	};
}
};
+3 −3
Original line number Diff line number Diff line
@@ -761,10 +761,10 @@ EXPORT_SYMBOL(of_find_node_opts_by_path);

/**
 *	of_find_node_by_name - Find a node by its "name" property
 *	@from:	The node to start searching from or NULL, the node
 *	@from:	The node to start searching from or NULL; the node
 *		you pass will not be searched, only the next one
 *		will; typically, you pass what the previous call
 *		returned. of_node_put() will be called on it
 *		will. Typically, you pass what the previous call
 *		returned. of_node_put() will be called on @from.
 *	@name:	The name string to match against
 *
 *	Returns a node pointer with refcount incremented, use
+1 −1
Original line number Diff line number Diff line
@@ -374,7 +374,7 @@ int of_pci_map_rid(struct device_node *np, u32 rid,

		pr_debug("%pOF: %s, using mask %08x, rid-base: %08x, out-base: %08x, length: %08x, rid: %08x -> %08x\n",
			np, map_name, map_mask, rid_base, out_base,
			rid_len, rid, *id_out);
			rid_len, rid, masked_rid - rid_base + out_base);
		return 0;
	}

+1 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
DTC_FLAGS_testcases := -Wno-interrupts_property
obj-y += testcases.dtb.o

targets += testcases.dtb testcases.dtb.S
Loading