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

Commit 32d3b2d1 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Mark Brown
Browse files

spi: sh-msiof: Improve bindings



Documentation:
  - Add missing "interrupt-parent", "#address-cells", "#size-cells", and
    "clocks" properties,
  - Add missing default values for "num-cs", "renesas,tx-fifo-size" and
    "renesas,rx-fifo-size",
  - Add a reference to the pinctrl documentation.

Implementation:
  - As "num-cs" is marked optional, provide a sensible default.

Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@linux-m68k.org>
Acked-by: default avatarMagnus Damm <damm@opensource.se>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 4867147b
Loading
Loading
Loading
Loading
+17 −7
Original line number Diff line number Diff line
Renesas MSIOF spi controller

Required properties:
- compatible : 	"renesas,sh-msiof" for SuperH or
		"renesas,sh-mobile-msiof" for SH Mobile series
- compatible           : "renesas,sh-msiof" for SuperH, or
			 "renesas,sh-mobile-msiof" for SH Mobile series.
- reg                  : Offset and length of the register set for the device
- interrupts : interrupt line used by MSIOF
- interrupt-parent     : The phandle for the interrupt controller that
			 services interrupts for this device
- interrupts           : Interrupt specifier
- #address-cells       : Must be <1>
- #size-cells          : Must be <0>

Optional properties:
- num-cs		: total number of chip-selects
- clocks               : Must contain a reference to the functional clock.
- num-cs               : Total number of chip-selects (default is 1)
- renesas,tx-fifo-size : Overrides the default tx fifo size given in words
			 (default is 64)
- renesas,rx-fifo-size : Overrides the default rx fifo size given in words
			 (default is 64)

Pinctrl properties might be needed, too.  See
Documentation/devicetree/bindings/pinctrl/renesas,*.
+1 −1
Original line number Diff line number Diff line
@@ -664,7 +664,7 @@ static struct sh_msiof_spi_info *sh_msiof_spi_parse_dt(struct device *dev)
{
	struct sh_msiof_spi_info *info;
	struct device_node *np = dev->of_node;
	u32 num_cs = 0;
	u32 num_cs = 1;

	info = devm_kzalloc(dev, sizeof(struct sh_msiof_spi_info), GFP_KERNEL);
	if (!info) {