[PATCH] spi/sirf: Let device core handle pinctrl

2013-05-06 Thread Mark Brown
Since commit ab78029 (drivers/pinctrl: grab default handles from device
core) we can rely on device core for handling pinctrl so remove
devm_pinctrl_get_select_default() from the driver.

Signed-off-by: Mark Brown broo...@opensource.wolfsonmicro.com
---
 drivers/spi/spi-sirf.c |   12 +---
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c
index f59d417..899dc3b 100644
--- a/drivers/spi/spi-sirf.c
+++ b/drivers/spi/spi-sirf.c
@@ -19,7 +19,6 @@
 #include linux/of_gpio.h
 #include linux/spi/spi.h
 #include linux/spi/spi_bitbang.h
-#include linux/pinctrl/consumer.h
 
 #define DRIVER_NAME sirfsoc_spi
 
@@ -127,7 +126,6 @@ struct sirfsoc_spi {
void __iomem *base;
u32 ctrl_freq;  /* SPI controller clock speed */
struct clk *clk;
-   struct pinctrl *p;
 
/* rx  tx bufs from the spi_transfer */
const void *tx;
@@ -558,15 +556,10 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
master-bus_num = pdev-id;
sspi-bitbang.master-dev.of_node = pdev-dev.of_node;
 
-   sspi-p = pinctrl_get_select_default(pdev-dev);
-   ret = IS_ERR(sspi-p);
-   if (ret)
-   goto free_master;
-
sspi-clk = clk_get(pdev-dev, NULL);
if (IS_ERR(sspi-clk)) {
ret = -EINVAL;
-   goto free_pin;
+   goto free_master;
}
clk_prepare_enable(sspi-clk);
sspi-ctrl_freq = clk_get_rate(sspi-clk);
@@ -594,8 +587,6 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
 free_clk:
clk_disable_unprepare(sspi-clk);
clk_put(sspi-clk);
-free_pin:
-   pinctrl_put(sspi-p);
 free_master:
spi_master_put(master);
 err_cs:
@@ -618,7 +609,6 @@ static int  spi_sirfsoc_remove(struct platform_device *pdev)
}
clk_disable_unprepare(sspi-clk);
clk_put(sspi-clk);
-   pinctrl_put(sspi-p);
spi_master_put(master);
return 0;
 }
-- 
1.7.10.4


--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH] spi/omap2: Let device core handle pinctrl

2013-05-06 Thread Mark Brown
Since commit ab78029 (drivers/pinctrl: grab default handles from device
core) we can rely on device core for handling pinctrl so remove
devm_pinctrl_get_select_default() from the driver.

Signed-off-by: Mark Brown broo...@opensource.wolfsonmicro.com
---
 drivers/spi/spi-omap2-mcspi.c |7 ---
 1 file changed, 7 deletions(-)

diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 893c3d7..3777bd5 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -38,7 +38,6 @@
 #include linux/pm_runtime.h
 #include linux/of.h
 #include linux/of_device.h
-#include linux/pinctrl/consumer.h
 
 #include linux/spi/spi.h
 
@@ -1170,7 +1169,6 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
static int  bus_num = 1;
struct device_node  *node = pdev-dev.of_node;
const struct of_device_id *match;
-   struct pinctrl *pinctrl;
 
master = spi_alloc_master(pdev-dev, sizeof *mcspi);
if (master == NULL) {
@@ -1268,11 +1266,6 @@ static int omap2_mcspi_probe(struct platform_device 
*pdev)
if (status  0)
goto dma_chnl_free;
 
-   pinctrl = devm_pinctrl_get_select_default(pdev-dev);
-   if (IS_ERR(pinctrl))
-   dev_warn(pdev-dev,
-   pins are not configured from the driver\n);
-
pm_runtime_use_autosuspend(pdev-dev);
pm_runtime_set_autosuspend_delay(pdev-dev, SPI_AUTOSUSPEND_TIMEOUT);
pm_runtime_enable(pdev-dev);
-- 
1.7.10.4


--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH] spi/s3c64xx: Fix non-dmaengine usage

2013-04-18 Thread Mark Brown
The multiplatform conversion in commit 788437 (spi: s3c64xx: move to
generic dmaengine API) tested for the use of the Samsung-specific DMA
API with SAMSUNG_DMADEV when in fact S3C_DMA should be used. This
renderd DMA based transfers non-functional on platforms not using
dmaengine.

Signed-off-by: Mark Brown broo...@opensource.wolfsonmicro.com
---
 drivers/spi/spi-s3c64xx.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 4ab992b..6d6537d 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -34,7 +34,7 @@
 
 #include linux/platform_data/spi-s3c64xx.h
 
-#ifdef CONFIG_SAMSUNG_DMADEV
+#ifdef CONFIG_S3C_DMA
 #include mach/dma.h
 #endif
 
@@ -199,7 +199,7 @@ struct s3c64xx_spi_driver_data {
unsignedcur_speed;
struct s3c64xx_spi_dma_data rx_dma;
struct s3c64xx_spi_dma_data tx_dma;
-#ifdef CONFIG_SAMSUNG_DMADEV
+#ifdef CONFIG_S3C_DMA
struct samsung_dma_ops  *ops;
 #endif
struct s3c64xx_spi_port_config  *port_conf;
@@ -283,7 +283,7 @@ static void s3c64xx_spi_dmacb(void *data)
spin_unlock_irqrestore(sdd-lock, flags);
 }
 
-#ifdef CONFIG_SAMSUNG_DMADEV
+#ifdef CONFIG_S3C_DMA
 /* FIXME: remove this section once arch/arm/mach-s3c64xx uses dmaengine */
 
 static struct s3c2410_dma_client s3c64xx_spi_dma_client = {
-- 
1.7.10.4


--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH] spi/s3c64xx: Check for errors in dmaengine prepare_transfer()

2013-04-18 Thread Mark Brown
Don't silently ignore errors, report them.

Signed-off-by: Mark Brown broo...@opensource.wolfsonmicro.com
---
 drivers/spi/spi-s3c64xx.c |   26 +-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 6d6537d..5000586 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -421,6 +421,7 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master 
*spi)
dma_filter_fn filter = sdd-cntrlr_info-filter;
struct device *dev = sdd-pdev-dev;
dma_cap_mask_t mask;
+   int ret;
 
dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask);
@@ -428,11 +429,34 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master 
*spi)
/* Acquire DMA channels */
sdd-rx_dma.ch = dma_request_slave_channel_compat(mask, filter,
(void*)sdd-rx_dma.dmach, dev, rx);
+   if (!sdd-rx_dma.ch) {
+   dev_err(dev, Failed to get RX DMA channel\n);
+   ret = -EBUSY;
+   goto out;
+   }
+
sdd-tx_dma.ch = dma_request_slave_channel_compat(mask, filter,
(void*)sdd-tx_dma.dmach, dev, tx);
-   pm_runtime_get_sync(sdd-pdev-dev);
+   if (!sdd-tx_dma.ch) {
+   dev_err(dev, Failed to get TX DMA channel\n);
+   ret = -EBUSY;
+   goto out_rx;
+   }
+
+   ret = pm_runtime_get_sync(sdd-pdev-dev);
+   if (ret != 0) {
+   dev_err(dev, Failed to enable device: %d\n, ret);
+   goto out_tx;
+   }
 
return 0;
+
+out_tx:
+   dma_release_channel(sdd-tx_dma.ch);
+out_rx:
+   dma_release_channel(sdd-rx_dma.ch);
+out:
+   return ret;
 }
 
 static int s3c64xx_spi_unprepare_transfer(struct spi_master *spi)
-- 
1.7.10.4


--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH] MAINTAINERS: Add git repository and update my address

2013-04-18 Thread Mark Brown
Signed-off-by: Mark Brown broo...@opensource.wolfsonmicro.com
---
 MAINTAINERS |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index a3be666..0c9c104 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7431,9 +7431,10 @@ S:   Maintained
 F: drivers/clk/spear/
 
 SPI SUBSYSTEM
-M: Mark Brown broo...@opensource.wolfsonmicro.com
+M: Mark Brown broo...@kernel.org
 M: Grant Likely grant.lik...@linaro.org
 L: spi-devel-general@lists.sourceforge.net
+T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
 Q: http://patchwork.kernel.org/project/spi-devel-general/list/
 S: Maintained
 F: Documentation/spi/
-- 
1.7.10.4


--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH V4 2/5] spi: s3c64xx: added support for polling mode

2013-04-16 Thread Mark Brown
On Tue, Apr 16, 2013 at 04:58:47PM +0530, Girish KS wrote:
 On Tue, Apr 16, 2013 at 4:50 PM, Mark Brown broo...@kernel.org wrote:

  I'm missing patch 1 of this series.

 its already  merged to stable tree after your review

The patch numbering should reflect what you're posting.  If you're only
sending four patches they should be numbered 1-4, otherwise it looks
like there's something missing.  The goal with the numbers is to help
people get the patches in the right order, the name should be enough to
associate with other versions of the same patch.

--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH] spi/s3c64xx: Convert to bits_per_word_mask

2013-04-01 Thread Mark Brown
The core can do the validation for us.

Signed-off-by: Mark Brown broo...@opensource.wolfsonmicro.com
---
 drivers/spi/spi-s3c64xx.c |   10 +-
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 7f5f8ee..27ff669 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -911,15 +911,6 @@ static int s3c64xx_spi_setup(struct spi_device *spi)
 
spin_unlock_irqrestore(sdd-lock, flags);
 
-   if (spi-bits_per_word != 8
-spi-bits_per_word != 16
-spi-bits_per_word != 32) {
-   dev_err(spi-dev, setup: %dbits/wrd not supported!\n,
-   spi-bits_per_word);
-   err = -EINVAL;
-   goto setup_exit;
-   }
-
pm_runtime_get_sync(sdd-pdev-dev);
 
