summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-fsl-lib.c
Commit message (Collapse)AuthorAgeFilesLines
* spi: fsl-(e)spi: simplify cleanup codeHeiner Kallweit2015-08-281-15/+0
| | | | | | | | Now that most cleanup is done automatically the remove functions can be significantly simplified. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: fsl-(e)spi: migrate to using devm_ functions to simplify cleanupHeiner Kallweit2015-08-281-4/+0
| | | | | | | | Migrate fsl-espi and fsl-spi to using the managed devm_ functions for resource handling. This simplifies the cleanup. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: fsl-(e)spi: Support compile as moduleEsben Haabendal2015-01-061-2/+12
| | | | | Signed-off-by: Esben Haabendal <eha@deif.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi/fsl: unnecessary double init_completion removedNicholas Mc Guire2014-12-241-2/+0
| | | | | | | | The double call to init_completion(&mpc8xxx_spi->done); is not needed presumably this is a editing mistake only. Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: fsl-(e)spi: migrate to generic master queueingHeiner Kallweit2014-12-031-58/+1
| | | | | | | | Migrates the fsl-(e)spi driver to use the generic master queuing. Avoids the "master is unqueued, this is deprecated" warning. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: fsl: Sort include headers alphabeticallyXiubo Li2014-09-291-3/+3
| | | | | | | | | | | | Sort all the include headers alphabetically for the freescale spi drivers. If the inlcude headers sorted out of order, maybe the best logical choice is to append new ones after the exist ones, while this may create a lot of potential for duplicates and conflicts for each diffenent changes will add new headers in the same location. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi/fsl: deal with a compile warningZhao Qiang2014-07-021-1/+1
| | | | | | | | | ret is unused when CONFIG_FSL_SOC defined, so return ret instead of -ENOMEM when the kzalloc fails to avoid it. Signed-off-by: Zhao Qiang <B45475@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* spi: fsl: Kill mpc8xxx_spi_cleanup and convert fsl_espi_setup to use ↵Axel Lin2014-04-141-6/+0
| | | | | | | | | | | | | | | devm_kzalloc In current code, master->cleanup and master->setup are not set in the same function. This makes it hard to read and not good for code maintain. One example is in fsl-spi.c, master->cleanup is overrided in mpc8xxx_spi_probe() which leads to a memory leak. This patch removes mpc8xxx_spi_cleanup() and converts fsl_espi_setup to use devm_kzalloc so we don't need to take care of freeing memory. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* spi: fsl-lib: Fix memory leak of pinfoAxel Lin2014-03-211-10/+4
| | | | | | | | | of_mpc8xxx_spi_probe() allocates memory for pinfo but the memory is not freed anywhere. of_mpc8xxx_spi_probe() is called in .probe() and pinfo should be freed in .remove(), so convert kzalloc to devm_kzalloc to fix the memory leak. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* spi: use dev_get_platdata()Jingoo Han2013-08-291-1/+1
| | | | | | | | Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* spi: spi-fsl-lib: Make mpc8xxx_spi_work staticSachin Kamat2013-06-041-1/+1
| | | | | | | 'mpc8xxx_spi_work' is used only in this file. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* spi/spi-fsl-spi: Make driver usable in CPU mode outside of an FSL_SOC ↵Andreas Larsson2013-04-071-0/+8
| | | | | | | | | | | | | | | | environment This makes the spi-fsl-spi driver usable in CPU mode outside of an FSL_SOC and even an powerpc environment by moving CPM mode functionality to a separate file that is only compiled and linked in an FSL_SOC environment and adding some ifdefs to hide types and functions or provide alternatives. For devicetree probing a "clock-frequency" property is used for clock frequency instead of calls to FSL_SOC-specific functions. Acked-by: Anton Vorontsov <anton@enomsg.org> Signed-off-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* spi: Remove HOTPLUG section attributesGrant Likely2012-12-071-2/+2
| | | | | | | | | | | | | | 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/devicetree: Move devicetree support code into spi directoryGrant Likely2012-04-131-1/+1
| | | | | | | | | The SPI device tree support code isn't shared by any other subsystem. It can be moved into the core drivers/spi directory and the exported symbol can be removed. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Rob Herring <rob.herring@calxeda.com>
* spi: reorganize driversGrant Likely2011-06-061-0/+236
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 <grant.likely@secretlab.ca> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Linus Walleij <linus.walleij@linaro.org>
OpenPOWER on IntegriCloud