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

Commit 75dcc7ef authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SPI updates from Mark Brown:
 "A quiet release for SPI, some fixes and small updates for individual
  drivers with one bigger change from Linus Walleij which coverts the
  bitbanging SPI driver to use the GPIO descriptor API from Linus
  Walleij.

  Since GPIO descriptors were used by platform data this means there's a
  few changes in arch/ making relevant updates for a few platforms and
  one misc driver that are affected"

* tag 'spi-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (24 commits)
  MAINTAINERS: update Andi's e-mail
  spi: spi-atmel: Use correct enum for DMA transfer direction
  spi: sh-msiof: Document R-Car M3-N support
  spi: sh-msiof: Use correct enum for DMA transfer direction
  spi: sprd: Add the support of restarting the system
  spi: sprd: Simplify the transfer function
  spi: Fix unregistration of controller with fixed SPI bus number
  spi: rspi: use correct enum for DMA transfer direction
  spi: jcore: disable ref_clk after getting its rate
  spi: bcm-qspi: fIX some error handling paths
  spi: pxa2xx: Disable runtime PM if controller registration fails
  spi: tegra20-slink: use true and false for boolean values
  spi: Fix scatterlist elements size in spi_map_buf
  spi: atmel: init FIFOs before spi enable
  spi: orion: Prepare space for per-child options
  spi: orion: Make the error message greppable
  spi: orion: Rework GPIO CS handling
  spi: bcm2835aux: Avoid 64-bit arithmetic in xfer len calc
  spi: spi-gpio: Augment device tree bindings
  spi: spi-gpio: Rewrite to use GPIO descriptors
  ...
parents b51c4354 0930437e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ Aleksey Gorelov <aleksey_gorelov@phoenix.com>
Aleksandar Markovic <aleksandar.markovic@mips.com> <aleksandar.markovic@imgtec.com>
Al Viro <viro@ftp.linux.org.uk>
Al Viro <viro@zenIV.linux.org.uk>
Andi Shyti <andi@etezian.org> <andi.shyti@samsung.com>
Andreas Herrmann <aherrman@de.ibm.com>
Andrey Ryabinin <ryabinin.a.a@gmail.com> <a.ryabinin@samsung.com>
Andrew Morton <akpm@linux-foundation.org>
+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ Required properties:
			 "renesas,msiof-r8a7794" (R-Car E2)
			 "renesas,msiof-r8a7795" (R-Car H3)
			 "renesas,msiof-r8a7796" (R-Car M3-W)
			 "renesas,msiof-r8a77965" (R-Car M3-N)
			 "renesas,msiof-sh73a0" (SH-Mobile AG5)
			 "renesas,sh-mobile-msiof" (generic SH-Mobile compatibile device)
			 "renesas,rcar-gen2-msiof" (generic R-Car Gen2 and RZ/G1 compatible device)
+18 −6
Original line number Diff line number Diff line
SPI-GPIO devicetree bindings

This represents a group of 3-n GPIO lines used for bit-banged SPI on dedicated
GPIO lines.

Required properties:

 - compatible: should be set to "spi-gpio"
 - #address-cells: should be set to <0x1>
 - ranges
 - gpio-sck: GPIO spec for the SCK line to use
 - gpio-miso: GPIO spec for the MISO line to use
 - gpio-mosi: GPIO spec for the MOSI line to use
 - sck-gpios: GPIO spec for the SCK line to use
 - miso-gpios: GPIO spec for the MISO line to use
 - mosi-gpios: GPIO spec for the MOSI line to use
 - cs-gpios: GPIOs to use for chipselect lines.
             Not needed if num-chipselects = <0>.
 - num-chipselects: Number of chipselect lines. Should be <0> if a single device
                    with no chip select is connected.

Deprecated bindings:

These legacy GPIO line bindings can alternatively be used to define the
GPIO lines used, they should not be used in new device trees.

 - gpio-sck: GPIO spec for the SCK line to use
 - gpio-miso: GPIO spec for the MISO line to use
 - gpio-mosi: GPIO spec for the MOSI line to use

Example:

	spi {
@@ -20,9 +32,9 @@ Example:
		#address-cells = <0x1>;
		ranges;

		gpio-sck = <&gpio 95 0>;
		gpio-miso = <&gpio 98 0>;
		gpio-mosi = <&gpio 97 0>;
		sck-gpios = <&gpio 95 0>;
		miso-gpios = <&gpio 98 0>;
		mosi-gpios = <&gpio 97 0>;
		cs-gpios = <&gpio 125 0>;
		num-chipselects = <1>;

+1 −1
Original line number Diff line number Diff line
@@ -12181,7 +12181,7 @@ F: Documentation/devicetree/bindings/clock/exynos*.txt
SAMSUNG SPI DRIVERS
M:	Kukjin Kim <kgene@kernel.org>
M:	Krzysztof Kozlowski <krzk@kernel.org>
M:	Andi Shyti <andi.shyti@samsung.com>
M:	Andi Shyti <andi@etezian.org>
L:	linux-spi@vger.kernel.org
L:	linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
S:	Maintained
+17 −4
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include <linux/clk.h>

#include <linux/gpio.h>
#include <linux/gpio/machine.h>
#include <linux/dm9000.h>
#include <linux/leds.h>
#include <linux/platform_data/rtc-v3020.h>
@@ -343,9 +344,6 @@ static inline void cm_x300_init_bl(void) {}
#define LCD_SPI_BUS_NUM	(1)

static struct spi_gpio_platform_data cm_x300_spi_gpio_pdata = {
	.sck		= GPIO_LCD_SCL,
	.mosi		= GPIO_LCD_DIN,
	.miso		= GPIO_LCD_DOUT,
	.num_chipselect	= 1,
};

@@ -357,6 +355,21 @@ static struct platform_device cm_x300_spi_gpio = {
	},
};

static struct gpiod_lookup_table cm_x300_spi_gpiod_table = {
	.dev_id         = "spi_gpio",
	.table          = {
		GPIO_LOOKUP("gpio-pxa", GPIO_LCD_SCL,
			    "sck", GPIO_ACTIVE_HIGH),
		GPIO_LOOKUP("gpio-pxa", GPIO_LCD_DIN,
			    "mosi", GPIO_ACTIVE_HIGH),
		GPIO_LOOKUP("gpio-pxa", GPIO_LCD_DOUT,
			    "miso", GPIO_ACTIVE_HIGH),
		GPIO_LOOKUP("gpio-pxa", GPIO_LCD_CS,
			    "cs", GPIO_ACTIVE_HIGH),
		{ },
	},
};

static struct tdo24m_platform_data cm_x300_tdo24m_pdata = {
	.model = TDO35S,
};
@@ -367,7 +380,6 @@ static struct spi_board_info cm_x300_spi_devices[] __initdata = {
		.max_speed_hz		= 1000000,
		.bus_num		= LCD_SPI_BUS_NUM,
		.chip_select		= 0,
		.controller_data	= (void *) GPIO_LCD_CS,
		.platform_data		= &cm_x300_tdo24m_pdata,
	},
};
@@ -376,6 +388,7 @@ static void __init cm_x300_init_spi(void)
{
	spi_register_board_info(cm_x300_spi_devices,
				ARRAY_SIZE(cm_x300_spi_devices));
	gpiod_add_lookup_table(&cm_x300_spi_gpiod_table);
	platform_device_register(&cm_x300_spi_gpio);
}
#else
Loading