/* Check if we can provide the requested rate */
@@ -1237,6 +1228,7 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
master-unprepare_transfer_hardware = s3c64xx_spi_unprepare_transfer;
master-num_chipselect = sci-num_cs;
master-dma_alignment = 8;
+   master-bits_per_word_mask = BIT(32 - 1) | BIT(16 - 1) | BIT(8 - 1);
/* the spi-mode bits understood by this driver: */
master-mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
 
-- 
1.7.10.4


--
Own the Future-Intelreg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi/s3c64xx: add CONFIG_PM_SLEEP to suspend/resume functions

2013-04-01 Thread Mark Brown
On Fri, Mar 22, 2013 at 11:09:08AM +0900, Jingoo Han wrote:
 Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following
 build warning when CONFIG_PM_SLEEP is not selected. This is because
 sleep PM callbacks defined by SET_SYSTEM_SLEEP_PM_OPS are only used
 when the CONFIG_PM_SLEEP is enabled.

Applied, thanks.

--
Own the Future-Intelreg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 3/4] spi: s3c64xx: add gpio quirk for controller

2013-02-07 Thread Mark Brown
On Tue, Feb 05, 2013 at 03:09:43PM -0800, Girish K S wrote:
 This patch adds support for spi controllers with
 dedicated clk/miso/mosi/cs pins. It skips the gpio
 parsing and initialization for controllers that
 have dedicated pins.

   if (sdd-tgl_spi != spi) { /* if last mssg on diff device */
   /* Deselect the last toggled device */
   cs = sdd-tgl_spi-controller_data;
 - gpio_set_value(cs-line,
 - spi-mode  SPI_CS_HIGH ? 0 : 1);
 + if (!(sdd-port_conf-quirks  S3C64XX_SPI_QUIRK_GPIO))
 + gpio_set_value(cs-line,
 + spi-mode  SPI_CS_HIGH ? 0 : 1);
   }

This isn't going to work with system designs which ignore the /CS line
the controller has and just use a GPIO instead.  This is very common,
for example when connecting multiple devices to the same SPI bus.

It seems like there's really two changes here.  One change is making the
provision of pinmux information optional, the other is allowing the user
to use the controller /CS management rather than using GPIO.

--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH v6 08/10] spi: omap2-mcspi: convert to dma_request_slave_channel_compat()

2013-01-30 Thread Mark Brown
On Wed, Jan 30, 2013 at 02:00:27AM -0500, Matt Porter wrote:
 Convert dmaengine channel requests to use
 dma_request_slave_channel_compat(). This supports the DT case of
 platforms requiring channel selection from either the OMAP DMA or
 the EDMA engine. AM33xx only boots from DT and is the only user
 implementing EDMA so in the !DT case we can default to the OMAP DMA
 filter.

Acked-by: Mark Brown broo...@opensource.wolfsonmicro.com

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 1/3] spi: Add helper functions for setting up transfers

2013-01-26 Thread Mark Brown
On Wed, Jan 09, 2013 at 06:31:09PM +0100, Lars-Peter Clausen wrote:

 The second function spi_sync_transfer() takes a SPI device and an array of
 spi_transfers. It will allocate a new spi_message (on the stack) and add all
 transfers in the array to the message. Finally it will call spi_sync() on the
 message.

Reviewed-by: Mark Brown broo...@opensource.wolfsonmicro.com

for the helpers, we should try to get them merged separately to the
coccinelle rules if there's issue with those.

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH] spi: Ensure memory used for spi_write_then_read() is DMA safe

2013-01-26 Thread Mark Brown
Use GFP_DMA in order to ensure that the memory we allocate for transfers
in spi_write_then_read() can be DMAed. On most platforms this will have
no effect.

Signed-off-by: Mark Brown broo...@opensource.wolfsonmicro.com
---
 drivers/spi/spi.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 19ee901..14d0fba 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1656,7 +1656,8 @@ int spi_write_then_read(struct spi_device *spi,
 * using the pre-allocated buffer or the transfer is too large.
 */
if ((n_tx + n_rx)  SPI_BUFSIZ || !mutex_trylock(lock)) {
-   local_buf = kmalloc(max((unsigned)SPI_BUFSIZ, n_tx + n_rx), 
GFP_KERNEL);
+   local_buf = kmalloc(max((unsigned)SPI_BUFSIZ, n_tx + n_rx),
+   GFP_KERNEL | GFP_DMA);
if (!local_buf)
return -ENOMEM;
} else {
-- 
1.7.10.4


--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi: erase pointer to drvdata on removal

2013-01-13 Thread Mark Brown
On Thu, Nov 01, 2012 at 02:05:36PM -0400, Vivien Didelot wrote:
 As for i2c-core, let the SPI core handle the removal of the device's
 drvdata, after a remove() or a probe() failure.

Any driver that notices this change is buggy, the driver shouldn't
use a drvdata value that it didn't set.  I had thought this stuff had
all been removed from I2C and either dropped or factored out into the
driver core...

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH] MAINTAINERS: Add myself as a backup maintainer for SPI

2013-01-13 Thread Mark Brown
Grant said he would find it helpful for me to continue handling some of
the legwork for SPI so add myself to MAINTAINERS so I get CCed on
patches.

Signed-off-by: Mark Brown broo...@opensource.wolfsonmicro.com
---
 MAINTAINERS |1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index ae9f8b8..6332eff 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7391,6 +7391,7 @@ F:drivers/clk/spear/
 
 SPI SUBSYSTEM
 M: Grant Likely grant.lik...@secretlab.ca
+M: Mark Brown broo...@opensource.wolfsonmicro.com
 L: spi-devel-general@lists.sourceforge.net
 Q: http://patchwork.kernel.org/project/spi-devel-general/list/
 T: git git://git.secretlab.ca/git/linux-2.6.git
-- 
1.7.10.4


--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH] spi/s3c64xx: Complain if we fail to set a transfer speed

2013-01-04 Thread Mark Brown
Signed-off-by: Mark Brown broo...@opensource.wolfsonmicro.com
---
 drivers/spi/spi-s3c64xx.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index ad93231..6495352 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -957,6 +957,8 @@ static int s3c64xx_spi_setup(struct spi_device *spi)
if (spi-max_speed_hz = speed) {
spi-max_speed_hz = speed;
} else {
+   dev_err(spi-dev, Can't set %dHz transfer speed\n,
+   spi-max_speed_hz);
err = -EINVAL;
goto setup_exit;
}
-- 
1.7.10.4


--
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi: Add the flag indicate to registe new device as children of master or not.

2012-12-18 Thread Mark Brown
On Tue, Dec 18, 2012 at 11:29:34AM -0500, Jun Chen wrote:

   * @master: Controller to which device is connected
 + * device_was_children_of_master is flag which the device is registed
 + * as the children of the bus

This isn't a kerneldoc style comment (it needs the @XXX: format).  The
name is also extremely long, can't we think of something more concise?

 - spi-dev.parent = master-dev;
 + if (device_was_children_of_master == true)
 + spi-dev.parent = master-dev;
 + else
 + spi-dev.parent = dev;

Can you provide an example of where this is useful?  Your changelog
didn't make it clear and the code doesn't make it obvious either.

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi: Remove SPI_BUFSIZ restriction on spi_write_then_read()

2012-12-06 Thread Mark Brown
On Thu, Dec 06, 2012 at 02:04:27PM +, Grant Likely wrote:

 Alright, applied. I've also merged in your spi-next tree. Let me know if
 that causes problems because it needs to be rebased.

No problem - do you just want to take over the SPI tree again or should
I carry on applying things?

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi: Fix comparison of different integer types

2012-12-06 Thread Mark Brown
On Thu, Dec 06, 2012 at 11:35:47PM +, Grant Likely wrote:
 Fix problem discovered with sparse:
 + drivers/spi/spi.c:1554:37: sparse: incompatible types in comparison 
 expression (different signedness)
 drivers/spi/spi.c: In function 'spi_write_then_read':
 drivers/spi/spi.c:1554:23: warning: comparison of distinct pointer types 
 lacks a cast [enabled by default]
 
 The change to SPI_BUFSIZ was introduced in commit b3a223ee2, spi:
 Remove SPI_BUFSIZ restriction on spi_write_then_read()

Thanks.

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi: Remove SPI_BUFSIZ restriction on spi_write_then_read()

2012-12-05 Thread Mark Brown
On Thu, Dec 06, 2012 at 12:00:26AM +, Grant Likely wrote:

 Looks good to me. Probably 3.9 material though.

 Acked-by: Grant Likely grant.lik...@secretlab.ca

Hrm, I'd be inclined to apply it now - it's isolated enough that it can
be reverted if it explodes and we have the -rc cycle to notice any
problems.

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH] spi: Remove SPI_BUFSIZ restriction on spi_write_then_read()

2012-12-01 Thread Mark Brown
In order to avoid constantly allocating and deallocating there is a fixed
buffer which spi_write_then_read() uses for transfers, with an early error
check to ensure that the transfer fits within the buffer. This limits the
size of transfers to this size, currently max(32, SMP_CACHE_BYTES).

Since we can dynamically allocate and in fact already have a fallback
to do so when there is contention for the fixed buffer remove this
restriction and instead dynamically allocate a suitably sized buffer if
the transfer won't fit.

