summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-efm32.c (follow)
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>
* spi: efm32: correct namespacing of location propertyUwe Kleine-König2014-07-111-1/+7
| | | | | | | | | Olof Johansson pointed out that usually the company name is picked as namespace prefix to specific properties. So expect "energymicro,location" but fall back to the previously introduced name "efm32,location". Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
*-. Merge remote-tracking branches 'spi/topic/drivers', 'spi/topic/dw', ↵Mark Brown2014-03-301-24/+15
|\ \ | | | | | | | | | 'spi/topic/efm32', 'spi/topic/ep93xx', 'spi/topic/fsl', 'spi/topic/fsl-dspi', 'spi/topic/fsl-espi' and 'spi/topic/gpio' into spi-next
| | * spi: efm32: use $vendor,$device scheme for compatible stringUwe Kleine-König2014-03-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wolfram Sang pointed out that "efm32,$device" is non-standard. So use the common scheme and prefix device with "efm32-". The old compatible string is left in place until arch/arm/boot/dts/efm32* is fixed. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
| | * spi: efm32: properly namespace location propertyUwe Kleine-König2014-03-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While reviewing an i2c driver for efm32 that needs a similar property Wolfram Sang pointed out that "location" is a too generic name for something that is efm32 specific. So add an appropriate namespace and fall back to the generic name in case of failure. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * spi: efm32: Clean up non-DT pathsAxel Lin2014-03-121-23/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a DT-only driver, so remove all non-DT paths. of_gpio_named_count() may fail, thus also add checking it's return value. efm32_spi_probe_dt() never fails, make it return void. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'spi/topic/bus-num', 'spi/topic/cleanup', ↵Mark Brown2014-03-301-5/+2
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/| 'spi/topic/clps711x', 'spi/topic/coldfire', 'spi/topic/completion' and 'spi/topic/davinci' into spi-next
| | * spi: Use reinit_completion at appropriate placesAxel Lin2014-02-101-1/+2
| |/ |/| | | | | | | | | | | | | Calling init_completion() once is enough. For the rest of the iterations, call reinit_completion() instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * spi: Remove explictly set bus_num and num_chipselect to default settingAxel Lin2014-02-161-4/+0
|/ | | | | | | | | | | | | The purpose of commit 1e8a52e18cfb "spi: By default setup spi_masters with 1 chipselect and dynamics bus number" is to avoid setting default value for bus_num and num_chipselect in spi master drivers. So let's remove the duplicate code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-By: David Daney <david.daney@cavium.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* spi: efm32: drop unused struct and fix size checkUwe Kleine-König2013-10-091-5/+1
| | | | | | | | | The variable efm32_spi_pdata_default origins from an earlier revision of the patch introducing the driver, its use was dropped because of review comments but I forgot to also drop the variable itself. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* spi: efm32: add spi_bitbang_stop to device remove callbackUwe Kleine-König2013-10-071-0/+2
| | | | | | | | | This call is needed to cleanup the resources requested by spi_bitbang_start in the probe callback. Noticed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'spi/topic/bitbang' into HEADMark Brown2013-10-071-1/+1
|\
| * spi: bitbang: Let spi_bitbang_start() take a reference to masterAxel Lin2013-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | spi: efm32: Don't call kfree() after spi_master_put()Axel Lin2013-09-231-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: efm32: Fix build errorAxel Lin2013-08-311-1/+1
| | | | | | | | | | | | | | | Obviously the of_device_id table name is wrong. Fix below build error: CC [M] drivers/spi/spi-efm32.o drivers/spi/spi-efm32.c:499:1: error: '__mod_of_device_table' aliased to undefined symbol 'efm32_uart_dt_ids' make[2]: *** [drivers/spi/spi-efm32.o] Error 1 make[1]: *** [drivers/spi] Error 2 make: *** [drivers] Error 2 Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* spi: spi-efm32: remove redundant dev_err call in efm32_spi_probe()Wei Yongjun2013-08-221-1/+0
| | | | | | | | | There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mark Brown <broonie@linaro.org>
* spi: new controller driver for efm32 SoCsUwe Kleine-König2013-08-091-0/+517
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>