History log of /drivers/spi/spi-nuc900.c
Revision Date Author Comments
e4745fef5595df7405ea24d6b21ba0e65332bb8e 28-Mar-2014 Axel Lin <axel.lin@ingics.com> spi: Remove unneeded include of linux/workqueue.h

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
fb534f10755954827a4b71b9a21f9b5fa93707a9 21-Mar-2014 Axel Lin <axel.lin@ingics.com> spi: nuc900: Fix setting multiple bits settings in register

The correct way to set multiple bits settings is always clear these
bit fields before set new settings.

Current code does not cause problem because the reset value of these
bit fields are 0, and these settings only set once during probe.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
8120ff8c48396a75cc9e5fa26a7a476479003fab 08-Feb-2014 Axel Lin <axel.lin@ingics.com> spi: nuc900: Remove unused fields from struct nuc900_spi

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
f7db1588d6028c97c098bb6445eaabc56a25fed8 20-Jan-2014 Axel Lin <axel.lin@ingics.com> spi: nuc900: Set SPI_LSB_FIRST for master->mode_bits if hw->pdata->lsb is true

Otherwise, spi_setup() fails with unsupported mode bits message.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
3a44623d5e1404b29786f1afd225d1aa04a4ae90 21-Jan-2014 Paul Gortmaker <paul.gortmaker@windriver.com> spi: delete non-required instances of include <linux/init.h>

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>
fe2ece4a933138bb1dcb66e9669a48e7c9215717 20-Dec-2013 Wei Yongjun <yongjun_wei@trendmicro.com.cn> spi: nuc900: remove redundant return value check of platform_get_resource()

Remove unneeded error handling on the result of a call
to platform_get_resource() when the value is passed to
devm_ioremap_resource().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
7519459da294680bbab1bd20a4e378d83a1c6d45 09-Dec-2013 Jingoo Han <jg1.han@samsung.com> spi: nuc900: Use devm_*() functions

Use devm_*() functions to make cleanup paths simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
702a4879ec337463f858c8ab467482cce260bf18 10-Sep-2013 Axel Lin <axel.lin@ingics.com> spi: bitbang: Let spi_bitbang_start() take a reference to master

Many drivers that use bitbang library have a leak on probe error paths.
This is because once a spi_master_get() call succeeds, we need an additional
spi_master_put() call to free the memory.

Fix this issue by moving the code taking a reference to master to
spi_bitbang_start(), so spi_bitbang_start() will take a reference to master on
success. With this change, the caller is responsible for calling
spi_bitbang_stop() to decrement the reference and spi_master_put() as
counterpart of spi_alloc_master() to prevent a memory leak.

So now we have below patten for drivers using bitbang library:

probe:
spi_alloc_master -> Init reference count to 1
spi_bitbang_start -> Increment reference count
remove:
spi_bitbang_stop -> Decrement reference count
spi_master_put -> Decrement reference count (reference count reaches 0)

Fixup all users accordingly.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Suggested-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
Acked-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
94c69f765f1b4a658d96905ec59928e3e3e07e6a 10-Sep-2013 Axel Lin <axel.lin@ingics.com> spi: bitbang: Let spi_bitbang_start() take a reference to master

Many drivers that use bitbang library have a leak on probe error paths.
This is because once a spi_master_get() call succeeds, we need an additional
spi_master_put() call to free the memory.

Fix this issue by moving the code taking a reference to master to
spi_bitbang_start(), so spi_bitbang_start() will take a reference to master on
success. With this change, the caller is responsible for calling
spi_bitbang_stop() to decrement the reference and spi_master_put() as
counterpart of spi_alloc_master() to prevent a memory leak.

So now we have below patten for drivers using bitbang library:

probe:
spi_alloc_master -> Init reference count to 1
spi_bitbang_start -> Increment reference count
remove:
spi_bitbang_stop -> Decrement reference count
spi_master_put -> Decrement reference count (reference count reaches 0)

Fixup all users accordingly.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Suggested-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
Acked-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
8074cf063e410a2c0cf1704c3b31002e21f5df7c 30-Jul-2013 Jingoo Han <jg1.han@samsung.com> spi: use dev_get_platdata()

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>
044d0bb620be2ecb02c7f8c2d4b547f7b7101811 15-Aug-2013 Axel Lin <axel.lin@ingics.com> spi: nuc900: Fix mode_bits setting

The code in nuc900_slave_select() supports handling SPI_CS_HIGH.
Thus set SPI_CS_HIGH bit in master->mode_bits to make it work.
Otherwise, spi_setup() will return unsupported mode bits error message if
SPI_CS_HIGH is set in the mode field of struct spi_device.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
30af9b558a56200bda5febd140d5b826581d1f15 09-Aug-2013 Mark Brown <broonie@linaro.org> spi/bitbang: Drop empty setup() functions