Signed-off-by: Mark Brown broo...@opensource.wolfsonmicro.com
---
 drivers/spi/spi.c |   24 +++-
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index c4f7d71..224b7bc 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1646,12 +1646,18 @@ int spi_write_then_read(struct spi_device *spi,
struct spi_transfer x[2];
u8  *local_buf;
 
-   /* Use preallocated DMA-safe buffer.  We can't avoid copying here,
-* (as a pure convenience thing), but we can keep heap costs
-* out of the hot path ...
+   /* Use preallocated DMA-safe buffer if we can.  We can't avoid
+* copying here, (as a pure convenience thing), but we can
+* keep heap costs out of the hot path unless someone else is
+* using the pre-allocated buffer or the transfer is too large.
 */
-   if ((n_tx + n_rx)  SPI_BUFSIZ)
-   return -EINVAL;
+   if ((n_tx + n_rx)  SPI_BUFSIZ || !mutex_trylock(lock)) {
+   local_buf = kmalloc(max(SPI_BUFSIZ, n_tx + n_rx), GFP_KERNEL);
+   if (!local_buf)
+   return -ENOMEM;
+   } else {
+   local_buf = buf;
+   }
 
spi_message_init(message);
memset(x, 0, sizeof x);
@@ -1664,14 +1670,6 @@ int spi_write_then_read(struct spi_device *spi,
spi_message_add_tail(x[1], message);
}
 
-   /* ... unless someone else is using the pre-allocated buffer */
-   if (!mutex_trylock(lock)) {
-   local_buf = kmalloc(SPI_BUFSIZ, GFP_KERNEL);
-   if (!local_buf)
-   return -ENOMEM;
-   } else
-   local_buf = buf;
-
memcpy(local_buf, txbuf, n_tx);
x[0].tx_buf = local_buf;
x[1].rx_buf = local_buf + n_tx;
-- 
1.7.10.4


--
Keep yourself connected to Go Parallel: 
DESIGN Expert tips on starting your parallel project right.
http://goparallel.sourceforge.net/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 1/2] Revert spi/pl022: fix spi-pl022 pm enable at probe

2012-10-17 Thread Mark Brown
On Fri, Oct 05, 2012 at 05:51:11PM +0200, Ulf Hansson wrote:
 From: Ulf Hansson ulf.hans...@linaro.org
 
 This reverts commit 6887237cd7da904184dab2750504040c68f3a080.

Applied, thanks.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 1/2] spi: mxs: Assign message status after transfer finished

2012-10-17 Thread Mark Brown
On Sun, Oct 14, 2012 at 04:32:55AM +0200, Marek Vasut wrote:
 In the current code implementing the MXS SPI driver, every transferred
 message had assigned status = 0, which is not correct. Properly assign
 status returned from the I/O functions.

Applied both, thanks.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi: s3c64xx: use clk_prepare_enable and clk_disable_unprepare

2012-10-17 Thread Mark Brown
On Wed, Oct 03, 2012 at 08:30:12AM +0900, Thomas Abraham wrote:
 Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
 calls as required by common clock framework.

Applied, thanks.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 0/3] spi/bcm63xx: misc cleanups and fixes

2012-10-17 Thread Mark Brown
On Wed, Oct 03, 2012 at 11:56:52AM +0200, Florian Fainelli wrote:
 Hi Mark, Grant,
 
 This small series contains cleanups and fixes that had already been previously
 merged by Grant in his tree, but not pushed upstream. I am resending them
 rebased on Mark's spi-next branch.

Applied all, thanks.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH v3] SPI: McSPI: allow configuration of pin directions

2012-10-17 Thread Mark Brown
On Sun, Oct 07, 2012 at 06:19:44PM +0200, Daniel Mack wrote:
 Allow D0 to be an input and D1 to be an output, configurable via
 platform data and a new DT property.

Applied, thanks.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 1/1] spi: omap2-mcspi: add option to configure output line for McSPI driver

2012-10-17 Thread Mark Brown
On Mon, Oct 08, 2012 at 04:39:40PM -0600, Stan Hu wrote:
 McSPI driver previously assumed that D0 was input (MISO) and D1 was output 
 (MOSI).
 This forces the hardware designer to wire all SPI peripherals in this way when
 it should be a software configuration option.

I applied a similar patch from Daniel Mack just now; please check if
there's anything he's missing.  His patch was sent earlier and also adds
DT bindings.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi/pl022: Activate resourses before deactivate them in suspend

2012-10-13 Thread Mark Brown
On Fri, Oct 12, 2012 at 04:42:53PM +0200, Ulf Hansson wrote:
 Hi Mark,
 
 Just a kind remember on this. Do you see any problem merging this?
 
 Kind regards
 Ulf Hansson
 
 On 5 October 2012 09:43, Ulf Hansson ulf.hans...@stericsson.com wrote:

Don't top post and don't send contentless nags less than a week after
your original mail, especially not in the merge window when only urgent
bug fixes should be applied.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 0/3] spi/bcm63xx: misc cleanups and fixes

2012-10-11 Thread Mark Brown
On Thu, Oct 11, 2012 at 02:24:03PM +0200, Florian Fainelli wrote:

 I did not get any feedback from you on this, is it ok from your perspective?

My perspective is that you sent this in the merge window so there's no
rush to look at it until after the merge window.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi: spi-rspi: fix build error for the latest shdma driver

2012-10-05 Thread Mark Brown
On Thu, Aug 02, 2012 at 05:17:33PM +0900, Shimoda, Yoshihiro wrote:
 Because the latest shdma driver changed, it caused build error in
 the spi-rspi driver. This patch fixed the build error.

Applied, thanks.  This should really have been done as part of the shdma
update...

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi: tsc2005: delete soon-obsolete e-mail address

2012-10-05 Thread Mark Brown
On Fri, Aug 17, 2012 at 02:47:30PM +0300, Aaro Koskinen wrote:
 Delete soon-obsolete e-mail address.

Applied, thanks.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH V2 1/3] Revert spi/pl022: fix spi-pl022 pm enable at probe

2012-10-05 Thread Mark Brown
On Thu, Oct 04, 2012 at 10:04:39AM +0200, Ulf Hansson wrote:
 From: Ulf Hansson ulf.hans...@linaro.org
 
 This reverts commit 6887237cd7da904184dab2750504040c68f3a080.
 
 This reverts is done due to earlier wrong commit, which is
 also reverted. Revert spi/pl022: enable runtime PM

Why?  Wrong isn't terribly detailed...

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH V2 0/3] spi: spi-pl022: Fixup use of runtime pm

2012-10-05 Thread Mark Brown
On Fri, Oct 05, 2012 at 02:21:15PM +0200, Linus Walleij wrote:

 I think patch 1/3 and 2/3 needs to go into the -rc fixes.

 Who's funneling this now? Grant or Mark?

Me still for the moment.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: Continuous streaming SPI transfer

2012-10-04 Thread Mark Brown
On Fri, Sep 28, 2012 at 01:09:25AM +0300, Nuutti Kotivuori wrote:

 There seems to be no way to prevent the deactivation and reactivation of
 the clock and everything between separate transfers - and a single
 transfer is bounded in size and no progress is reported for it. Even
 within a single transfer, it would seem that an earlier transfer is

This sounds more like you've got an IIO application (or audio) than a
SPI one - the hardware is the same but you're thinking about it in a
completely different way and so a separate subsystem makes sense.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 1/3] Revert spi/pl022: fix spi-pl022 pm enable at probe

2012-10-03 Thread Mark Brown
On Wed, Oct 03, 2012 at 03:43:16PM +0200, Ulf Hansson wrote:

 Heard from Linus Walleij that you Mark has been helping out merging
 spi patches, did not know that when sending out this series. Anyway,
 do you guys see any issues merging this?

 [PATCH 1/3] Revert spi/pl022: fix spi-pl022 pm enable at probe
 [PATCH 2/3] Revert spi/pl022: enable runtime PM
 [PATCH 3/3] spi: spi-pl022: Minor simplification for runtime pm

If someone could send the patches I'll take a look...  some explanation
as to why we're reverting things would be helpful.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 1/3] Revert spi/pl022: fix spi-pl022 pm enable at probe

2012-10-03 Thread Mark Brown
On Wed, Oct 03, 2012 at 04:28:34PM +0200, Ulf Hansson wrote:

 I will do a resend and include some explanation for the reverts in the
 cover-letter.

It'd be good if the explanation could be in the commit logs so that
people reading history can understand things.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[GIT PULL] SPI updates for 3.7

