Browse Source

Merge tag 'devicetree-fixes-for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull DeviceTree fixes from Rob Herring:

 - Fix phandle cache to work with overlays

 - Correct the default clock-frequency for QCom geni-i2c

 - Binding doc quote and spelling fixes

* tag 'devicetree-fixes-for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  of: overlay: update phandle cache on overlay apply and remove
  dt-bindings: Fix unbalanced quotation marks
  dt-bindings: soc: qcom: Fix default clock-freq for qcom,geni-i2c
  dt-bindings: w1-gpio: Remove unneeded unit address
  Documentation: devicetree: tilcdc: fix spelling mistake "suppors" -> "supports"
Linus Torvalds 7 years ago
parent
commit
05df204549

+ 1 - 1
Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt

@@ -66,7 +66,7 @@ Required root node properties:
 	- "insignal,arndale-octa" - for Exynos5420-based Insignal Arndale
 	- "insignal,arndale-octa" - for Exynos5420-based Insignal Arndale
 				    Octa board.
 				    Octa board.
 	- "insignal,origen"       - for Exynos4210-based Insignal Origen board.
 	- "insignal,origen"       - for Exynos4210-based Insignal Origen board.
-	- "insignal,origen4412    - for Exynos4412-based Insignal Origen board.
+	- "insignal,origen4412"   - for Exynos4412-based Insignal Origen board.
 
 
 
 
 Optional nodes:
 Optional nodes:

+ 1 - 1
Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt

@@ -36,7 +36,7 @@ Optional nodes:
 
 
  - port/ports: to describe a connection to an external encoder. The
  - port/ports: to describe a connection to an external encoder. The
    binding follows Documentation/devicetree/bindings/graph.txt and
    binding follows Documentation/devicetree/bindings/graph.txt and
-   suppors a single port with a single endpoint.
+   supports a single port with a single endpoint.
 
 
  - See also Documentation/devicetree/bindings/display/tilcdc/panel.txt and
  - See also Documentation/devicetree/bindings/display/tilcdc/panel.txt and
    Documentation/devicetree/bindings/display/tilcdc/tfp410.txt for connecting
    Documentation/devicetree/bindings/display/tilcdc/tfp410.txt for connecting

+ 1 - 1
Documentation/devicetree/bindings/gpio/nintendo,hollywood-gpio.txt

@@ -1,7 +1,7 @@
 Nintendo Wii (Hollywood) GPIO controller
 Nintendo Wii (Hollywood) GPIO controller
 
 
 Required properties:
 Required properties:
-- compatible: "nintendo,hollywood-gpio
+- compatible: "nintendo,hollywood-gpio"
 - reg: Physical base address and length of the controller's registers.
 - reg: Physical base address and length of the controller's registers.
 - gpio-controller: Marks the device node as a GPIO controller.
 - gpio-controller: Marks the device node as a GPIO controller.
 - #gpio-cells: Should be <2>. The first cell is the pin number and the
 - #gpio-cells: Should be <2>. The first cell is the pin number and the

+ 1 - 1
Documentation/devicetree/bindings/input/touchscreen/hideep.txt

