summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-clps711x.c
Commit message (Collapse)AuthorAgeFilesLines
* spi: clps711x: Driver refactorAlexander Shiyan2016-07-071-43/+26
| | | | | | | | | This is a complex patch for refactoring CLPS711X SPI driver. This change adds devicetree support and removes board support. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* spi: clps711x: Migrate to the new clk subsystemAlexander Shiyan2014-09-241-32/+2
| | | | | | | | Currently clps711x arch have a fully functional CLK driver. This patch migrates clps711x-spi driver to use the new CLK subsystem. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: clps711x: Remove unnecessary platform_set_drvdata()Alexander Shiyan2014-06-061-2/+0
| | | | | | | | Drop call to platform_set_drvdata() as driver data is not used anywhere in the driver. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Mark Brown <broonie@linaro.org>
*-. Merge remote-tracking branches 'spi/topic/imx', 'spi/topic/init', ↵Mark Brown2014-03-301-1/+0
|\ \ | | | | | | | | | 'spi/topic/mpc512x-psc', 'spi/topic/mpc52xx', 'spi/topic/mxs', 'spi/topic/nuc900', 'spi/topic/oc-tiny' and 'spi/topic/octeon' into spi-next
| | * spi: delete non-required instances of include <linux/init.h>Paul Gortmaker2014-02-031-1/+0
| |/ | | | | | | | | | | | | | | | | | | None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | spi: clps711x: Convert to use master->max_speed_hzAxel Lin2014-03-271-7/+7
| | | | | | | | | | | | | | | | Set highest transfer speed to master->max_speed_hz and then we can remove hw->max_speed. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | spi: clps711x: Remove <mach/hardware.h> dependencyAlexander Shiyan2014-03-251-29/+57
| | | | | | | | | | | | | | | | | | | | This patch removes <mach/hardware.h> dependency. This is performed by replace hard coded used memory regions and interrupt to getting these values from resources passed to the driver. For the system-wide registers we now able to use SYSCON driver. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Mark Brown <broonie@linaro.org>
* | spi: clps711x: Remove duplicate code to set default bits_per_word and max speedAxel Lin2014-03-131-5/+4
| | | | | | | | | | | | | | | | | | | | In the implementation of __spi_validate(), spi core will set transfer bits_per_word and max speed as spi device default if it is not set for this transfer. So we can remove the same logic in spi_clps711x_setup_xfer() and spi_clps711x_transfer_one(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | spi: clps711x: Provide label argument for devm_gpio_requestAxel Lin2014-03-101-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | The label argument was removed by commit 989847967cd762 spi: clps711x: Use devm_gpio_request(), add it back. This makes it easier to know the gpio usage in /sys/kernel/debug/gpio. Also remove unnecessary gpio_is_valid() checking, devm_gpio_request() returns error if the requested gpio is invalid. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | spi: clps711x: Refactor to use core message parsingAxel Lin2014-02-201-52/+30
| | | | | | | | | | | | | | | | | | Convert to use default implementation of transfer_one_message() which provides standard handling of delays and chip select management. Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Mark Brown <broonie@linaro.org>
* | spi: clps711x: Use SPI-core "cs_gpios" property for storing GPIOsAlexander Shiyan2014-02-031-17/+14
| | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Mark Brown <broonie@linaro.org>
* | spi: clps711x: Add support for 1-8 BPW transfersAlexander Shiyan2014-02-031-23/+16
| | | | | | | | | | | | | | | | This patch adds support for 1 to 8 BPW to driver and removes excess BPW validation since this is already checked by SPI core. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Mark Brown <broonie@linaro.org>
* | spi: clps711x: Simplify handling of RX & TX buffersAlexander Shiyan2014-02-031-10/+7
|/ | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Mark Brown <broonie@linaro.org>
* spi: clps711x: Add MODULE_ALIAS to support module auto-loadingAxel Lin2014-01-141-0/+1
| | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* spi: clps711x: Use devm_gpio_request()Alexander Shiyan2014-01-101-20/+2
| | | | | | | | | This patch replaces gpio_request() with devm_ API. As a result this simplifies error path and eliminates "remove" function. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Mark Brown <broonie@linaro.org>
* tree-wide: use reinit_completion instead of INIT_COMPLETIONWolfram Sang2013-11-151-1/+1
| | | | | | | | | | | | Use this new function to make code more comprehensible, since we are reinitialzing the completion, not initializing. [akpm@linux-foundation.org: linux-next resyncs] Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13) Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge remote-tracking branch 'spi/topic/clps711x' into spi-nextMark Brown2013-10-251-2/+1
|\
| * Merge remote-tracking branch 'spi/fix/clps711x' into spi-clps711xMark Brown2013-10-031-3/+0
| |\ | | | | | | | | | | | | Conflicts: drivers/spi/spi-clps711x.c
| * | spi: clps711x: Remove redundant labelSachin Kamat2013-10-031-2/+1
| | | | | | | | | | | | | | | | | | | | | Remove empty label. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | Merge remote-tracking branch 'spi/topic/bfin' into spi-nextMark Brown2013-10-251-3/+1
|\ \ \ | |_|/ |/| |
| * | spi: clps711x: use devm_spi_register_master()Jingoo Han2013-09-261-3/+1
| | | | | | | | | | | | | | | | | | | | | Use devm_spi_register_master() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | spi/clps711x: drop clk_put for devm_clk_get in spi_clps711x_probe()Wei Yongjun2013-09-271-1/+0
|/ / | | | | | | | | | | | | | | devm_clk_get() is used so there is no reason to explicitly call clk_put() in probe or remove functions. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mark Brown <broonie@linaro.org>
* / spi: clps711x: Don't call kfree() after spi_master_put/spi_unregister_masterAxel Lin2013-09-101-2/+0
|/ | | | | | | | | Calling kfree() to clean up the memory obtained from spi_alloc_master() is wrong as this is done in spi_master_release() when spi_master->dev's refcount reaches zero. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* spi/clps711x: Remove unneeded devm_ deallocationsMark Brown2013-07-151-6/+0
| | | | | | The whole point of devm is that it'll do these automatically. Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'spi/topic/core' into spi-nextMark Brown2013-06-261-2/+0
|\
| * spi: remove unnecessary platform_set_drvdata()Jingoo Han2013-05-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Grant Likely <grant.likely@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | spi: convert drivers to use bits_per_word_maskStephen Warren2013-05-291-6/+1
|/ | | | | | | | | | Fill in the recently added spi_master.bits_per_word_mask field in as many drivers as possible. Make related cleanups, such as removing any redundant error-checking, or empty setup callbacks. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* spi: remove check for bits_per_word on transfer from low level driverLaxman Dewangan2013-02-051-1/+1
| | | | | | | | | | | | | | | | | | | The spi core make sure that each transfer structure have the proper setting for bits_per_word before calling low level transfer APIs. Hence it is no more require to check again in low level driver for this field whether this is set correct or not. Removing such code from low level driver. The txx9 change also removes a test for bits_per_word set to 0, and forcing it to 8 in that case. This can also be removed now since spi_setup() ensures spi->bits_per_word is not zero. if (!spi->bits_per_word) spi->bits_per_word = 8; Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* spi: Remove HOTPLUG section attributesGrant Likely2012-12-071-3/+3
| | | | | | | | | | | | | | 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 <wfp5p@virginia.edu> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* spi/clps711x: New SPI master driverAlexander Shiyan2012-12-051-0/+296
This patch add new driver for CLPS711X SPI master controller. Due to platform limitations driver supports only 8 bit transfer mode. Chip select control is handled via GPIO. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>