aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi
AgeCommit message (Collapse)AuthorFilesLines
2013-03-12spi/bcm63xx: remove spi chip select validity checkJonas Gorski1-6/+0
The check would belong in bcm63xx_spi_setup if the spi subsystem weren't already doing the check for us, so just drop it. Signed-off-by: Jonas Gorski <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-03-12spi/bcm63xx: simplify bcm63xx_spi_check_transferJonas Gorski1-5/+2
bcm63xx_spi_check_transfer is only called from one place that has t always set, so directly check the transfer's bits_per_word. Signed-off-by: Jonas Gorski <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-03-12spi/bcm63xx: check spi bits_per_word in spi_setupJonas Gorski1-2/+5
Instead of fixing up the bits_per_word (which the spi subsystem already does for us), check it for supported values. Signed-off-by: Jonas Gorski <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-03-12spi/bcm63xx: remove unused variable bs from bcm63xx_spi_setupJonas Gorski1-4/+0
It is only written, but never read. Signed-off-by: Jonas Gorski <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-03-12spi/bcm63xx: remove unneeded debug messageJonas Gorski1-3/+0
The spi subsystem already provides this info in a more extensive debug print except for the nsecs/bit - which wasn't calculated anyway and fixed to 0. Signed-off-by: Jonas Gorski <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-03-12spi/bcm63xx: remove duplicated mode bits checkJonas Gorski1-6/+0
The spi subsystem already checks the mode bits before calling setup. Signed-off-by: Jonas Gorski <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-03-12spi/bcm63xx: properly prepare clocks before enabling themJonas Gorski1-5/+5
Use proper clk_prepare/unprepare calls in preparation for switching to the generic clock framework. Signed-off-by: Jonas Gorski <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-03-12Merge branch 'spi-fix' into spi-nextMark Brown2-19/+9
2013-03-12spi/bcm63xx: don't disable non enabled clocks in probe error pathJonas Gorski1-1/+1
When msg_ctl_width is set to an invalid value we try to disable the clock despite it never being enabled. Fix it by jumping to the correct label. Signed-off-by: Jonas Gorski <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-03-12spi/bcm63xx: Remove unused variableKevin Cernekee1-1/+0
This fixes the following warning: drivers/spi/spi-bcm63xx.c: In function 'bcm63xx_spi_setup': drivers/spi/spi-bcm63xx.c:157:6: warning: unused variable 'ret' Signed-off-by: Kevin Cernekee <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-03-12spi: slink-tegra20: move runtime pm calls to transfer_one_messageLaxman Dewangan1-17/+8
The prepare_transfer_hardware() is called in atomic context and calling synchronous runtime pm calls can create scheduling deadlock. Therefore, in place of calling runtime PM calls from prepare/unprepare message transfer, calling this in transfer_one_message(). Signed-off-by: Laxman Dewangan <[email protected]> Tested-by: Stephen Warren <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-03-12spi/pxa2xx: enable multiblock DMA transfers for LPSS devicesMika Westerberg1-0/+5
Intel LPSS SPI controllers need to have bit 0 (disable_ssp_dma_finish) set in SSP_REG in order to properly perform DMA transfers spanning over multiple blocks. Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-03-12spi/pxa2xx-pci: correct the return value check of pcim_iomap_regions()Mika Westerberg1-1/+1
The function returns 0 on success and negative errno in case of failure. Fix this. Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-03-12spi: add driver for BCM2835Chris Boot3-0/+468
The BCM2835 contains two forms of SPI master controller (one known simply as SPI0, and the other known as the "Universal SPI Master", in the auxilliary block) and one form of SPI slave controller. This patch adds support for the SPI0 controller. This driver is taken from Chris Boot's repository at git://github.com/bootc/linux.git rpi-linear as of commit 6de2905 "spi-bcm2708: fix printf with spurious %s". In the first SPI-related commit there, Chris wrote: Thanks to csoutreach / A Robinson for his driver which I used as an inspiration. You can find his version here: http://piface.openlx.org.uk/raspberry-pi-spi-kernel-driver-available-for Changes made during upstreaming: * Renamed bcm2708 to bcm2835 as per upstream naming for this SoC. * Removed support for brcm,realtime property. * Increased transfer timeout to 30 seconds. * Return IRQ_NONE from the IRQ handler if no interrupt was handled. * Disable TA (Transfer Active) and clear FIFOs on a transfer timeout. * Wrote device tree binding documentation. * Request unnamed clock rather than "sys_pclk"; the DT will provide the correct clock. * Assume that tfr->speed_hz and tfr->bits_per_word are always set in bcm2835_spi_start_transfer(), bcm2835_spi_transfer_one(), so no need to check spi->speed_hz or tft->bits_per_word. * Re-ordered probe() to remove the need for temporary variables. * Call clk_disable_unprepare() rather than just clk_unprepare() on probe() failure. * Don't use devm_request_irq(), to ensure that the IRQ doesn't fire after we've torn down the device, but not unhooked the IRQ. * Moved probe()'s call to clk_prepare_enable() so we can be sure the clock is enabled if the IRQ handler fires immediately. * Remove redundant checks from bcm2835_spi_check_transfer() and bcm2835_spi_setup(). * Re-ordered IRQ handler to check for RXR before DONE. Added comments to ISR. * Removed empty prepare/unprepare implementations. * Removed use of devinit/devexit. * Added BCM2835_ prefix to defines. Signed-off-by: Chris Boot <[email protected]> Signed-off-by: Stephen Warren <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-03-12spi: fix return value check in ce4100_spi_probe()Wei Yongjun1-2/+2
In case of error, the function platform_device_register_full() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <[email protected]> Acked-by: Mika Westerberg <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-03-12spi: pl022: use generic DMA slave configuration if possibleArnd Bergmann1-2/+41
With the new OF DMA binding, it is possible to completely avoid the need for platform_data for configuring a DMA channel. In cases where the platform has already been converted, calling dma_request_slave_channel should get all the necessary information from the device tree. Like the patch that converts the dw_dma controller, this is completely untested and is looking for someone to try it out. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Grant Likely <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Linus Walleij <[email protected]> Cc: [email protected] Cc: Viresh Kumar <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Vinod Koul <[email protected]> Cc: [email protected] Cc: [email protected]
2013-02-21Merge tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds2-4/+4
Pull ARM SoC-specific updates from Arnd Bergmann: "This is a larger set of new functionality for the existing SoC families, including: - vt8500 gains support for new CPU cores, notably the Cortex-A9 based wm8850 - prima2 gains support for the "marco" SoC family, its SMP based cousin - tegra gains support for the new Tegra4 (Tegra114) family - socfpga now supports a newer version of the hardware including SMP - i.mx31 and bcm2835 are now using DT probing for their clocks - lots of updates for sh-mobile - OMAP updates for clocks, power management and USB - i.mx6q and tegra now support cpuidle - kirkwood now supports PCIe hot plugging - tegra clock support is updated - tegra USB PHY probing gets implemented diffently" * tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (148 commits) ARM: prima2: remove duplicate v7_invalidate_l1 ARM: shmobile: r8a7779: Correct TMU clock support again ARM: prima2: fix __init section for cpu hotplug ARM: OMAP: Consolidate OMAP USB-HS platform data (part 3/3) ARM: OMAP: Consolidate OMAP USB-HS platform data (part 1/3) arm: socfpga: Add SMP support for actual socfpga harware arm: Add v7_invalidate_l1 to cache-v7.S arm: socfpga: Add entries to enable make dtbs socfpga arm: socfpga: Add new device tree source for actual socfpga HW ARM: tegra: sort Kconfig selects for Tegra114 ARM: tegra: enable ARCH_REQUIRE_GPIOLIB for Tegra114 ARM: tegra: Fix build error w/ ARCH_TEGRA_114_SOC w/o ARCH_TEGRA_3x_SOC ARM: tegra: Fix build error for gic update ARM: tegra: remove empty tegra_smp_init_cpus() ARM: shmobile: Register ARM architected timer ARM: MARCO: fix the build issue due to gic-vic-to-irqchip move ARM: shmobile: r8a7779: Correct TMU clock support ARM: mxs_defconfig: Select CONFIG_DEVTMPFS_MOUNT ARM: mxs: decrease mxs_clockevent_device.min_delta_ns to 2 clock cycles ARM: mxs: use apbx bus clock to drive the timers on timrotv2 ...
2013-02-21Merge tag 'driver-core-3.9-rc1' of ↵Linus Torvalds9-40/+31
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core patches from Greg Kroah-Hartman: "Here is the big driver core merge for 3.9-rc1 There are two major series here, both of which touch lots of drivers all over the kernel, and will cause you some merge conflicts: - add a new function called devm_ioremap_resource() to properly be able to check return values. - remove CONFIG_EXPERIMENTAL Other than those patches, there's not much here, some minor fixes and updates" Fix up trivial conflicts * tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (221 commits) base: memory: fix soft/hard_offline_page permissions drivercore: Fix ordering between deferred_probe and exiting initcalls backlight: fix class_find_device() arguments TTY: mark tty_get_device call with the proper const values driver-core: constify data for class_find_device() firmware: Ignore abort check when no user-helper is used firmware: Reduce ifdef CONFIG_FW_LOADER_USER_HELPER firmware: Make user-mode helper optional firmware: Refactoring for splitting user-mode helper code Driver core: treat unregistered bus_types as having no devices watchdog: Convert to devm_ioremap_resource() thermal: Convert to devm_ioremap_resource() spi: Convert to devm_ioremap_resource() power: Convert to devm_ioremap_resource() mtd: Convert to devm_ioremap_resource() mmc: Convert to devm_ioremap_resource() mfd: Convert to devm_ioremap_resource() media: Convert to devm_ioremap_resource() iommu: Convert to devm_ioremap_resource() drm: Convert to devm_ioremap_resource() ...
2013-02-21Merge tag 'sound-3.9' of ↵Linus Torvalds1-54/+23
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "The biggest change in this update is the unification of HD-audio codec parsers. Now the HD-audio codec is parsed in a generic parser code which is invoked by each HD-audio codec driver. Some background information is found in David Henningsson's blog entry: http://voices.canonical.com/david.henningsson/2013/01/18/upcoming-changes-to-the-intel-hda-drivers/ Other than that, some random updates/fixes like USB-audio and a bunch of small AoC updates as usual. Highlights: - Unification of HD-audio parser code (aka generic parser) - Support of new Intel HD-audio controller, new IDT codecs - Fixes for HD-audio HDMI audio hotplug - Haswell HDMI audio fixup - Support of Creative CA0132 DSP code - A few fixes of HDSP driver - USB-audio fix for Roland A-PRO, M-Audio FT C600 - Support PM for aloop driver (and fixes Oops) - Compress API updates for gapless playback support For ASoC part: - Support for a wider range of hardware in the compressed stream code - The ability to mute capture streams as well as playback streams while inactive - DT support for AK4642, FSI, Samsung I2S and WM8962 - AC'97 support for Tegra - New driver for max98090, replacing the stub which was there - A new driver from Dialog Note that due to dependencies, DTification of DMA support for Samsung platforms (used only by the and I2S driver and SPI) is merged here as well." Fix up trivial conflict in drivers/spi/spi-s3c64xx.c due to removed code being changed. * tag 'sound-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (453 commits) ALSA: usb: Fix Processing Unit Descriptor parsers ALSA: hda - hdmi: Notify userspace when ELD control changes ALSA: hda - hdmi: Protect ELD buffer ALSA: hda - hdmi: Refactor hdmi_eld into parsed_hdmi_eld ALSA: hda - hdmi: Do not expose eld data when eld is invalid ALSA: hda - hdmi: ELD shouldn't be valid after unplug ALSA: hda - Fix the silent speaker output on Fujitsu S7020 laptop ALSA: hda - add quirks for mute LED on two HP machines ALSA: usb/quirks, fix out-of-bounds access ASoC: codecs: Add da7213 codec ALSA: au88x0 - Define channel map for au88x0 ALSA: compress: add support for gapless playback ALSA: hda - Remove speaker clicks on CX20549 ALSA: hda - Disable runtime PM for Intel 5 Series/3400 ALSA: hda - Increase badness for missing multi-io ASoC: arizona: Automatically manage input mutes ALSA: hda - Fix broken workaround for HDMI/SPDIF conflicts ALSA: hda/ca0132 - Add missing \n to debug prints ALSA: hda/ca0132 - Fix type of INVALID_CHIP_ADDRESS ALSA: hda - update documentation for no-primary-hp fixup ...
2013-02-20Merge tag 'dt-for-linus' of git://git.secretlab.ca/git/linuxLinus Torvalds4-11/+10
Pull device tree changes from Grant Likely: "All around device tree changes destined for v3.8. Aside from the documentation updates the highlights in this branch include: - Kbuild changes for using CPP with .dts files - locking fix from preempt_rt patchset - include DT alias names in device uevent - Selftest bugfixes and improvements - New function for counting phandles stanzas in a property - constify argument to of_node_full_name() - Various bug fixes This tree did also contain a commit to use platform_device_add instead of open-coding the device add code, but it caused problems with amba devices and needed to be reverted." * tag 'dt-for-linus' of git://git.secretlab.ca/git/linux: (23 commits) Revert "of: use platform_device_add" kbuild: limit dtc+cpp include path gpio: Make of_count_named_gpios() use new of_count_phandle_with_args() of: Create function for counting number of phandles in a property of/base: Clean up exit paths for of_parse_phandle_with_args() of/selftest: Use selftest() macro throughout of/selftest: Fix GPIOs selftest to cover the 7th case of: fix recursive locking in of_get_next_available_child() documentation/devicetree: Fix a typo in exynos-dw-mshc.txt OF: convert devtree lock from rw_lock to raw spinlock of/exynos_g2d: Add Bindings for exynos G2D driver kbuild: create a rule to run the pre-processor on *.dts files input: Extend matrix-keypad device tree binding devicetree: Move NS2 LEDs binding into LEDs directory of: use platform_device_add powerpc/5200: Fix size to request_mem_region() call documentation/devicetree: Fix typos of: add 'const' to of_node_full_name parameter of: Output devicetree alias names in uevent DT: add vendor prefixes for Renesas and Toshiba ...
2013-02-20Merge tag 'spi-for-linus' of git://git.secretlab.ca/git/linuxLinus Torvalds36-1137/+2027
Pull SPI changes from Grant Likely: "Changes to both core spi code and spi device drivers. The driver changes are the usual set of bug fixes and platform enablement. Core code changes include: - More intelligent assignment of SPI bus numbers when using DT - Common mechanism for using gpios as CS lines - Pull checks for bits_per_word and transfer speed out of drivers and into core code - Ensure temporary DMA buffers are DMA safe" * tag 'spi-for-linus' of git://git.secretlab.ca/git/linux: (50 commits) spi: Document cs_gpios and cs_gpio in kernel-doc spi/of: Fix initialization of cs_gpios array spi/pxa2xx: add support for Lynxpoint SPI controllers spi/pxa2xx: add support for Intel Low Power Subsystem SPI spi/pxa2xx: add support for SPI_LOOP spi/pxa2xx: add support for runtime PM spi/pxa2xx: add support for DMA engine spi/pxa2xx: break out the private DMA API usage into a separate file spi/ath79: add shutdown handler spi/mips-lantiq: set SPI_MASTER_HALF_DUPLEX flag spi/mips-lantiq: make use of spi_finalize_current_message spi/bcm63xx: work around inability to keep CS up spi/davinci: use request_threaded_irq() to fix deadlock spi/orion: Use module_platform_driver() spi/bcm63xx: reject transfers unable to transfer spi: Ensure memory used for spi_write_then_read() is DMA safe spi/spi-mpc512x-psc: init mode bits supported by the driver spi/mpc512x-psc: don't use obsolet cell-index property spi: Remove erroneous __init, __exit and __exit_p() references in drivers spi/s3c64xx: fix checkpatch warnings and error ...
2013-02-13gpio: Make of_count_named_gpios() use new of_count_phandle_with_args()Grant Likely4-11/+10
This patch replaces the horribly coded of_count_named_gpios() with a call to of_count_phandle_with_args() which is far more efficient. This also changes the return value of of_gpio_count() & of_gpio_named_count() from 'unsigned int' to 'int' so that it can return an error code. All the users of that function are fixed up to correctly handle a negative return value. v2: Split GPIO portion into a separate patch Tested-by: Andreas Larsson <[email protected]> Signed-off-by: Grant Likely <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Rob Herring <[email protected]>
2013-02-10spi/of: Fix initialization of cs_gpios arrayAndreas Larsson1-1/+2
Using memset does not set an array of integers properly. Replace with a loop to set each element properly. Signed-off-by: Andreas Larsson <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-02-09Merge branch spi-next from ↵Grant Likely6-578/+1451
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git Signed-off-by: Grant Likely <[email protected]>
2013-02-08spi/pxa2xx: add support for Lynxpoint SPI controllersMika Westerberg2-3/+109
Intel Lynxpoint PCH Low Power Subsystem has two general purpose SPI controllers that are LPSS_SSP compatible. These controllers are enumerated from ACPI namespace with ACPI IDs INT33C0 and INT33C1. Signed-off-by: Mika Westerberg <[email protected]> Tested-by: Lu Cao <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-02-08spi/pxa2xx: add support for Intel Low Power Subsystem SPIMika Westerberg2-4/+135
Intel LPSS SPI is pretty much the same as the PXA27xx SPI except that it has few additional features over the original: o FIFO depth is 256 entries o RX FIFO has one watermark o TX FIFO has two watermarks, low and high o chip select can be controlled by writing to a register The new FIFO registers follow immediately the PXA27xx registers but then there are some additional LPSS private registers at offset 1k or 2k from the base address. For these private registers we add new accessors that take advantage of drv_data->lpss_base once it is resolved. We add a new type LPSS_SSP that can be used to distinguish the LPSS devices from others. Signed-off-by: Mika Westerberg <[email protected]> Tested-by: Lu Cao <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-02-08spi/pxa2xx: add support for SPI_LOOPMika Westerberg1-1/+4
This is useful when testing the functionality of the controller from userspace and there aren't any real SPI slave devices connected to the bus. Signed-off-by: Mika Westerberg <[email protected]> Tested-by: Lu Cao <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-02-08spi/pxa2xx: add support for runtime PMMika Westerberg1-6/+67
Drivers should put the device into low power states proactively whenever the device is not in use. Thus implement support for runtime PM and use the autosuspend feature to make sure that we can still perform well in case we see lots of SPI traffic within short period of time. Signed-off-by: Mika Westerberg <[email protected]> Tested-by: Lu Cao <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-02-08spi/pxa2xx: add support for DMA engineMika Westerberg5-3/+431
To be able to use DMA with this driver on non-PXA platforms we implement support for the generic DMA engine API. This lets user to use different DMA engines with little or no modification to the driver. Request lines and channel numbers can be passed to the driver from the platform specific data. The DMA engine implementation will be selected by default even on PXA platform. User can select the legacy DMA API by enabling Kconfig option CONFIG_SPI_PXA2XX_PXADMA. Signed-off-by: Mika Westerberg <[email protected]> Acked-by: Linus Walleij <[email protected]> Tested-by: Lu Cao <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-02-08spi/pxa2xx: break out the private DMA API usage into a separate fileMika Westerberg5-568/+712
The PXA SPI driver uses PXA platform specific private DMA implementation which does not work on non-PXA platforms. In order to use this driver on other platforms we break out the private DMA implementation into a separate file that gets compiled only when CONFIG_SPI_PXA2XX_PXADMA is set. The DMA functions are stubbed out if there is no DMA implementation selected (i.e we are building on non-PXA platform). While we are there we can kill the dummy DMA bits in pxa2xx_spi.h as they are not needed anymore for CE4100. Once this is done we can add the generic DMA engine support to the driver that allows usage of any DMA controller that implements DMA engine API. Signed-off-by: Mika Westerberg <[email protected]> Acked-by: Linus Walleij <[email protected]> Tested-by: Lu Cao <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-02-07sched/rt: Move rt specific bits into new header fileClark Williams1-1/+1
Move rt scheduler definitions out of include/linux/sched.h into new file include/linux/sched/rt.h Signed-off-by: Clark Williams <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Steven Rostedt <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2013-02-06driver-core: constify data for class_find_device()Michał Mirosław1-2/+2
All in-kernel users of class_find_device() don't really need mutable data for match callback. In two places (kernel/power/suspend_test.c, drivers/scsi/osd/osd_uld.c) this patch changes match callbacks to use const search data. The const is propagated to rtc_class_open() and power_supply_get_by_name() parameters. Note that there's a dev reference leak in suspend_test.c that's not touched in this patch. Signed-off-by: Michał Mirosław <[email protected]> Acked-by: Grant Likely <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-02-06spi/ath79: add shutdown handlerGabor Juhos1-0/+6
The SPI controller of the AR7xxx/AR9xxx SoCs have a special mode which allows the SoC to directly read data from SPI flash chips. In this mode, the content of the SPI flash chip can be accessed via a memory mapped region. During early init time, the kernel expects that the flash chip is accessible through that memory region because it reads board specific values (e.g. MAC address, WiFi calibration data) from the flash on various boards. This is working if the kernel is loaded directly by the bootloader because that leaves the SPI controller in the special mode. However it is not working in a kexec'd kernel because the SPI driver does not restore the special mode during shutdown. The patch adds a shutdown handler to fix this issue. Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-02-05spi/mips-lantiq: set SPI_MASTER_HALF_DUPLEX flagJohn Crispin1-0/+1
Due to hardware limitations of the spi/flash frontend of the EBU we need to set the SPI_MASTER_HALF_DUPLEX flag. Signed-off-by: Thomas Langer <[email protected]> Signed-off-by: John Crispin <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-02-05spi/mips-lantiq: make use of spi_finalize_current_messageJohn Crispin1-1/+1
Rather than calling m->complete() directly we choose the sane way and call spi_finalize_current_message instead. Signed-off-by: Thomas Langer <[email protected]> Signed-off-by: John Crispin <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-02-05spi/bcm63xx: work around inability to keep CS upJonas Gorski1-28/+106
This SPI controller does not support keeping CS asserted after sending a transfer. Since messages expected on this SPI controller are rather short, we can work around it for normal use cases by sending all transfers at once in a big full duplex stream. This means that we cannot change the speed between transfers if they require CS to be kept asserted, but these would have been rejected before anyway because of the inability of keeping CS asserted. Signed-off-by: Jonas Gorski <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-02-05spi/davinci: use request_threaded_irq() to fix deadlockMurali Karicheri1-2/+15
With RT pre-empt patch applied to Linux kernel, the irq handler will be force converted to an irq thread. spi driver can get back to back messages from the slave device. In such cases, IRQ thread doesn't get a chance to run to read the slave data. Hence the irq handler must be run in hard irq context to read/write data from slave device. Otherwise, the kernel goes into a deadlock. This patch fixes this issue when PREEMPT_RT_FULL is enabled in the kernel. A dummy thread function is provided to satisfy the request_threaded_irq() API. Passing a NULL for function also causes the irq handler to be executed in the thread context. Signed-off-by: Murali Karicheri <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-02-05spi/orion: Use module_platform_driver()Ezequiel Garcia1-11/+2
This patch reduces and simplifies initalization code by using module_platform_driver(). With this change it's necessary to remove the __init annotation to avoid section mismatch warnings. Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-02-05spi/bcm63xx: reject transfers unable to transferJonas Gorski1-49/+42
The hardware does not support keeping CS asserted after sending one FIFO buffer worth of data, so reject transfers requiring CS being kept asserted, either between transers or for a certain time after it, or exceeding the FIFO size. Signed-off-by: Jonas Gorski <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-02-05spi: Ensure memory used for spi_write_then_read() is DMA safeMark Brown1-1/+2
Use GFP_DMA in order to ensure that the memory we allocate for transfers in spi_write_then_read() can be DMAed. On most platforms this will have no effect. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-02-05spi/spi-mpc512x-psc: init mode bits supported by the driverAnatolij Gustschin1-0/+1
The driver should setup mode bits it supports, otherwise adding an SPI device might fail even if the driver supports the requested SPI mode. Signed-off-by: Anatolij Gustschin <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-02-05spi/mpc512x-psc: don't use obsolet cell-index propertyAnatolij Gustschin1-11/+5
Remove deprecated cell-index property and use spi alias to obtain the SPI PSC number used for SPI bus id. Signed-off-by: Anatolij Gustschin <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-02-05spi: Remove erroneous __init, __exit and __exit_p() references in driversGrant Likely9-23/+23
Some of the spi driver module remove hooks were annotated with __exit and referenced with __exit_p(). Presumably these were supposed to be __devinit, __devexit and __devexit_p() since __init/__exit for a probe/remove hook has never been correct. They also got missed during the big __devinit/__devexit purge since they didn't match the pattern. Remove then now to be rid of it. v2: purge __init also Reported-by: Arnd Bergmann <[email protected]> [Arnd set a patch cleaning up one, and then I found more] Signed-off-by: Grant Likely <[email protected]>
2013-02-05spi/s3c64xx: fix checkpatch warnings and errorJingoo Han1-20/+13
Fix checkpatch warnings and error as below: ERROR: "foo * bar" should be "foo *bar" WARNING: please, no space before tabs WARNING: quoted string split across lines WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-02-05spi/s3c64xx: Use devm_clk_get() and devm_request_irq()Jingoo Han1-26/+15
Use devm_clk_get() and devm_request_irq() rather than clk_get() and request_irq() to make cleanup paths more simple. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-02-05spi/imx: Add MODULE_ALIAS()Fabio Estevam1-0/+1
Add an entry for MODULE_ALIAS(). Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-02-05spi/tegra: remove checks for valid speedLaxman Dewangan2-6/+14
SPI core make sure that all transfer has proper speed set before calling low level spi transfer. Hence, it is not require to have check in spi driver. Remove the check for speed validity from transfer and use it directly. Signed-off-by: Laxman Dewangan <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-02-05spi: make sure all transfer has proper speed setLaxman Dewangan1-2/+4
When spi client does the spi transfer and if it does not set the speed for each transfer then set it as default of spi device in spi core before calling low level transfer. This will remove the extra check in low level driver for setting speed. Signed-off-by: Laxman Dewangan <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-02-05spi/ath79: avoid multiple initialization of the SPI controllerGabor Juhos1-17/+24
Currently we are initializing the SPI controller in the chip select line function, and that function is called once for each SPI device on the bus. If a board has multiple SPI devices, the controller will be initialized multiple times. Introduce ath79_spi_{en,dis}able helper functions, and call those from probe/response in order to avoid the mutliple initialization of the controller. Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-02-05spi/ath79: use gpio_request_oneGabor Juhos1-11/+11
Use gpio_request_one() instead of multiple gpiolib calls. Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: Grant Likely <[email protected]>