@@ -32,7 +32,7 @@ i2c@00000000 {
 		reg = <0x6c>;
 		reg = <0x6c>;
 		interrupt-parent = <&gpx1>;
 		interrupt-parent = <&gpx1>;
 		interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
 		interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
-		vdd-supply = <&ldo15_reg>";
+		vdd-supply = <&ldo15_reg>;
 		vid-supply = <&ldo18_reg>;
 		vid-supply = <&ldo18_reg>;
 		reset-gpios = <&gpx1 5 0>;
 		reset-gpios = <&gpx1 5 0>;
 		touchscreen-size-x = <1080>;
 		touchscreen-size-x = <1080>;

+ 1 - 1
Documentation/devicetree/bindings/interrupt-controller/nvidia,tegra20-ictlr.txt

@@ -15,7 +15,7 @@ Required properties:
   include "nvidia,tegra30-ictlr".	
   include "nvidia,tegra30-ictlr".	
 - reg : Specifies base physical address and size of the registers.
 - reg : Specifies base physical address and size of the registers.
   Each controller must be described separately (Tegra20 has 4 of them,
   Each controller must be described separately (Tegra20 has 4 of them,
-  whereas Tegra30 and later have 5"  
+  whereas Tegra30 and later have 5).
 - interrupt-controller : Identifies the node as an interrupt controller.
 - interrupt-controller : Identifies the node as an interrupt controller.
 - #interrupt-cells : Specifies the number of cells needed to encode an
 - #interrupt-cells : Specifies the number of cells needed to encode an
   interrupt source. The value must be 3.
   interrupt source. The value must be 3.

+ 1 - 1
Documentation/devicetree/bindings/interrupt-controller/st,stm32-exti.txt

@@ -12,7 +12,7 @@ Required properties:
   specifier, shall be 2
   specifier, shall be 2
 - interrupts: interrupts references to primary interrupt controller
 - interrupts: interrupts references to primary interrupt controller
   (only needed for exti controller with multiple exti under
   (only needed for exti controller with multiple exti under
-  same parent interrupt: st,stm32-exti and st,stm32h7-exti")
+  same parent interrupt: st,stm32-exti and st,stm32h7-exti)
 
 
 Example:
 Example:
 
 

+ 1 - 1
Documentation/devicetree/bindings/mips/brcm/soc.txt

@@ -152,7 +152,7 @@ Required properties:
 - compatible	: should contain one of:
 - compatible	: should contain one of:
 		  "brcm,bcm7425-timers"
 		  "brcm,bcm7425-timers"
 		  "brcm,bcm7429-timers"
 		  "brcm,bcm7429-timers"
-		  "brcm,bcm7435-timers and
+		  "brcm,bcm7435-timers" and
 		  "brcm,brcmstb-timers"
 		  "brcm,brcmstb-timers"
 - reg		: the timers register range
 - reg		: the timers register range
 - interrupts	: the interrupt line for this timer block
 - interrupts	: the interrupt line for this timer block

+ 1 - 1
Documentation/devicetree/bindings/net/fsl-fman.txt

@@ -238,7 +238,7 @@ PROPERTIES
 		Must include one of the following:
 		Must include one of the following:
 		- "fsl,fman-dtsec" for dTSEC MAC
 		- "fsl,fman-dtsec" for dTSEC MAC
 		- "fsl,fman-xgec" for XGEC MAC
 		- "fsl,fman-xgec" for XGEC MAC
-		- "fsl,fman-memac for mEMAC MAC
+		- "fsl,fman-memac" for mEMAC MAC
 
 
 - cell-index
 - cell-index
 		Usage: required
 		Usage: required

+ 1 - 1
Documentation/devicetree/bindings/power/power_domain.txt

@@ -133,7 +133,7 @@ located inside a PM domain with index 0 of a power controller represented by a
 node with the label "power".
 node with the label "power".
 In the second example the consumer device are partitioned across two PM domains,
 In the second example the consumer device are partitioned across two PM domains,
 the first with index 0 and the second with index 1, of a power controller that
 the first with index 0 and the second with index 1, of a power controller that
-is represented by a node with the label "power.
+is represented by a node with the label "power".
 
 
 Optional properties:
 Optional properties:
 - required-opps: This contains phandle to an OPP node in another device's OPP
 - required-opps: This contains phandle to an OPP node in another device's OPP

+ 1 - 1
Documentation/devicetree/bindings/regulator/tps65090.txt

@@ -16,7 +16,7 @@ Required properties:
 Optional properties:
 Optional properties:
 - ti,enable-ext-control: This is applicable for DCDC1, DCDC2 and DCDC3.
 - ti,enable-ext-control: This is applicable for DCDC1, DCDC2 and DCDC3.
   If DCDCs are externally controlled then this property should be there.
   If DCDCs are externally controlled then this property should be there.
-- "dcdc-ext-control-gpios: This is applicable for DCDC1, DCDC2 and DCDC3.
+- dcdc-ext-control-gpios: This is applicable for DCDC1, DCDC2 and DCDC3.
   If DCDCs are externally controlled and if it is from GPIO then GPIO
   If DCDCs are externally controlled and if it is from GPIO then GPIO
   number should be provided. If it is externally controlled and no GPIO
   number should be provided. If it is externally controlled and no GPIO
   entry then driver will just configure this rails as external control
   entry then driver will just configure this rails as external control

+ 1 - 1
Documentation/devicetree/bindings/reset/st,sti-softreset.txt

@@ -15,7 +15,7 @@ Please refer to reset.txt in this directory for common reset
 controller binding usage.
 controller binding usage.
 
 
 Required properties:
 Required properties:
-- compatible: Should be st,stih407-softreset";
+- compatible: Should be "st,stih407-softreset";
 - #reset-cells: 1, see below
 - #reset-cells: 1, see below
 
 
 example:
 example:

+ 1 - 1
Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt

@@ -39,7 +39,7 @@ Required properties:
 
 
 Optional property:
 Optional property:
 - clock-frequency:	Desired I2C bus clock frequency in Hz.
 - clock-frequency:	Desired I2C bus clock frequency in Hz.
-			When missing default to 400000Hz.
+			When missing default to 100000Hz.
 
 
 Child nodes should conform to I2C bus binding as described in i2c.txt.
 Child nodes should conform to I2C bus binding as described in i2c.txt.
 
 

+ 1 - 1
Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt

@@ -30,7 +30,7 @@ Required properties:
 
 
 			  Board connectors:
 			  Board connectors:
 			  * Headset Mic
 			  * Headset Mic
-			  * Secondary Mic",
+			  * Secondary Mic
 			  * DMIC
 			  * DMIC
 			  * Ext Spk
 			  * Ext Spk
 
 

+ 1 - 1
Documentation/devicetree/bindings/sound/qcom,apq8096.txt

@@ -35,7 +35,7 @@ This binding describes the APQ8096 sound card, which uses qdsp for audio.
 			"Digital Mic3"
 			"Digital Mic3"
 
 
 		Audio pins and MicBias on WCD9335 Codec:
 		Audio pins and MicBias on WCD9335 Codec:
-			"MIC_BIAS1
+			"MIC_BIAS1"
 			"MIC_BIAS2"
 			"MIC_BIAS2"
 			"MIC_BIAS3"
 			"MIC_BIAS3"
 			"MIC_BIAS4"
 			"MIC_BIAS4"

+ 1 - 1
Documentation/devicetree/bindings/w1/w1-gpio.txt

@@ -15,7 +15,7 @@ Optional properties:
 
 
 Examples:
 Examples:
 
 
-	onewire@0 {
+	onewire {
 		compatible = "w1-gpio";
 		compatible = "w1-gpio";
 		gpios = <&gpio 126 0>, <&gpio 105 0>;
 		gpios = <&gpio 126 0>, <&gpio 105 0>;
 	};
 	};

+ 3 - 3
drivers/of/base.c

@@ -102,7 +102,7 @@ static u32 phandle_cache_mask;
  *   - the phandle lookup overhead reduction provided by the cache
  *   - the phandle lookup overhead reduction provided by the cache
  *     will likely be less
  *     will likely be less
  */
  */
-static void of_populate_phandle_cache(void)
+void of_populate_phandle_cache(void)
 {
 {
 	unsigned long flags;
 	unsigned long flags;
 	u32 cache_entries;
 	u32 cache_entries;
@@ -134,8 +134,7 @@ out:
 	raw_spin_unlock_irqrestore(&devtree_lock, flags);
 	raw_spin_unlock_irqrestore(&devtree_lock, flags);
 }
 }
 
 
-#ifndef CONFIG_MODULES
-static int __init of_free_phandle_cache(void)
+int of_free_phandle_cache(void)
 {
 {
 	unsigned long flags;
 	unsigned long flags;
 
 
@@ -148,6 +147,7 @@ static int __init of_free_phandle_cache(void)
 
 
 	return 0;
 	return 0;
 }
 }
+#if !defined(CONFIG_MODULES)
 late_initcall_sync(of_free_phandle_cache);
 late_initcall_sync(of_free_phandle_cache);
 #endif
 #endif
 
 

+ 2 - 0
drivers/of/of_private.h

@@ -79,6 +79,8 @@ int of_resolve_phandles(struct device_node *tree);
 #if defined(CONFIG_OF_OVERLAY)
 #if defined(CONFIG_OF_OVERLAY)
 void of_overlay_mutex_lock(void);
 void of_overlay_mutex_lock(void);
 void of_overlay_mutex_unlock(void);
 void of_overlay_mutex_unlock(void);
+int of_free_phandle_cache(void);
+void of_populate_phandle_cache(void);
 #else
 #else
 static inline void of_overlay_mutex_lock(void) {};
 static inline void of_overlay_mutex_lock(void) {};
 static inline void of_overlay_mutex_unlock(void) {};
 static inline void of_overlay_mutex_unlock(void) {};

+ 11 - 0
drivers/of/overlay.c

@@ -804,6 +804,8 @@ static int of_overlay_apply(const void *fdt, struct device_node *tree,
 		goto err_free_overlay_changeset;
 		goto err_free_overlay_changeset;
 	}
 	}
 
 
+	of_populate_phandle_cache();
+
 	ret = __of_changeset_apply_notify(&ovcs->cset);
 	ret = __of_changeset_apply_notify(&ovcs->cset);
 	if (ret)
 	if (ret)
 		pr_err("overlay changeset entry notify error %d\n", ret);
 		pr_err("overlay changeset entry notify error %d\n", ret);
@@ -1046,8 +1048,17 @@ int of_overlay_remove(int *ovcs_id)
 
 
 	list_del(&ovcs->ovcs_list);
 	list_del(&ovcs->ovcs_list);
 
 
+	/*
+	 * Disable phandle cache.  Avoids race condition that would arise
+	 * from removing cache entry when the associated node is deleted.
+	 */
+	of_free_phandle_cache();
+
 	ret_apply = 0;
 	ret_apply = 0;
 	ret = __of_changeset_revert_entries(&ovcs->cset, &ret_apply);
 	ret = __of_changeset_revert_entries(&ovcs->cset, &ret_apply);
+
+	of_populate_phandle_cache();
+
 	if (ret) {
 	if (ret) {
 		if (ret_apply)
 		if (ret_apply)
 			devicetree_state_flags |= DTSF_REVERT_FAIL;
 			devicetree_state_flags |= DTSF_REVERT_FAIL;