aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi/spi-gpio.c
AgeCommit message (Collapse)AuthorFilesLines
2013-04-10spi-gpio: init CS before spi_bitbang_setup()Josef Ahmad1-1/+1
spi_bitbang_setup() deasserts the chip select line to initialise the device. The chip select GPIO line is obtained from spi_gpio->cs_gpios[] private data. Currently, devices that are not registered under devicetree environment will call into spi_bitbang_setup() with stale cs_gpios[]. This patch ensures spi_gpio->cs_gpios[] is always initialised prior to calling spi_bitbang_setup(). Reviewed-by: Daniel Mack <[email protected]> Signed-off-by: Josef Ahmad <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-01-26spi: spi-gpio: Add checks for the dt propertiesMaxime Ripard1-3/+20
The bindings assumed that the gpios properties were always there, which made the NO_TX and NO_RX mode not usable from device tree. Add extra checks to make sure that the driver can work if either MOSI or MISO is not used. Signed-off-by: Maxime Ripard <[email protected]> Cc: Mark Brown <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2012-12-07spi: Remove HOTPLUG section attributesGrant Likely1-7/+6
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Bill Pemberton has done most of the legwork on this series. I've used his script to purge the attributes from the drivers/gpio tree. Reported-by: Bill Pemberton <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-09-07spi/gpio: Fix stub for spi_gpio_probe_dt()Mark Brown1-1/+1
The gpio_ was missing from the name. Add a name for the parameter while we're at it since GCC warns. Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2012-09-06spi: spi-gpio: Add DT bindingsDaniel Mack1-3/+96
This patch adds DT bindings to the spi-gpio driver and some documentation about how to use it. Signed-off-by: Daniel Mack <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2012-09-06spi: spi-gpio: store chipselect information in private structureDaniel Mack1-10/+24
The spi-gpio driver currently assumes the chipselect gpio number is stored in ->controller_data of the device's static board information. In devicetree environments, this information is unavailable and has to be derived from the DT node. This patch moves the gpio storage to the controller's private data so the DT bindings can easily build upon the driver. Signed-off-by: Daniel Mack <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2012-07-10spi/gpio: start with CS non-activeUwe Kleine-König1-1/+2
The chip select line was configured as output with the initial value being active explicitly. It was later deasserted during spi_bitbang_setup() without any clock activity in between. So it makes no sense to activate the device at all and the chip select line can better start non-active. Signed-off-by: Uwe Kleine-König <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-12-07spi/gpio: fix section mismatch warningManuel Lauss1-2/+2
Fixes: The function __devinit spi_gpio_probe() references a function __init spi_gpio_alloc.isra.4(). If spi_gpio_alloc.isra.4 is only used by spi_gpio_probe then annotate spi_gpio_alloc.isra.4 with a matching annotation. [wsa: fix spi_gpio_request(), too] Signed-off-by: Manuel Lauss <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2011-10-31spi: Add module.h to implicit users in drivers/spiPaul Gortmaker1-0/+1
We are clipping down the presence of module.h, since it was everywhere. If you really need it, you better call it out, as per this changeset. Signed-off-by: Paul Gortmaker <[email protected]>
2011-10-25drivercore: Add helper macro for platform_driver boilerplateGrant Likely1-16/+5
For simple modules that contain a single platform_driver without any additional setup code then ends up being a block of duplicated boilerplate. This patch adds a new macro, module_platform_driver(), which replaces the module_init()/module_exit() registrations with template functions. Signed-off-by: Grant Likely <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Magnus Damm <[email protected]> Reviewed-by: Mark Brown <[email protected]> Reviewed-by: Stephen Boyd <[email protected]>
2011-06-06spi: reorganize driversGrant Likely1-0/+429
Sort the SPI makefile and enforce the naming convention spi_*.c for spi drivers. This change also rolls the contents of atmel_spi.h into the .c file since there is only one user of that particular include file. v2: - Use 'spi-' prefix instead of 'spi_' to match what seems to be be the predominant pattern for subsystem prefixes. - Clean up filenames in Kconfig and header comment blocks Signed-off-by: Grant Likely <[email protected]> Acked-by: Wolfram Sang <[email protected]> Acked-by: Linus Walleij <[email protected]>