2012-10-02 Thread Mark Brown
The following changes since commit 979570e02981d4a8fc20b3cc8fd651856c98ee9d:

  Linux 3.6-rc7 (2012-09-23 18:10:57 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git tags/spi-3.7

for you to fetch changes up to 536a53a300d0d40152796eefb0a9e6e36ca37f7d:

  spi: remove completely broken Tegra driver (2012-10-01 13:29:49 +0100)

I'm still looking after SPI for the time being while Grant's trying to
catch up with things.


spi: Updates for v3.7

No framework work here, only a bunch of driver updates of varying sizes:

- Factoring out of the core hardware support from the MXS MMC driver by
  Marek Vasut to allow the hardware to also be used for SPI.
- Lots of error handling cleanups from Guenter Roeck
- Removal of the existing Tegra driver which is quite comprehensively
  broken as detailed in the changelog for the removal.
- DT suppport for the PL022 and GPIO drivers.
- pinctrl support for OMAP and PL022.


Andrew Lunn (1):
  spi: Refactor spi-orion to use SPI framework queue.

Daniel Mack (2):
  spi: spi-gpio: store chipselect information in private structure
  spi: spi-gpio: Add DT bindings

Guenter Roeck (12):
  spi/pl022: Fix device remove function
  spi/mpc52xx: Fix error handling in probe function
  spi/mpc52xx: Fix device remove function
  spi/mpc52xx-psc: Avoid access to freed memory in device remove function
  spi/mpc512x-psc: Avoid access to freed memory in device remove function
  spi: Master driver for NXP SC18IS602/603
  spi/sc18is602: Return -EINVAL for probe failures due to I2C function 
mismatch
  spi/stmp: Fix device remove function
  spi/tegra: Fix device remove function
  spi/topcliff-pch: Fix device remove function
  spi/s3c64xx: Drop extra calls to spi_master_get in suspend/remove 
functions
  spi/mxs: Fix device remove function

Julia Lawall (2):
  drivers/spi/spi-s3c24xx.c: fix error return code
  spi: spi-sh-hspi: drop frees of devm_ alloc'd data

Knut Wohlrab (1):
  spi/imx: set the inactive state of the clock according to the clock 
polarity

Linus Walleij (2):
  spi/pl022: use more managed resources
  spi/pl022: get/put resources on suspend/resume

Marek Vasut (16):
  mmc: spi: Move SSP register definitions into separate file
  mmc: spi: Rename IMX2[38]_MMC to IMX2[38]_SSP
  mmc: spi: Add necessary bits into mxs-spi.h
  mmc: spi: Pull out parts shared between MMC and SPI
  mmc: spi: Pull out the SSP clock configuration function
  spi/mxs: Add SPI driver for mx233/mx28
  mmc: spi: Pull out common DMA parts from MXS MMC
  spi/mxs: Add DMA support into SPI driver
  spi/mxs: Add SSP/SPI device tree documentation
  mxs/spi: Restart the block after unsuccessful transfer
  mxs/spi: Fix misuse of init_completion
  mxs/spi: Fix issues when doing long continuous transfer
  mxs/spi: Increment the transfer length only if transfer succeeded
  mxs/spi: Decrement the DMA/PIO border
  mxs/spi: Rework the mxs_ssp_timeout to be more readable
  spi/mxs: Make the SPI block clock speed configurable via DT

Mark Brown (4):
  spi/gpio: Fix stub for spi_gpio_probe_dt()
  Merge tag 'v3.6-rc6' into spi-drivers
  Merge tag 'v3.6-rc6' into spi-mxs
  Merge branches 'spi-drivers' and 'spi-mxs' into spi-next

Matt Porter (1):
  spi: omap2-mcspi: add pinctrl support

Patrice Chotard (1):
  spi/pl022: adopt pinctrl support

Roland Stigge (5):
  spi/pl022: Add chip select handling via GPIO
  spi/pl022: Add devicetree support
  spi/dt: DT bindings documentation: num-cs property for SPI controllers
  spi/pl022: Fix chipselects pointer computation
  spi/pl022: Devicetree support w/o platform data

Sachin Kamat (1):
  spi: spi-tle62x0: Use module_spi_driver macro

Shubhrajyoti D (5):
  spi: omap2-mcspi: Remove the call to platform_set_drvdata(pdev, NULL)
  spi: omap2-mcspi: Remove the macro MOD_REG_BIT
  spi: omap2-mcspi: Call pm_runtime_* functions directly
  spi: omap2-mcspi: At remove dont use the runtime_autosuspend calls
  spi: omap2-mcspi: Cleanup the omap2_mcspi_txrx_dma function

Stephen Warren (1):
  spi: remove completely broken Tegra driver

Sylwester Nawrocki (1):
  spi/s3c64xx: Don't free controller_data on non-dt platforms

Tobias Klauser (1):
  spi: spi-altera: Use of_match_ptr

 Documentation/devicetree/bindings/spi/mxs-spi.txt  |   22 +
 Documentation/devicetree/bindings/spi/spi-bus.txt  |3 +
 Documentation/devicetree/bindings/spi/spi-gpio.txt |   29 +
 .../devicetree/bindings/spi/spi-sc18is602.txt  |   23 +
 .../devicetree/bindings/spi/spi_pl022.txt  |   22 +
 Documentation/spi/spi-sc18is602|   36 +
 arch/arm/mach-u300/core.c  |3

Re: [PATCH] spi: remove completely broken Tegra driver

2012-10-01 Thread Mark Brown
On Mon, Oct 01, 2012 at 03:11:41PM +0530, Laxman Dewangan wrote:

 It will be great if this goes in k3.7 so that we can post the new
 driver on K3.8.

Why would this make any difference to the ability to post a new version?

I do wish stop making up version numbers, it's very irritating.  I
suppose at least people are now including the actual number rather than
the K32 stuff we used to get :/

 Definitely it will easy to review along with multiple bug fixes
 which is done in driver for interfacing different devices like
 camera/ touch etc.
 Having all these changes on top of existing one will create more
 than 10 patches and complicate the review. Also after these many
 patches, the new driver will be look different than the existing
 one.

You can always just post the removal as the first patch in the series...

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi: remove completely broken Tegra driver

2012-10-01 Thread Mark Brown
On Fri, Sep 28, 2012 at 10:15:48AM -0600, Stephen Warren wrote:
 From: Stephen Warren swar...@nvidia.com
 
 The current SPI driver has many issues. Examples are:

Applied, thanks.

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi/pl022: use more managed resources

2012-09-28 Thread Mark Brown
On Wed, Sep 26, 2012 at 04:48:36PM +0200, Linus Walleij wrote:
 This switches the PL022 SPI driver to use devm_* managed resources
 for IRQ, clocks, ioremap and GPIO. Prior to this, the GPIOs would
 even leak.

Applied, thanks.

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH v2] spi/pl022: get/put resources on suspend/resume

2012-09-28 Thread Mark Brown
On Wed, Sep 26, 2012 at 06:06:22PM +0200, Linus Walleij wrote:
 This factors out the resource handling in runtime
 suspend/resume and also calls it from the ordinary suspend
 and resume hooks.

Applied, thanks.

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH v2] spi/imx: set the inactive state of the clock according to the clock polarity

2012-09-28 Thread Mark Brown
On Tue, Sep 25, 2012 at 01:21:57PM +0200, Dirk Behme wrote:
 From: Knut Wohlrab knut.wohl...@de.bosch.com
 
 There are SPI devices which need a SPI clock with active low polarity and
 high inactive state.

Applied, thanks.

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 1/2] spi:pl022: Disable/Enable functional clock from suspend/resume

2012-09-26 Thread Mark Brown
On Wed, Sep 26, 2012 at 02:17:36PM +0200, Linus Walleij wrote:
 On Wed, Sep 26, 2012 at 1:24 PM, Vipul Kumar Samar

  SPI functional clock must be disalble/enable in non RTPM suspend/resume
  hooks. Currently it is only done for RTPM cases.

  This patch add support to disable/enbale clock for conventional
  suspend/resume calls.

 Cross dependency between runtime suspend/resume and
 common suspend/resume. Oh the horror ...

This should be fine, we runtime resume before we suspend.

 The semantics between runtime suspend/resume and
 ordinary suspend/resume are unclear to me, it seems like
 this is all up to the drivers and busses to figure out. Like
 you weren't supposed to use both at the same time.

This was clarified at some point relatively recently with the above
(which is essentially the same as the solution you describe).

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi/imx: set the inactive state of the clock according to the clock polarity

2012-09-25 Thread Mark Brown
On Mon, Sep 24, 2012 at 01:31:22PM +0200, Dirk Behme wrote:

 Let me know if you can find above thread on one of the both mailing
 lists. If not, I would be happy to resend it again.

Yes, of course - it's hard to apply patches from web archives.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi/imx: set the inactive state of the clock according to the clock polarity

2012-09-24 Thread Mark Brown
On Mon, Sep 24, 2012 at 08:34:27AM +0200, Dirk Behme wrote:

 Being not so familiar with the flow of SPI patches, I was told that you  
 are taking care of spi patches recently?

 Do you like to have a look to this patch?

Well, nobody appears to have sent me a copy of it...

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH resend] spi core: Provide means to instantiate devices through sysfs

2012-09-22 Thread Mark Brown
On Mon, Sep 17, 2012 at 04:51:20PM -0700, Guenter Roeck wrote:
 The I2C core provides a means to instantiate devices from userspace
 using sysfs attributes. Provide the same mechanism for SPI devices.

So, unlike I2C this is only going to work for a subset of controllers -
anything that relies on GPIOs for chip select will need more data to add
the chip selects for example.  This means I'm having a hard time getting
enthused about the idea, it seems like it might be a support burden.

--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi: s3c64xx: Don't free controller_data on non-dt platforms

2012-09-22 Thread Mark Brown
On Thu, Sep 13, 2012 at 04:31:30PM +0200, Sylwester Nawrocki wrote:
 When s3c64xx-spi is instantiated from device tree an instance of
 struct s3c64xx_spi_csinfo is dynamically allocated in the driver.

Applied, thanks.

--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi/pl022: adopt pinctrl support

2012-09-20 Thread Mark Brown
On Wed, Sep 19, 2012 at 02:23:46PM +0200, Linus Walleij wrote:
 From: Patrice Chotard patrice.chot...@stericsson.com
 
 Amend the PL022 pin controller to optionally take a pin control
 handle and set the state of the pins to default on boot and
 runtime resume, and to sleep at runtime suspend. This way we
 will dynamically save power on the SPI busses, for example some
 electronic designs may be able to ground the pins when unused
 instead of pull-up. Some pin controllers may want to set the
 pins as wake-up sources when sleeping.

Applied, thanks.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [RFC PATCH 13/13] Documentation: add schedule for removing private EDMA API

2012-09-20 Thread Mark Brown
On Thu, Sep 20, 2012 at 10:43:46AM -0400, Matt Porter wrote:

  Documentation/feature-removal-schedule.txt |   10 ++
  1 file changed, 10 insertions(+)

We decided at kernel summit that we'd stop bothering with this, it's
mostly just bitrot and rarely read.  I guess the ASoC driver update
isn't ready yet?

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH RESEND 4/5] spi: tegra: remove support of legacy DMA driver based access

2012-09-17 Thread Mark Brown
On Fri, Sep 14, 2012 at 10:11:28AM -0600, Stephen Warren wrote:
 From: Laxman Dewangan ldewan...@nvidia.com
 
 Remove the support code which uses the legacy APB DMA driver
 for accessing the SPI FIFO.
 The driver will use the dmaengine based APB DMA driver for
 accessing reqding/writing to SPI FIFO.

Acked-by: Mark Brown broo...@opensource.wolfsonmicro.com

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH RESEND 5/5] ASoC: tegra: remove support of legacy DMA driver based access

