summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-mpc52xx.c
Commit message (Collapse)AuthorAgeFilesLines
* 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>
*-. Merge remote-tracking branches 'spi/fix/complete', 'spi/fix/efm32', ↵Mark Brown2014-04-101-2/+4
|\ \ | | | | | | | | | 'spi/fix/omap2-mcspi' and 'spi/fix/qup' into spi-linus
| * | spi: Always check complete callback before calling itAxel Lin2014-04-031-2/+4
| |/ | | | | | | | | | | | | | | Since commit 1e25cd4729bd "spi: Do not require a completion", this checking is required to prevent NULL pointer dereference. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| |
| \
| \
| \
*---. \ Merge remote-tracking branches 'spi/topic/imx', 'spi/topic/init', ↵Mark Brown2014-03-301-13/+1
|\ \ \ \ | | |_|/ | |/| | | | | | '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: mpc52xx: Convert to use bits_per_word_maskAxel Lin2014-03-291-12/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | This controller only supports 8-bit word length. Set bits_per_word_mask so spi core will reject transfers that attempt to use an unsupported bits_per_word value. Also remove the duplicate code to test spi->mode, it is done by spi core. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * 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: Remove duplicate code to check chip_selectAxel Lin2014-02-121-3/+0
|/ | | | | | | | | In spi_add_device(), we have the code to validate spi->chip_select. So remove the duplicate code in various drivers. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* spi: use platform_{get,set}_drvdata()Jingoo Han2013-05-231-2/+2
| | | | | | | | | Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* spi: Remove HOTPLUG section attributesGrant Likely2012-12-071-4/+4
| | | | | | | | | | | | | | 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/mpc52xx: Fix device remove functionGuenter Roeck2012-08-221-2/+2
| | | | | | | | | | | | | | | | The call sequence spi_alloc_master/spi_register_master/spi_unregister_master is complete; it reduces the device reference count to zero, which results in device memory being freed. An extra call to spi_master_put is unnecessary and results in an access to free memory. At the same time, since the call to spi_unregister_master results in device memory being freed, it must no longer be accessed afterwards. To fix both problems, call spi_master_get to get an extra reference to the device, and call spi_master_put only after the last access to device data. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* spi/mpc52xx: Fix error handling in probe functionGuenter Roeck2012-08-221-2/+3
| | | | | | | | | The call to spi_master_put() is needed to free device memory. It must be called after spi_alloc_master, and must only be called after the device memory is no longer used. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* spi: By default setup spi_masters with 1 chipselect and dynamics bus numberGrant Likely2012-05-191-3/+0
| | | | | | | | | | | Trivial simplification. Instead of requiring spi master drivers to always set the bus number (even when a dynamic number is desired), this patch modifies spi_alloc_master() to initialize num_chipselect to 1 (because there will always be at least one CS) and bus_num to -1 for dynamic allocation. This simplifies the code needed to be written for drivers. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* drivercore: Add helper macro for platform_driver boilerplateGrant Likely2011-10-251-13/+1
| | | | | | | | | | | | | | 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 <grant.likely@secretlab.ca> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Reviewed-by: Magnus Damm <magnus.damm@gmail.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
* spi: reorganize driversGrant Likely2011-06-061-0/+579
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