- 06 9月, 2012 3 次提交
-
-
由 Sachin Kamat 提交于
module_spi_driver eliminates module_init and module_exit calls and makes the code simpler. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Daniel Mack 提交于
This patch adds DT bindings to the spi-gpio driver and some documentation about how to use it. Signed-off-by: NDaniel Mack <zonque@gmail.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Daniel Mack 提交于
The spi-gpio driver currently assumes the chipselect gpio number is stored in ->controller_data of the device's static board information. In devicetree environments, this information is unavailable and has to be derived from the DT node. This patch moves the gpio storage to the controller's private data so the DT bindings can easily build upon the driver. Signed-off-by: NDaniel Mack <zonque@gmail.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 28 8月, 2012 4 次提交
-
-
由 Guenter Roeck 提交于
Suspend and resume functions call spi_master_get() without matching spi_master_put(). The extra references are unnecessary and cause subsequent module unload attempts to fail. Drop the calls. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Acked-by: NKukjin Kim <kgene.kim@samsung.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Guenter Roeck 提交于
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. Drop it. Also, the device subsystem resets device driver data to NULL after the call to the remove function returns, so there is no need to do it here. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Guenter Roeck 提交于
The call to spi_unregister_master() in the device remove function frees device memory, and with it any device local data. However, device local data is still accessed after the call to spi_unregister_master(). Acquire a reference to the SPI master device and release it after cleanup is complete to solve the problem. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Guenter Roeck 提交于
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. The remove function accesses the freed memory after the call to spi_unregister_master(), _and_ it calls spi_master_put on the freed memory. Acquire a reference to the SPI master device and release it after cleanup is complete (with the existing spi_master_put) to solve the problem. Also, the device subsystem ensures that the remove function is only called once, and resets device driver data to NULL. Remove the respective check and drop the unnecessaary call to platform_set_drvdata(). Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 23 8月, 2012 13 次提交
-
-
由 Guenter Roeck 提交于
If the I2C bus master driver does not support the required functionality, the driver returns -ENODEV. This causes a silent probe failure without error message. Since the device has to be explicitly instantiated, and the user should know the correct bus, this event really reflects an error condition. Replace error return value with -EINVAL to trigger an error message showing that the probe function failed. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Roland Stigge 提交于
This patch adds device tree support to the spi-pl022 driver. Based on the initial patch by Alexandre Pereira da Silva <aletes.xgr@gmail.com> Signed-off-by: NRoland Stigge <stigge@antcom.de> Acked-by: NAlexandre Pereira da Silva <aletes.xgr@gmail.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Roland Stigge 提交于
This patch adds the ability for the driver to control the chip select directly. This enables independence from cs_control callbacks. Configurable via platform_data, to be extended as DT in the following patch. Based on the initial patch by Alexandre Pereira da Silva <aletes.xgr@gmail.com> Signed-off-by: NRoland Stigge <stigge@antcom.de> Acked-by: NAlexandre Pereira da Silva <aletes.xgr@gmail.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Guenter Roeck 提交于
This driver adds support for NXP SC18IS602/603 I2C to SPI bus bridge. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Guenter Roeck 提交于
The call to spi_unregister_master() in the device remove function frees device memory, and with it any device local data. However, device local data is still accessed after the call to spi_unregister_master(). Acquire a reference to the SPI master device and release it after cleanup is complete to solve the problem. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Guenter Roeck 提交于
The call to spi_unregister_master() in the device remove function frees device memory, and with it any device local data. However, device local data is still accessed after the call to spi_unregister_master(). Acquire a reference to the SPI master device and release it after cleanup is complete to solve the problem. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Guenter Roeck 提交于
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: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Guenter Roeck 提交于
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: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Guenter Roeck 提交于
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. Drop it. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Shubhrajyoti D 提交于
At remove we shouldnt be using the autosuspend timeout as we are calling pm_runtime_disable immediately after. Acked-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NShubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Shubhrajyoti D 提交于
Call the pm_runtime functions directly making room for possible pm optimisations. Also the runtime functions aren't just about enabling and disabling of clocks though it does enable clocks also. Acked-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NShubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Shubhrajyoti D 提交于
Remove the macro MOD_REG_BIT instead make the bit field modifications directly. This deletes a branch operation in cases where the the set is predecided. While at it optimise two sequential bit clear in one step. Acked-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NShubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Julia Lawall 提交于
Initialize return variable before exiting on an error path. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 18 8月, 2012 3 次提交
-
-
由 Shubhrajyoti D 提交于
Remove the call of platform_set_drvdata(pdev, NULL) as they are not needed anymore. Signed-off-by: NShubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Tobias Klauser 提交于
Instead of having to define the match table to NULL if CONFIG_OF isn't set, use the of_match_ptr() macro which will do this for us. Signed-off-by: NTobias Klauser <tklauser@distanz.ch> Acked-by: NRob Herring <rob.herring@calxeda.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Andrew Lunn 提交于
Replace the deprecated master->transfer with transfer_one_message() and allow the SPI subsystem handle all the queuing of messages. Signed-off-by: NAndrew Lunn <andrew@lunn.ch> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NSebastian Hesselbarth <sebastian.hesselbarth@googlemail.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 10 8月, 2012 1 次提交
-
-
由 Arnd Bergmann 提交于
When a device tree definition os an s3c64xx SPI master is missing a "controller-data" subnode, the newly added s3c64xx_get_slave_ctrldata function might use uninitialized memory in place of that node, which was correctly reported by gcc. Without this patch, building s3c6400_defconfig results in: drivers/spi/spi-s3c64xx.c: In function 's3c64xx_get_slave_ctrldata.isra.25': drivers/spi/spi-s3c64xx.c:841:5: warning: 'data_np' may be used uninitialized in this function [-Wuninitialized] Signed-off-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NThomas Abraham <thomas.abraham@linaro.org> Acked-by: NKukjin Kim <kgene.kim@samsung.com> Cc: Jaswinder Singh <jaswinder.singh@linaro.org> Cc: Grant Likely <grant.likely@secretlab.ca>
-
- 31 7月, 2012 2 次提交
-
-
由 Russell King 提交于
Remove the private DMA API implementation from spi-omap2-mcspi.c, making it use entirely the DMA engine API. Acked-by: NGrant Likely <grant.likely@secretlab.ca> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
Add DMA engine support to the OMAP SPI driver. This supplements the private DMA API implementation contained within this driver, and the driver can be independently switched at build time between using DMA engine and the private DMA API for the transmit and receive sides. Tested-by: NShubhrajyoti <shubhrajyoti@ti.com> Acked-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
- 23 7月, 2012 5 次提交
-
-
由 Michael Walle 提交于
This was formerly used to store the tclk value. This is now discovered using the clk API, rather than pass it as platform data. Signed-off-by: NMichael Walle <michael@walle.cc> Acked-by: NJason Cooper <jason@lakedaemon.net> Signed-off-by: NAndrew Lunn <andrew@lunn.ch> Acked-by: NSebastian Hesselbarth <sebastian.hesselbarth@googlemail.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Florian Fainelli 提交于
We are currently using an inferior or equal operator for comparing the transfer frequency with the clock frequency table. Because of this, we always end up selecting 20Mhz as a frequency, due to the inequality transfer hz <= 20 Mhz being always true. Fix this by reversing the inequality, which is how the comparison should be done. Signed-off-by: NFlorian Fainelli <florian@openwrt.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Thomas Langer 提交于
The external bus unit (EBU) found on the FALCON SoC has spi emulation that is designed for serial flash access. This driver has only been tested with m25p80 type chips. The hardware has no support for other types of spi peripherals. Signed-off-by: NThomas Langer <thomas.langer@lantiq.com> Signed-off-by: NJohn Crispin <blogic@openwrt.org> Cc: spi-devel-general@lists.sourceforge.net Cc: linux-mips@linux-mips.org Acked-by: NGrant Likely <grant.likely@secretlab.ca> Patchwork: https://patchwork.linux-mips.org/patch/3844/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
由 Andrew Lunn 提交于
Signed-off-by: NMichael Walle <michael@walle.cc> Signed-off-by: NAndrew Lunn <andrew@lunn.ch> Acked-by: NJason Cooper <jason@lakedaemon.net> Acked-by: NSebastian Hesselbarth <sebastian.hesselbarth@googlemail.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Arnd Bergmann 提交于
This warning recently appeared with omap2plus_defconfig: WARNING: drivers/spi/built-in.o(.devinit.text+0x3c4): Section mismatch in reference from the function omap2_mcspi_probe() to the function .init.text:omap2_mcspi_master_setup() The function __devinit omap2_mcspi_probe() references a function __init omap2_mcspi_master_setup(). If omap2_mcspi_master_setup is only used by omap2_mcspi_probe then annotate omap2_mcspi_master_setup with a matching annotation. The fix is obviously to mark the omap2_mcspi_master_setup function as __devinit, rather than __init. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NShubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 20 7月, 2012 2 次提交
-
-
由 Shubhrajyoti D 提交于
The dma_map and dma_unmap should have same parameter passed otherwise we get the below warn. ks8851 spi1.0: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x000000009f22] [ 2.066925] Modules linked in: [ 2.070312] [ 2.071929] [<c001c250>] (unwind_backtrace+0x0/0x130) from [<c0043d84>] (warn_slowpath_common+0x4c/0x64) [ 2.081909] [<c0043d84>] (warn_slowpath_common+0x4c/0x64) from [<c0043e30>] (warn_slowpath_fmt+0x30/0x40) [ 2.091949] [<c0043e30>] (warn_slowpath_fmt+0x30/0x40) from [<c0293824>] (check_unmap+0x6d0/0x7b0) [ 2.101348] [<c0293824>] (check_unmap+0x6d0/0x7b0) from [<c02939cc>] (debug_dma_unmap_page+0x64/0x70) [ 2.111053] [<c02939cc>] (debug_dma_unmap_page+0x64/0x70) from [<c03519a4>] (omap2_mcspi_txrx_dma+0x2d8/0x4fc) [ 2.121582] [<c03519a4>] (omap2_mcspi_txrx_dma+0x2d8/0x4fc) from [<c03524d8>] (omap2_mcspi_work.clone.4+0xf0/0x290) [ 2.132537] [<c03524d8>] (omap2_mcspi_work.clone.4+0xf0/0x290) from [<c0352900>] (omap2_mcspi_transfer_one_message+0x288/0x438) [ 2.144592] [<c0352900>] (omap2_mcspi_transfer_one_message+0x288/0x438) from [<c03503bc>] (spi_pump_messages+0x100/0x160) [ 2.156127] [<c03503bc>] (spi_pump_messages+0x100/0x160) from [<c006635c>] (kthread_worker_fn+0xac/0x180) [ 2.166168] [<c006635c>] (kthread_worker_fn+0xac/0x180) from [<c0066578>] (kthread+0x90/0x9c) [ 2.175140] [<c0066578>] (kthread+0x90/0x9c) from [<c00157fc>] (kernel_thread_exit+0x0/0x8) [ 2.183898] ---[ end trace d1830ce6e44292f2 ]--- Fix the warn by changing the unmap parameter. Reported-by: NRussell King - ARM Linux <linux@arm.linux.org.uk> Signed-off-by: NShubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Lars-Peter Clausen 提交于
This patch adds support for the I2C-SPI bridge which can be found on the Analog Devices AD-FMCOMMS1-EBZ board. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 19 7月, 2012 4 次提交
-
-
由 Mark Brown 提交于
They have very few users and they're both just doing a single register write so the advantage of having the macro is a bit limited. An inline function might make sense but it's as easy to just do the writes directly. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NKukjin Kim <kgene.kim@samsung.com>
-
由 Mark Brown 提交于
Saves some error handling and a small amount of code. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Reviewed-by: NSylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NKukjin Kim <kgene.kim@samsung.com>
-
由 Mark Brown 提交于
No call was being made by the GPIO driver to put the GPIO into output mode meaning that the calls to gpio_set_value() which were being done were not valid. A similar issue appears to exist with the DT GPIO requests but as they appear to be being used for pinmux it's less clear to me that we want to configure them. Without this fix Cragganmore systems can't talk to their SPI devices. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NKukjin Kim <kgene.kim@samsung.com>
-
由 Mark Brown 提交于
When gpio_request() fails the driver logged the failure but while it'd try to print an error code in the non-DT case it didn't pass the error code in so garbage would be logged and in the DT case the error wasn't logged. Further, in the non-DT case the error code was then overwritten with -EBUSY depriving the caller of information and breaking automatic probe deferral pushing back from the GPIO level. Also reformat the non-DT log message so it's not word wrapped and we can grep for it. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NKukjin Kim <kgene.kim@samsung.com>
-
- 16 7月, 2012 1 次提交
-
-
由 Steven King 提交于
The Coldfire 5251/5253 have a QSPI controller. Enable selection of the coldfire-qspi driver if the M525x is selected. Signed-off-by: NSteven King <sfking@fdwdc.com> Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
-
- 13 7月, 2012 2 次提交
-
-
由 Hui Wang 提交于
Use gpio_is_valid() to replace "gpio >= 0" or "gpio < 0". Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NHui Wang <jason77.wang@gmail.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Hui Wang 提交于
The config.speed_hz is just setted at the two lines ahead of it, obviously we don't need to copy the code to set the config.speed_hz again. Remove it for a cleanup. Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NHui Wang <jason77.wang@gmail.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-