2012-09-17 Thread Mark Brown
On Fri, Sep 14, 2012 at 10:11:29AM -0600, Stephen Warren wrote:
 From: Laxman Dewangan ldewan...@nvidia.com
 
 Remove the support code which uses the legacy APB DMA driver
 for accessing the I2S FIFO.
 The driver will use the dmaengine based APB DMA driver for
 accessing reqding/writing to I2S FIFO.

Acked-by: Mark Brown broo...@opensource.wolfsonmicro.com

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 5/5] ASoC: tegra: remove support of legacy DMA driver based access

2012-09-14 Thread Mark Brown
On Thu, Sep 13, 2012 at 05:36:30PM -0600, Stephen Warren wrote:

 Please note that I've applied this to Tegra's for-3.7/dmaengine branch,
 even though it hasn't been ack'd by an ASoC maintainer.

Please don't apply this without review, we've got quite enough problems
with the dmaengine stuff as it is unfortunately so I want to keep a
handle on what's going on.  I didn't look at it since when it was
originally posted people found problems in testing so I was expecting a
respin of the series.

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 4/5] spi: tegra: remove support of legacy DMA driver based access

2012-09-14 Thread Mark Brown
On Thu, Sep 06, 2012 at 05:50:07PM -0600, Stephen Warren wrote:
 On 08/16/2012 08:13 AM, Laxman Dewangan wrote:

  Remove the support code which uses the legacy APB DMA driver
  for accessing the SPI FIFO.
  The driver will use the dmaengine based APB DMA driver for
  accessing reqding/writing to SPI FIFO.

 I'd like to take this patch through the Tegra tree, since it relies on
 the previous Tegra patches to convert to dmaengine. Could I please get
 an ack if that's OK? Thanks.

I don't seem to have the patch for review, not sure why.

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 4/5] spi: tegra: remove support of legacy DMA driver based access

2012-09-14 Thread Mark Brown
On Fri, Sep 14, 2012 at 09:57:48AM -0600, Stephen Warren wrote:
 On 09/06/2012 05:50 PM, Stephen Warren wrote:

  I'd like to take this patch through the Tegra tree, since it relies on
  the previous Tegra patches to convert to dmaengine. Could I please get
  an ack if that's OK? Thanks.

 I'm still looking for an ack.

Again, I don't have this patch.

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 5/5] ASoC: tegra: remove support of legacy DMA driver based access

2012-09-14 Thread Mark Brown
On Fri, Sep 14, 2012 at 09:57:35AM -0600, Stephen Warren wrote:
 On 09/06/2012 05:50 PM, Stephen Warren wrote:

  I'd like to take this patch through the Tegra tree, since it relies on
  the previous Tegra patches to convert to dmaengine. Could I please get
  an ack if that's OK? Thanks.

 I'm still looking for an ack.

As with all the others here I need to see this so it can get reviewed,
the previous review was that the patch didn't work.  In general
contentless pings like this aren't terribly helpful...

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 5/5] ASoC: tegra: remove support of legacy DMA driver based access

2012-09-14 Thread Mark Brown
On Fri, Sep 14, 2012 at 10:00:39AM -0600, Stephen Warren wrote:

 But do note that I pinged 8 days ago for an ack, and received no
 objections, and you were well aware that the bug was fixed since you

I didn't read these mails enough to notice that they were asking for an
ack, they were followups to already discarded patches (the were
discarded due to the testing problems).  One of the things I do to deal
with mail overload is to drop followups to patches that I don't remember
reviewing (as in this case where the negative test reports arrived
before I saw the patches) or where I remember I was already happy.

 applied the fix to the Tegra ASoC PCM driver yourself, and we had
 discussed this being a dependency for the dmaengine patches, and you'd
 told me to just base the Tegra branch on top of your tree until a signed
 tag was available for me to base upon.

I knew it was a dependency, I didn't know that there were no further
changes required to the series - your note when you posted the patch
didn't mention anything.

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi: omap2-mcspi: Cleanup the omap2_mcspi_txrx_dma function

2012-09-12 Thread Mark Brown
On Tue, Sep 11, 2012 at 12:13:20PM +0530, Shubhrajyoti D wrote:
 Currently in omap2_mcspi_txrx_dma the tx and the rx support is
 interleaved. Make the rx related code in omap2_mcspi_rx_dma
 and the tx related code omap2_mcspi_tx_dma and call the functions.

Applied, thanks.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi: omap2-mcspi: Cleanup the omap2_mcspi_txrx_dma function

2012-09-11 Thread Mark Brown
On Tue, Sep 11, 2012 at 12:13:20PM +0530, Shubhrajyoti D wrote:
 Currently in omap2_mcspi_txrx_dma the tx and the rx support is
 interleaved. Make the rx related code in omap2_mcspi_rx_dma
 and the tx related code omap2_mcspi_tx_dma and call the functions.

I'd ideally like some testing from the OMAP side before applying this -
is there someone who can give a Tested-by?

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH] spi/gpio: Fix stub for spi_gpio_probe_dt()

2012-09-06 Thread Mark Brown
The gpio_ was missing from the name.  Add a name for the parameter while
we're at it since GCC warns.

Reported-by: Stephen Rothwell s...@canb.auug.org.au
Signed-off-by: Mark Brown broo...@opensource.wolfsonmicro.com
---
 drivers/spi/spi-gpio.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c
index aed1615..a2b50c5 100644
--- a/drivers/spi/spi-gpio.c
+++ b/drivers/spi/spi-gpio.c
@@ -386,7 +386,7 @@ error_free:
return ret;
 }
 #else
-static inline int spi_probe_dt(struct platform_device *)
+static inline int spi_gpio_probe_dt(struct platform_device *pdev)
 {
return 0;
 }
-- 
1.7.10.4


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH RESEND-2 1/2] SPI: spi-gpio: store chipselect information in private structure

2012-09-05 Thread Mark Brown
On Wed, Sep 05, 2012 at 11:04:35AM +0200, Daniel Mack wrote:
 The spi-gpio driver currently assumes the chipselect gpio number is
 stored in -controller_data of the device's static board information.

Applied both, thanks.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 0/4] mxs/spi: Fixes and improvements

2012-09-05 Thread Mark Brown
On Tue, Sep 04, 2012 at 04:40:14AM +0200, Marek Vasut wrote:
 I humbly present fixes for further issues found in the SPI driver
 for i.MX23/i.MX28.

Applied all, thanks.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 1/4] drivers/spi/spi-sh-hspi.c: drop frees of devm_ alloc'd data

2012-09-05 Thread Mark Brown
On Sat, Sep 01, 2012 at 06:33:08PM +0200, Julia Lawall wrote:
 From: Julia Lawall julia.law...@lip6.fr
 
 devm free functions should not have to be explicitly used.

Applied, thanks.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi/pl022: Fix chipselects pointer computation

2012-09-05 Thread Mark Brown
On Mon, Sep 03, 2012 at 10:14:29AM +0200, Roland Stigge wrote:
 The new chip select handling via GPIO introduced a pointer computation bug:

Applied, thanks.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi: spi-tle62x0: Use module_spi_driver macro

2012-09-05 Thread Mark Brown
On Tue, Sep 04, 2012 at 04:58:35PM +0530, Sachin Kamat wrote:
 module_spi_driver eliminates module_init and module_exit
 calls and makes the code simpler.

Applied, thanks.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] mxs/spi: Fix misuse of init_completion

2012-09-05 Thread Mark Brown
On Wed, Aug 22, 2012 at 10:57:45PM +0200, Marek Vasut wrote:
 Signed-off-by: Marek Vasut ma...@denx.de

Applied, thanks.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH resend 2/2] SPI: spi-gpio: Add DT bindings

2012-09-04 Thread Mark Brown
On Mon, Sep 03, 2012 at 01:50:34PM +0200, Linus Walleij wrote:
 On Sun, Sep 2, 2012 at 10:17 PM, Daniel Mack zon...@gmail.com wrote:

  Hmm, I don't know whether anyone took those patches yet? Mark?

 Mark better take them, ping on Mark.

IIRC I did reply saying that the patches didn't apply for me, in any
case I don't have them any more - can you please check that they apply
against my -next branch and resend?

  git://git.kernel.org/pub/scm/kernel/git/broonie/misc.git spi-next

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] mxs/spi: Restart the block after unsuccessful transfer

2012-08-27 Thread Mark Brown
On Fri, Aug 24, 2012 at 04:34:18AM +0200, Marek Vasut wrote:
 Restart the SSP block in case the SSP transfer failed in any way.
 The block hung in some cases otherwise.

Applied, thanks.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH V3] mxs/spi: Fix misuse of init_completion

2012-08-27 Thread Mark Brown
On Fri, Aug 24, 2012 at 04:56:27AM +0200, Marek Vasut wrote:
 The init_completion() call does reinit not only the variable carrying
 the flag that the completion finished, but also initialized the
 waitqueue associated with the completion. On the contrary, the
 INIT_COMPLETION() call only reinits the flag.

Applied, thanks.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 1/3] spi/stmp: Fix device remove function

2012-08-27 Thread Mark Brown
On Thu, Aug 23, 2012 at 08:08:47PM -0700, Guenter Roeck wrote:
 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.

Applied, thanks.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] mxs/spi: Add SPI slave mode operation DT prop

2012-08-27 Thread Mark Brown
On Fri, Aug 24, 2012 at 04:42:41AM +0200, Marek Vasut wrote:
 This allows user to select the slave mode of operation of the controller.
 This is by no means standard, see the binding documentation for details,
 there is plenty of them. Sadly, such knowledge is not provided in the chip
 documentation. Hopefully, this mode of operation might come useful for
 people who do know very well what they are doing, otherwise this should
 never be touched.

I was going to touch this but I appear to have misplaced my bargepole :)

More seriously as you say this is a bit controversial so given that
Grant's now finished his move and should reappear soon I'll punt for
now.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi/s3c64xx: Drop extra calls to spi_master_get in suspend/remove functions