Now that the bitbang core does not require a setup() function we can
drop the check in the altera, nuc900 and xilinx drivers.

Signed-off-by: Mark Brown <broonie@linaro.org>
103ccee4ef1595468cf79c93068d253c7f2d85a8 10-Jul-2013 Stephen Warren <swarren@nvidia.com> spi: revert master->setup function removal for altera and nuc900

Commit 24778be "spi: convert drivers to use bits_per_word_mask" removed
what appeared to be redundant code from many drivers. However, it
appears that in the spi-bitbang case, these functions are required by
the spi-bitbang core, even if they don't do anything. Restore them.

For 3.12, the spi-bitbang core should be adjusted not to require these
callbacks to exist if they don't need to do anything.

This is the equivalent of Michal Simek's patch "spi/xilinx: Revert
master->setup function removal", applied to other affected drivers.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
26cb3bb14950ee017f311f3bf1ae82f95ee0be64 31-May-2013 Sachin Kamat <sachin.kamat@linaro.org> spi: spi-nuc900: Remove redundant platform_set_drvdata()

Setting platform data to NULL is not necessary.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
24778be20f87d5aadb19624fc768b3159fa43efc 22-May-2013 Stephen Warren <swarren@wwwdotorg.org> spi: convert drivers to use bits_per_word_mask

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>
fd4a319bc933ae93e68935b21924a9ca4ba2d060 07-Dec-2012 Grant Likely <grant.likely@secretlab.ca> spi: Remove HOTPLUG section attributes

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>
54ecf4f05637183ffd0ac98f906e45e271030a55 24-Aug-2012 Arnd Bergmann <arnd@arndb.de> ARM: w90x900: move platform_data definitions

Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the w90x900 include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: "Ben Dooks (embedded platforms)" <ben-linux@fluff.org>
Cc: "Wolfram Sang (embedded platforms)" <w.sang@pengutronix.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
90bbf4fdf2dc64aa7c20a93a9744c56a566baf26 01-Feb-2012 Tobias Klauser <tklauser@distanz.ch> spi/nuc900: Remove unnecessary memset of struct nuc900_spi

The memory allocated using kzalloc by spi_alloc_master so it doesn't
need to be set to 0 again.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
00d2952caa6b0b2cd113494ae39f08c4663f371b 24-Nov-2011 Axel Lin <axel.lin@gmail.com> spi/nuc900: Include linux/module.h

Include linux/module.h to fix below build error:

CC drivers/spi/spi-nuc900.o
drivers/spi/spi-nuc900.c:484: error: 'THIS_MODULE' undeclared here (not in a function)
drivers/spi/spi-nuc900.c:489: error: expected declaration specifiers or '...' before string constant
drivers/spi/spi-nuc900.c:489: warning: data definition has no type or storage class
drivers/spi/spi-nuc900.c:489: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/spi/spi-nuc900.c:489: warning: function declaration isn't a prototype
drivers/spi/spi-nuc900.c:490: error: expected declaration specifiers or '...' before string constant
drivers/spi/spi-nuc900.c:490: warning: data definition has no type or storage class
drivers/spi/spi-nuc900.c:490: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
drivers/spi/spi-nuc900.c:490: warning: function declaration isn't a prototype
drivers/spi/spi-nuc900.c:491: error: expected declaration specifiers or '...' before string constant
drivers/spi/spi-nuc900.c:491: warning: data definition has no type or storage class
drivers/spi/spi-nuc900.c:491: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/spi/spi-nuc900.c:491: warning: function declaration isn't a prototype
drivers/spi/spi-nuc900.c:492: error: expected declaration specifiers or '...' before string constant
drivers/spi/spi-nuc900.c:492: warning: data definition has no type or storage class
drivers/spi/spi-nuc900.c:492: warning: type defaults to 'int' in declaration of 'MODULE_ALIAS'
drivers/spi/spi-nuc900.c:492: warning: function declaration isn't a prototype
make[2]: *** [drivers/spi/spi-nuc900.o] Error 1
make[1]: *** [drivers/spi] Error 2
make: *** [drivers] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
97371fa99c1900a84a5220639edd726b35d73931 25-Nov-2011 Axel Lin <axel.lin@gmail.com> ARM: 7175/1: add subname parameter to mfp_set_groupg callers

commit 798681bf "ARM: 7158/1: add new MFP implement for NUC900"
adds subname parameter for mfp_set_groupg.

Thus add subname parameter to the callers.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Wan Zongshun <mcuos.com@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
940ab88962bc1aff3273a8356d64577a6e386736 05-Oct-2011 Grant Likely <grant.likely@secretlab.ca> drivercore: Add helper macro for platform_driver boilerplate

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>
ca632f556697d45d67ed5cada7cedf3ddfe0db4b 06-Jun-2011 Grant Likely <grant.likely@secretlab.ca> spi: reorganize drivers

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>