2012-08-27 Thread Mark Brown
On Thu, Aug 16, 2012 at 08:14:25PM -0700, Guenter Roeck wrote:
 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.

Applied, thanks.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi/mxs: Fix device remove function

2012-08-27 Thread Mark Brown
On Fri, Aug 24, 2012 at 11:03:02AM -0700, Guenter Roeck wrote:
 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.

Applied, thanks.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi/mxs: Fix device remove function

2012-08-25 Thread Mark Brown
On Fri, Aug 24, 2012 at 01:37:39PM -0700, Guenter Roeck wrote:

 For some reason most spi drivers have similar problems. I learned it
 the hard way when I tested my own driver, and decided to fix as many
 drivers as I can. Which is why you see all those patches from me
 lately.

It's not exactly the most obvious API, nor is it a particularly common
pattern for drivers, so it's hardly surprising that it's error prone.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 1/2] spi: spi-coldfire-qspi: Drop extra spi_master_put in device remove function

2012-08-17 Thread Mark Brown
On Thu, Aug 16, 2012 at 08:25:59PM -0700, Guenter Roeck wrote:
 The call sequence spi_alloc_master/spi_register_master/spi_unregister_master 
 is
 complete; it reduces the device reference count to zero, which and results in
 device memory being freed. The subsequent call to spi_master_put is 
 unnecessary
 and results in an access to free memory. Drop it.

Applied both, thanks.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi/pl022: fix spi-pl022 pm enable at probe

2012-08-17 Thread Mark Brown
On Fri, Aug 17, 2012 at 05:28:41PM +0200, Linus Walleij wrote:
 From: Michel JAOUEN michel.jao...@stericsson.com
 
 amba drivers does not need to enable pm runtime at probe.
 amba_probe already enables pm runtime.
 
 This rids this warning in the ux500 boot log:
 ssp-pl022 ssp0: Unbalanced pm_runtime_enable!

Applied, thanks.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi: omap2-mcspi: Remove the call to platform_set_drvdata(pdev, NULL)

2012-08-17 Thread Mark Brown
On Thu, Aug 16, 2012 at 08:49:30PM +0530, Shubhrajyoti D wrote:
 Remove the call of platform_set_drvdata(pdev, NULL) as they are not
 needed anymore.

Applied, thanks.  These calls were never *needed* people just like to
put them in.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi: spi-bcm63xx: Pass NULL to platform_set_drvdata

2012-08-16 Thread Mark Brown
On Thu, Aug 16, 2012 at 12:44:38PM +0200, Tobias Klauser wrote:
 platform_set_drvdata expects a void *, so pass NULL instead of 0.
 
 Signed-off-by: Tobias Klauser tklau...@distanz.ch

Better yet, remove these calls - they're completely redundant.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi: spi-altera: Use of_match_ptr

2012-08-15 Thread Mark Brown
On Wed, Aug 15, 2012 at 08:09:07AM -0500, Rob Herring wrote:
 On 08/15/2012 02:30 AM, Tobias Klauser wrote:
  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: Tobias Klauser tklau...@distanz.ch

 Acked-by: Rob Herring rob.herr...@calxeda.com

 Adding Mark B. as he is helping Grant out with spi.

Please send me the patch directly (ie, not quoted).

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi: spi-altera: Use of_match_ptr

2012-08-15 Thread Mark Brown
On Wed, Aug 15, 2012 at 09:30:28AM +0200, Tobias Klauser wrote:
 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.

Applied, thanks.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [RFC PATCH] spi/bcm63xx: Ensure that memory is freed only after it is no longer used

2012-08-13 Thread Mark Brown
On Fri, Aug 10, 2012 at 01:56:27PM -0700, Guenter Roeck wrote:
 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().

Applied, thanks.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 00/10 V3] MXS SPI driver

2012-08-13 Thread Mark Brown
On Fri, Aug 03, 2012 at 05:26:05PM +0200, Marek Vasut wrote:
 This patchset adds SPI master support for Freescale i.MX233/i.MX28.
 This is rebased on top of next-20120713. Please consider applying,
 bugs shall now be squashed during the previous two review rounds.

Do we have any ETA for review from the MMC side?  I'd like to get these
patches out of my queue one way or another, it seems like for the simple
code motion bits at least we should be easy enough to get out of the
way.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi/s3c64xx: Add missing static storage class specifiers

2012-08-04 Thread Mark Brown
On Fri, Aug 03, 2012 at 10:08:12AM +0530, Sachin Kamat wrote:
 Silences the following sparse warnings:
 drivers/spi/spi-s3c64xx.c:1482:32: warning:

Applied, thanks.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH resend 1/2] SPI: spi-gpio: store chipselect information in private structure

2012-08-04 Thread Mark Brown
On Wed, Aug 01, 2012 at 10:57:17PM +0200, Daniel Mack wrote:
 The spi-gpio driver currently assumes the chipselect gpio number is
 stored in -controller_data of the device's static board information.

Applied both, thanks.  It's a bit sad that we need an explict property
for num-chipselects though.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH] spi: omap2-mcspi: Fix the error handling in probe

2012-08-04 Thread Mark Brown
On Thu, Aug 02, 2012 at 04:41:25PM +0530, Shubhrajyoti D wrote:
 The kfree() is taken care of by the spi core (spi_master_release() function)
 that is called once the last reference to the underlying struct device has
 been released. So the driver need not call kfree.

Applied, thanks.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 06/10 V2] spi: Add SPI driver for mx233/mx28

2012-08-02 Thread Mark Brown
On Thu, Aug 02, 2012 at 04:58:38PM +0200, Marek Vasut wrote:

  It'd be nice to only keep the clocks enabled while doing transfers but
  again totally non-essential.

 Hm, this is spread across mxs. Shawn, is there any plan for PM implementation 
 for MXS ?

Take a look at s3c64xx - I did something with runtime PM for this, it's
something that can reasonably be implemented in drivers and as far as I
can tell most framework implementations end up using runtime PM anyway.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 06/10 V2] spi: Add SPI driver for mx233/mx28

2012-08-01 Thread Mark Brown
On Mon, Jul 23, 2012 at 10:40:48PM +0200, Marek Vasut wrote:

 This is slightly reworked version of the SPI driver.
 Support for DT has been added and it's been converted
 to queued API.

Looks reasonable overall.

 + bits_per_word = dev-bits_per_word;
 + if (t  t-bits_per_word)
 + bits_per_word = t-bits_per_word;
 +
 + if (bits_per_word != 8) {
 + dev_err(dev-dev, %s, unsupported bits_per_word=%d\n,
 + __func__, bits_per_word);
 + return -EINVAL;
 + }

 + if (dev-max_speed_hz)
 + hz = dev-max_speed_hz;
 + if (t  t-speed_hz)
 + hz = t-speed_hz;
 + if (hz == 0) {
 + dev_err(dev-dev, Cannot continue with zero clock\n);
 + return -EINVAL;
 + }

These two blocks use a different style (the first does the first assign
unconditionally, the second uses initialisation with declaration).  I
prefer the first style but YMMV and it doesn't matter.

For the missing clock rate might it make sense to just use whatever the
clock happens to come out as?

 +static void mxs_spi_cleanup(struct spi_device *dev)
 +{
 + return;
 +}

Empty functions are generally a warning sign...  why do we need this
one?

 +static int __devexit mxs_spi_remove(struct platform_device *pdev)
 +{

 + clk_disable_unprepare(ssp-clk);

It'd be nice to only keep the clocks enabled while doing transfers but
again totally non-essential.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 08/10 RESEND] spi: Add DMA support into SPI driver

2012-08-01 Thread Mark Brown
On Mon, Jul 23, 2012 at 10:40:50PM +0200, Marek Vasut wrote:

 + /*
 +  * Small blocks can be transfered via PIO.
 +  * Measured by empiric means:
 +  *
 +  * dd if=/dev/mtdblock0 of=/dev/null bs=1024k count=1
 +  *
 +  * DMA only: 2.164808 seconds, 473.0KB/s
 +  * Combined: 1.676276 seconds, 610.9KB/s
 +  */

I've seen other devices end up using the FIFO length as the decision
point here which makes intuitive sense to me unless the FIFO is
extremely deep.

Not reviewed this properly yet but it looks OK from a first read
through.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 1/2] SPI: spi-gpio: store chipselect information in private structure

2012-07-25 Thread Mark Brown
On Wed, Jul 25, 2012 at 01:44:11PM +0200, Daniel Mack wrote:
 The spi-gpio driver currently assumes the chipselect gpio number is
 stored in -controller_data of the device's static board information.

Always CC maintainers on things...  you've not CCed Grant or Linus W,
and for now I'm handling SPI patches (though I'm not in MAINTAINERS so
missing me is less surprising).

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 1/2] SPI: spi-gpio: store chipselect information in private structure

2012-07-25 Thread Mark Brown
On Wed, Jul 25, 2012 at 10:00:18PM +0200, Daniel Mack wrote:

 I don't know what's wrong here, but clearly, the message in my inbox has

 To: spi-devel-general@lists.sourceforge.net
 Cc: grant.lik...@secretlab.ca,
   rob.herr...@calxeda.com,
   devicetree-disc...@lists.ozlabs.org,
   Daniel Mack zon...@gmail.com

 And I sent them off with git send-email --to
 spi-devel-general@lists.sourceforge.net --cc grant.lik...@secretlab.ca ...

 Sorry if that's my mistake, I just don't see it.

I forwarded 1343216652-1463-1-git-send-email-zon...@gmail.com to you
under separate cover.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 00/10] MXS SPI driver

2012-07-18 Thread Mark Brown
On Wed, Jul 18, 2012 at 12:09:54AM +0200, Marek Vasut wrote:
  On Mon, Jul 16, 2012 at 02:09:47PM +0200, Marek Vasut wrote:

  Always CC maintainers, and in this case me as well (I'm collecting SPI
  patches for this release since Grant's mostly offline).

 Ah, I wasn't aware you're the SPI maintainer now. Sorry about that. Will do 
 if 
 there's a rework requested.

I'm not, I'm just looking after things for this release (until Grant's
finished moving house and attending conferences).

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH 4/4] spi/s3c64xx: Expand S3C64XX_SPI_{DE, }ACT macros at call sites

2012-07-18 Thread 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: Mark Brown broo...@opensource.wolfsonmicro.com
Acked-by: Linus Walleij linus.wall...@linaro.org
---
 drivers/spi/spi-s3c64xx.c |   12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 1781365..d24ec80 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -79,11 +79,6 @@
 #define S3C64XX_SPI_SLAVE_AUTO (11)
 #define S3C64XX_SPI_SLAVE_SIG_INACT(10)
 
-#define S3C64XX_SPI_ACT(c) writel(0, (c)-regs + S3C64XX_SPI_SLAVE_SEL)
-
-#define S3C64XX_SPI_DEACT(c) writel(S3C64XX_SPI_SLAVE_SIG_INACT, \
-   (c)-regs + S3C64XX_SPI_SLAVE_SEL)
-
 #define S3C64XX_SPI_INT_TRAILING_EN(16)
 #define S3C64XX_SPI_INT_RX_OVERRUN_EN  (15)
 #define S3C64XX_SPI_INT_RX_UNDERRUN_EN (14)
@@ -737,14 +732,15 @@ static int s3c64xx_spi_transfer_one_message(struct 
spi_master *master,
enable_cs(sdd, spi);
 
/* Start the signals */
-   S3C64XX_SPI_ACT(sdd);
+   writel(0, sdd-regs + S3C64XX_SPI_SLAVE_SEL);
 
spin_unlock_irqrestore(sdd-lock, flags);
 
status = wait_for_xfer(sdd, xfer, use_dma);
 
/* Quiese the signals */
-   S3C64XX_SPI_DEACT(sdd);
+   writel(S3C64XX_SPI_SLAVE_SIG_INACT,
+  sdd-regs + S3C64XX_SPI_SLAVE_SEL);
 
if (status) {
dev_err(spi-dev, I/O Error: 
@@ -1030,7 +1026,7 @@ static void s3c64xx_spi_hwinit(struct 
s3c64xx_spi_driver_data *sdd, int channel)
 
sdd-cur_speed = 0;
 
-   S3C64XX_SPI_DEACT(sdd);
+   writel(S3C64XX_SPI_SLAVE_SIG_INACT, sdd-regs + S3C64XX_SPI_SLAVE_SEL);
 
/* Disable Interrupts - we use Polling if not DMA mode */
writel(0, regs + S3C64XX_SPI_INT_EN);
-- 
1.7.10.4


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH 1/4] spi/s3c64xx: Fix handling of errors in gpio_request()

2012-07-18 Thread 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: Mark Brown broo...@opensource.wolfsonmicro.com
---
 drivers/spi/spi-s3c64xx.c |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 999154a0..7258b18 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -894,9 +894,9 @@ static int s3c64xx_spi_setup(struct spi_device *spi)
if (!spi_get_ctldata(spi)) {
err = gpio_request(cs-line, dev_name(spi-dev));
if (err) {
-   dev_err(spi-dev, request for slave select gpio 
-   line [%d] failed\n, cs-line);
-   err = -EBUSY;
+   dev_err(spi-dev,
+   Failed to get /CS gpio [%d]: %d\n,
+   cs-line, err);
goto err_gpio_req;
}
spi_set_ctldata(spi, cs);
@@ -1114,7 +1114,8 @@ static int s3c64xx_spi_parse_dt_gpio(struct 
s3c64xx_spi_driver_data *sdd)
 
ret = gpio_request(gpio, spi-bus);
if (ret) {
-   dev_err(dev, gpio [%d] request failed\n, gpio);
+   dev_err(dev, gpio [%d] request failed: %d\n,
+   gpio, ret);
goto free_gpio;
}
}
-- 
1.7.10.4


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH 3/4] spi/s3c64xx: Convert to devm_request_and_ioremap()

2012-07-18 Thread Mark Brown
Saves some error handling and a small amount of code.

Signed-off-by: Mark Brown broo...@opensource.wolfsonmicro.com
Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com
Acked-by: Linus Walleij linus.wall...@linaro.org
---
 drivers/spi/spi-s3c64xx.c |   18 +-
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 6ed3ba8..1781365 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -1278,14 +1278,7 @@ static int __init s3c64xx_spi_probe(struct 
platform_device *pdev)
/* the spi-mode bits understood by this driver: */
master-mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
 
-   if (request_mem_region(mem_res-start,
-   resource_size(mem_res), pdev-name) == NULL) {
-   dev_err(pdev-dev, Req mem region failed\n);
-   ret = -ENXIO;
-   goto err0;
-   }
-
-   sdd-regs = ioremap(mem_res-start, resource_size(mem_res));
+   sdd-regs = devm_request_and_ioremap(pdev-dev, mem_res);
if (sdd-regs == NULL) {
dev_err(pdev-dev, Unable to remap IO\n);
ret = -ENXIO;
@@ -1379,9 +1372,7 @@ err3:
if (!sdd-cntrlr_info-cfg_gpio  pdev-dev.of_node)
s3c64xx_spi_dt_gpio_free(sdd);
 err2:
-   iounmap((void *) sdd-regs);
 err1:
-   release_mem_region(mem_res-start, resource_size(mem_res));
 err0:
platform_set_drvdata(pdev, NULL);
spi_master_put(master);
@@ -1393,7 +1384,6 @@ static int s3c64xx_spi_remove(struct platform_device 
*pdev)
 {
struct spi_master *master = spi_master_get(platform_get_drvdata(pdev));
struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master);
-   struct resource *mem_res;
 
pm_runtime_disable(pdev-dev);
 
@@ -1412,12 +1402,6 @@ static int s3c64xx_spi_remove(struct platform_device 
*pdev)
if (!sdd-cntrlr_info-cfg_gpio  pdev-dev.of_node)
s3c64xx_spi_dt_gpio_free(sdd);
 
-   iounmap((void *) sdd-regs);
-
-   mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   if (mem_res != NULL)
-   release_mem_region(mem_res-start, resource_size(mem_res));
-
platform_set_drvdata(pdev, NULL);
spi_master_put(master);
 
-- 
1.7.10.4


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH 2/4] spi/s3c64xx: Put the /CS GPIO into output mode

2012-07-18 Thread 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: Mark Brown broo...@opensource.wolfsonmicro.com
---
 drivers/spi/spi-s3c64xx.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 7258b18..6ed3ba8 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -892,7 +892,8 @@ static int s3c64xx_spi_setup(struct spi_device *spi)
}
 
if (!spi_get_ctldata(spi)) {
-   err = gpio_request(cs-line, dev_name(spi-dev));
+   err = gpio_request_one(cs-line, GPIOF_OUT_INIT_HIGH,
+  dev_name(spi-dev));
if (err) {
dev_err(spi-dev,
Failed to get /CS gpio [%d]: %d\n,
-- 
1.7.10.4


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 00/10] MXS SPI driver

2012-07-17 Thread Mark Brown
On Mon, Jul 16, 2012 at 02:09:47PM +0200, Marek Vasut wrote:
 This patchset adds SPI master support for Freescale i.MX233/i.MX28.
 This is rebased on top of next-20120713. Please consider applying,
 bugs shall now be squashed during the previous two review rounds.

Always CC maintainers, and in this case me as well (I'm collecting SPI
patches for this release since Grant's mostly offline).

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH v4 5/6] spi: s3c64xx: Remove the 'set_level' callback from controller data

2012-07-10 Thread Mark Brown
On Tue, Jul 10, 2012 at 07:57:38PM +0530, Thomas Abraham wrote:
 The set_level callback in the controller data, which is used to configure
 the slave select line, cannot be supported when migrating the driver to
 device tree based discovery. Since all the platforms currently use gpio
 as the slave select line, this callback can be removed from the
 controller data and replaced with call to gpio_set_value in the driver.

This is currently buggy, BTW, as the driver never requests the GPIO.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH RFC] spi/gpio: start with CS non-active

2012-07-09 Thread Mark Brown
On Thu, Jul 05, 2012 at 09:45:40AM +0200, Uwe Kleine-K?nig wrote:
 On Thu, Feb 09, 2012 at 10:21:45PM +0100, Uwe Kleine-K?nig wrote:
  The chip select line was configured as output with the initial value
  being active explicitly. It was later deasserted during
  spi_bitbang_setup() without any clock activity in between. So it makes
  no sense to activate the device at all and the chip select line can
  better start non-active.
  
  Signed-off-by: Uwe Kleine-K?nig u.kleine-koe...@pengutronix.de
  ---
  Hello,
  
  I'm not sure if an active chip select line without any clock activity can
  confuse a device. If so, this patch might qualify as fix. But with my
  limited knowledge about spi it's also possible that I just miss why the
  active chip select is important. For the devices I have it doesn't seem
  to make a difference.
 ping

You probably want to resend this with Linus W in the CCs.

 
  
  Best regards
  Uwe
  
   drivers/spi/spi-gpio.c |3 ++-
   1 files changed, 2 insertions(+), 1 deletions(-)
  
  diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c
  index 0094c64..0b56cfc 100644
  --- a/drivers/spi/spi-gpio.c
  +++ b/drivers/spi/spi-gpio.c
  @@ -235,7 +235,8 @@ static int spi_gpio_setup(struct spi_device *spi)
  status = gpio_request(cs, dev_name(spi-dev));
  if (status)
  return status;
  -   status = gpio_direction_output(cs, spi-mode  
  SPI_CS_HIGH);
  +   status = gpio_direction_output(cs,
  +   !(spi-mode  SPI_CS_HIGH));
  }
  }
  if (!status)
  -- 
  1.7.9
  
  
 
 -- 
 Pengutronix e.K.   | Uwe Kleine-K?nig|
 Industrial Linux Solutions | http://www.pengutronix.de/  |
 
 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and 
 threat landscape has changed and how IT managers can respond. Discussions 
 will include endpoint security, mobile security and the latest in malware 
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 spi-devel-general mailing list
 spi-devel-general@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/spi-devel-general
 

-- 
You grabbed my hand and we fell into it, like a daydream - or a fever.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH] spi/s3c64xx: Convert to devm_request_and_ioremap()

2012-07-05 Thread Mark Brown
Saves some error handling and a small amount of code.

Signed-off-by: Mark Brown broo...@opensource.wolfsonmicro.com
Acked-by: Linus Walleij linus.wall...@linaro.org
---
 drivers/spi/spi-s3c64xx.c |   19 +--
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index f4e2341..f62c13e 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -1028,14 +1028,7 @@ static int __init s3c64xx_spi_probe(struct 
platform_device *pdev)
/* the spi-mode bits understood by this driver: */
master-mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
 
-   if (request_mem_region(mem_res-start,
-   resource_size(mem_res), pdev-name) == NULL) {
-   dev_err(pdev-dev, Req mem region failed\n);
-   ret = -ENXIO;
-   goto err0;
-   }
-
-   sdd-regs = ioremap(mem_res-start, resource_size(mem_res));
+   sdd-regs = devm_request_and_ioremap(pdev-dev, mem_res);
if (sdd-regs == NULL) {
dev_err(pdev-dev, Unable to remap IO\n);
ret = -ENXIO;
@@ -1124,10 +1117,7 @@ err4:
clk_put(sdd-clk);
 err3:
 err2:
-   iounmap((void *) sdd-regs);
 err1:
-   release_mem_region(mem_res-start, resource_size(mem_res));
-err0:
platform_set_drvdata(pdev, NULL);
spi_master_put(master);
 
@@ -1138,7 +1128,6 @@ static int s3c64xx_spi_remove(struct platform_device 
*pdev)
 {
struct spi_master *master = spi_master_get(platform_get_drvdata(pdev));
struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master);
-   struct resource *mem_res;
 
pm_runtime_disable(pdev-dev);
 
@@ -1154,12 +1143,6 @@ static int s3c64xx_spi_remove(struct platform_device 
*pdev)
clk_disable(sdd-clk);
clk_put(sdd-clk);
 
-   iounmap((void *) sdd-regs);
-
-   mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   if (mem_res != NULL)
-   release_mem_region(mem_res-start, resource_size(mem_res));
-
platform_set_drvdata(pdev, NULL);
spi_master_put(master);
 
-- 
1.7.10


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH 2/2] spi/s3c64xx: Expand S3C64XX_SPI_{DE, }ACT macros at call sites

2012-07-04 Thread 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: Mark Brown broo...@opensource.wolfsonmicro.com
Acked-by: Linus Walleij linus.wall...@linaro.org
---
 drivers/spi/spi-s3c64xx.c |   12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index b7aeb5d..3514ef9 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -74,11 +74,6 @@
 #define S3C64XX_SPI_SLAVE_AUTO (11)
 #define S3C64XX_SPI_SLAVE_SIG_INACT(10)
 
-#define S3C64XX_SPI_ACT(c) writel(0, (c)-regs + S3C64XX_SPI_SLAVE_SEL)
-
-#define S3C64XX_SPI_DEACT(c) writel(S3C64XX_SPI_SLAVE_SIG_INACT, \
-   (c)-regs + S3C64XX_SPI_SLAVE_SEL)
-
 #define S3C64XX_SPI_INT_TRAILING_EN(16)
 #define S3C64XX_SPI_INT_RX_OVERRUN_EN  (15)
 #define S3C64XX_SPI_INT_RX_UNDERRUN_EN (14)
@@ -712,14 +707,15 @@ static int s3c64xx_spi_transfer_one_message(struct 
spi_master *master,
enable_cs(sdd, spi);
 
/* Start the signals */
-   S3C64XX_SPI_ACT(sdd);
+   writel(0, sdd-regs + S3C64XX_SPI_SLAVE_SEL);
 
spin_unlock_irqrestore(sdd-lock, flags);
 
status = wait_for_xfer(sdd, xfer, use_dma);
 
/* Quiese the signals */
-   S3C64XX_SPI_DEACT(sdd);
+   writel(S3C64XX_SPI_SLAVE_SIG_INACT,
+  sdd-regs + S3C64XX_SPI_SLAVE_SEL);
 
if (status) {
dev_err(spi-dev, I/O Error: 
@@ -923,7 +919,7 @@ static void s3c64xx_spi_hwinit(struct 
s3c64xx_spi_driver_data *sdd, int channel)
 
sdd-cur_speed = 0;
 
-   S3C64XX_SPI_DEACT(sdd);
+   writel(S3C64XX_SPI_SLAVE_SIG_INACT, sdd-regs + S3C64XX_SPI_SLAVE_SEL);
 
/* Disable Interrupts - we use Polling if not DMA mode */
writel(0, regs + S3C64XX_SPI_INT_EN);
-- 
1.7.10


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH 1/2] spi/s3c64xx: Convert to devm_request_and_ioremap()

2012-06-28 Thread Mark Brown
Saves some error handling and a small amount of code.

Signed-off-by: Mark Brown broo...@opensource.wolfsonmicro.com
---
 drivers/spi/spi-s3c64xx.c |   25 +
 1 file changed, 1 insertion(+), 24 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index f4e2341..b7aeb5d 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -1028,19 +1028,7 @@ static int __init s3c64xx_spi_probe(struct 
platform_device *pdev)
/* the spi-mode bits understood by this driver: */
master-mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
 
-   if (request_mem_region(mem_res-start,
-   resource_size(mem_res), pdev-name) == NULL) {
-   dev_err(pdev-dev, Req mem region failed\n);
-   ret = -ENXIO;
-   goto err0;
-   }
-
-   sdd-regs = ioremap(mem_res-start, resource_size(mem_res));
-   if (sdd-regs == NULL) {
-   dev_err(pdev-dev, Unable to remap IO\n);
-   ret = -ENXIO;
-   goto err1;
-   }
+   sdd-regs = devm_request_and_ioremap(pdev-dev, mem_res);
 
if (sci-cfg_gpio == NULL || sci-cfg_gpio(pdev)) {
dev_err(pdev-dev, Unable to config gpio\n);
@@ -1124,10 +1112,6 @@ err4:
clk_put(sdd-clk);
 err3:
 err2:
-   iounmap((void *) sdd-regs);
-err1:
-   release_mem_region(mem_res-start, resource_size(mem_res));
-err0:
platform_set_drvdata(pdev, NULL);
spi_master_put(master);
 
@@ -1138,7 +1122,6 @@ static int s3c64xx_spi_remove(struct platform_device 
*pdev)
 {
struct spi_master *master = spi_master_get(platform_get_drvdata(pdev));
struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master);
-   struct resource *mem_res;
 
pm_runtime_disable(pdev-dev);
 
@@ -1154,12 +1137,6 @@ static int s3c64xx_spi_remove(struct platform_device 
*pdev)
clk_disable(sdd-clk);
clk_put(sdd-clk);
 
-   iounmap((void *) sdd-regs);
-
-   mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   if (mem_res != NULL)
-   release_mem_region(mem_res-start, resource_size(mem_res));
-
platform_set_drvdata(pdev, NULL);
spi_master_put(master);
 
-- 
1.7.10


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH 2/2] spi/s3c64xx: Expand S3C64XX_SPI_{DE, }ACT macros at call sites

2012-06-28 Thread 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: Mark Brown broo...@opensource.wolfsonmicro.com
---
 drivers/spi/spi-s3c64xx.c |   12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index b7aeb5d..3514ef9 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -74,11 +74,6 @@
 #define S3C64XX_SPI_SLAVE_AUTO (11)
 #define S3C64XX_SPI_SLAVE_SIG_INACT(10)
 
-#define S3C64XX_SPI_ACT(c) writel(0, (c)-regs + S3C64XX_SPI_SLAVE_SEL)
-
-#define S3C64XX_SPI_DEACT(c) writel(S3C64XX_SPI_SLAVE_SIG_INACT, \
-   (c)-regs + S3C64XX_SPI_SLAVE_SEL)
-
 #define S3C64XX_SPI_INT_TRAILING_EN(16)
 #define S3C64XX_SPI_INT_RX_OVERRUN_EN  (15)
 #define S3C64XX_SPI_INT_RX_UNDERRUN_EN (14)
@@ -712,14 +707,15 @@ static int s3c64xx_spi_transfer_one_message(struct 
spi_master *master,
enable_cs(sdd, spi);
 
/* Start the signals */
-   S3C64XX_SPI_ACT(sdd);
+   writel(0, sdd-regs + S3C64XX_SPI_SLAVE_SEL);
 
spin_unlock_irqrestore(sdd-lock, flags);
 
status = wait_for_xfer(sdd, xfer, use_dma);
 
/* Quiese the signals */
-   S3C64XX_SPI_DEACT(sdd);
+   writel(S3C64XX_SPI_SLAVE_SIG_INACT,
+  sdd-regs + S3C64XX_SPI_SLAVE_SEL);
 
if (status) {
dev_err(spi-dev, I/O Error: 
@@ -923,7 +919,7 @@ static void s3c64xx_spi_hwinit(struct 
s3c64xx_spi_driver_data *sdd, int channel)
 
sdd-cur_speed = 0;
 
-   S3C64XX_SPI_DEACT(sdd);
+   writel(S3C64XX_SPI_SLAVE_SIG_INACT, sdd-regs + S3C64XX_SPI_SLAVE_SEL);
 
/* Disable Interrupts - we use Polling if not DMA mode */
writel(0, regs + S3C64XX_SPI_INT_EN);
-- 
1.7.10


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


  1   2   >