On Sat, Sep 22, 2012 at 12:11:33PM -0400, Mark Brown wrote:
> 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.
>
> S
The I2C core provides a means to instantiate devices from userspace
using sysfs attributes. Provide the same mechanism for SPI devices.
Signed-off-by: Guenter Roeck
---
This helped me tremendously for testing new SPI master and client drivers.
Maybe it is useful for others as well.
ping: Any
On Sun, Sep 16, 2012 at 08:44:56PM +0200, Jean Delvare wrote:
> On Sun, 16 Sep 2012 09:19:34 -0700, Guenter Roeck wrote:
> > On Sun, Sep 16, 2012 at 03:09:01PM +0200, Jean Delvare wrote:
> > > On Tue, 11 Sep 2012 13:52:50 -0700, Guenter Roeck wrote:
> > > That's a
On Sun, Sep 16, 2012 at 03:09:01PM +0200, Jean Delvare wrote:
> Hi Guenter,
>
> On Tue, 11 Sep 2012 13:52:50 -0700, Guenter Roeck wrote:
> > Instead of using a switch statement to determine the device name, use
> > to_spi_device(dev)->modalias to simplify the cod
The I2C core provides a means to instantiate devices from userspace
using sysfs attributes. Provide the same mechanism for SPI devices.
Signed-off-by: Guenter Roeck
---
This helped me tremendously for testing new SPI master and client drivers.
Maybe it is useful for others as well
On Tue, Sep 04, 2012 at 09:25:23AM +0200, Uwe Kleine-König wrote:
> On Mon, Sep 03, 2012 at 01:26:26PM -0700, Guenter Roeck wrote:
> > Actually, spi_master_put() after spi_alloc_master() must _not_ be followed
> > by kfree(). The memory is already freed with the call to
elsewhere in the kernel, often in the networking stack.
This reverts commit eb4af0f5349235df2e4a5057a72fc8962d00308a.
Cc: Uwe Kleine-Koenig
Signed-off-by: Guenter Roeck
---
drivers/spi/spi.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/spi/spi.c b/drivers/spi
On Sat, Aug 25, 2012 at 12:07:37AM +0200, Marek Vasut wrote:
[ ... ]
>
> > On a side note, at least some of the spi bitbang drivers have a similar
> > problem. Unfortunately, I can not fix it right now because I have no means
> > to test it, and have no idea what exactly is _supposed_ to happen.
On Fri, Aug 24, 2012 at 10:10:12PM +0200, Marek Vasut wrote:
> Dear Guenter Roeck,
>
> > The call sequence
> > spi_alloc_master/spi_register_master/spi_unregister_master is complete; it
> > reduces the device reference count to zero, which results in device memory
>
unnecessaary calls to
platform_set_drvdata().
Cc: Marek Vasut
Signed-off-by: Guenter Roeck
---
Applies to -next (as of 8/24/12).
drivers/spi/spi-mxs.c |5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c
index 130a436..cb189b7
On Fri, Aug 24, 2012 at 10:47:08AM +0200, Wolfram Sang wrote:
> 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, w
subsystem resets device driver data to NULL after the call to
the remove function returns, so there is no need to do it here.
Signed-off-by: Guenter Roeck
---
drivers/spi/spi-topcliff-pch.c |2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi
to solve the problem.
Signed-off-by: Guenter Roeck
---
drivers/spi/spi-tegra.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-tegra.c b/drivers/spi/spi-tegra.c
index ef52c1c..e28445d 100644
--- a/drivers/spi/spi-tegra.c
+++ b/drivers/spi/spi-tegra.c
respective check and drop the
unnecessaary call to platform_set_drvdata().
Signed-off-by: Guenter Roeck
---
Note that this driver is impossible to build, since it depends on ARCH_STMP3XXX
which is not defined anywhere.
drivers/spi/spi-stmp.c |6 +-
1 file changed, 1 insertion(+), 5
On Thu, Aug 23, 2012 at 02:40:45PM +0900, Kukjin Kim wrote:
> 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
condition.
Replace error return value with -EINVAL to trigger an error message showing
that the probe function failed.
Signed-off-by: Guenter Roeck
---
drivers/spi/spi-sc18is602.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-sc18is602.c b/drivers/spi/spi
On Wed, Aug 22, 2012 at 07:32:30PM +0100, Mark Brown wrote:
> On Sat, Aug 18, 2012 at 09:06:27AM -0700, Guenter Roeck wrote:
> > This driver adds support for NXP SC18IS602/603 I2C to SPI bus bridge.
> >
> > Signed-off-by: Guenter Roeck
>
> Applied, thanks. One smal
On Fri, May 11, 2012 at 08:34:46PM -, David Daney wrote:
> From: David Daney
>
> Add the driver, link it into the kbuild system and provide device tree
> binding documentation.
>
> Signed-off-by: David Daney
> Acked-by: Grant Likely
>
[ ... ]
> +
> +static int __devexit octeon_spi_remove
: Guenter Roeck
---
drivers/spi/spi-pl022.c |1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index aab518e..47c6753 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -2171,7 +2171,6 @@ pl022_remove(struct amba_device *adev
to solve the problem.
Signed-off-by: Guenter Roeck
---
drivers/spi/spi-mpc512x-psc.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-mpc512x-psc.c b/drivers/spi/spi-mpc512x-psc.c
index 4c63f77..0a1e39e 100644
--- a/drivers/spi/spi-mpc512x-psc.c
+++ b
call to spi_unregister_master results in device
memory being freed, it must no longer be accessed afterwards.
To fix both problems, call spi_master_get to get an extra reference to the
device, and call spi_master_put only after the last access to device data.
Signed-off-by: Guenter Roeck
to solve the problem.
Signed-off-by: Guenter Roeck
---
drivers/spi/spi-mpc52xx-psc.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-mpc52xx-psc.c b/drivers/spi/spi-mpc52xx-psc.c
index 6604715..bd47d26 100644
--- a/drivers/spi/spi-mpc52xx-psc.c
+++ b
The call to spi_master_put() is needed to free device memory. It must be called
after spi_alloc_master, and must only be called after the device memory is no
longer used.
Signed-off-by: Guenter Roeck
---
drivers/spi/spi-mpc52xx.c |5 +++--
1 file changed, 3 insertions(+), 2 deletions
This driver adds support for NXP SC18IS602/603 I2C to SPI bus bridge.
Signed-off-by: Guenter Roeck
---
There is one checkatch warning:
WARNING: please write a paragraph that describes the config symbol fully
#101: FILE: drivers/spi/Kconfig:328:
+config SPI_SC18IS602
I
Sigh.
s/remove/resume/ in headline.
Guenter
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 f
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, so drop the calls.
Signed-off-by: Guenter Roeck
---
drivers/spi/spi-coldfire-qspi.c |4 ++--
1 file changed, 2
-off-by: Guenter Roeck
---
drivers/spi/spi-coldfire-qspi.c |1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/spi/spi-coldfire-qspi.c b/drivers/spi/spi-coldfire-qspi.c
index b2d4b9e..1a30b47 100644
--- a/drivers/spi/spi-coldfire-qspi.c
+++ b/drivers/spi/spi-coldfire-qspi.c
@@ -533,7 +533,6
Suspend and resume functions call spi_master_get() without matching
spi_master_put(). The extra references are unnecessary and cause subsequent
module unload attempts to fail. Drop the calls.
Signed-off-by: Guenter Roeck
---
drivers/spi/spi-s3c64xx.c |8
1 file changed, 4
On Thu, Aug 16, 2012 at 02:27:49PM +0530, Thomas Abraham wrote:
> On 14 August 2012 03:14, Guenter Roeck wrote:
> > Hi all,
> >
> > looking through SPI master drivers, I noticed that the following drivers
> > call
> > spi_master_get() in their suspend and r
Hi all,
looking through SPI master drivers, I noticed that the following drivers call
spi_master_get() in their suspend and resume functions. Yet, there is no
matching call to spi_master_put(), meaning the reference count will increase
with each suspend/resume cycle.
spi-coldfire-qspi.c
the problem.
Cc: Florian Fainelli
Signed-off-by: Guenter Roeck
---
Several drivers have this problem, and I am trying to find a common fix.
This solution is modeled after the approach used in spi-txx9spi:txx9spi_remove.
The other possible fix would be to move spi_unregister_master() to the end
On Thu, Aug 02, 2012 at 03:37:13PM +0530, Shubhrajyoti wrote:
> On Wednesday 01 August 2012 08:37 PM, Guenter Roeck wrote:
> > On Wed, Aug 01, 2012 at 03:06:28PM +0530, Shubhrajyoti D wrote:
> >> The kfree() is taken care of by the spi core (spi_master_release()
> >> fu
lso the put was missed in some of the error handling fix the same.
> There by fixing the missing device_put in some of the error paths.
>
> Cc: Guenter Roeck
Reported-by: may be better here.
> Signed-off-by: Shubhrajyoti D
Acked-by: Guenter Roeck
I suspect that "spi_master_put(
On Wed, Aug 01, 2012 at 03:50:12PM +0800, Shawn Guo wrote:
> On Tue, Jul 31, 2012 at 11:56:50PM -0700, Guenter Roeck wrote:
> > Guess we are in violent agreement. The sequence would then either be
> > master = spi_alloc_device();
>
> The discussion is around spi_all
On Wed, Aug 01, 2012 at 08:45:19AM +0200, Marek Vasut wrote:
> Dear Guenter Roeck,
>
> > On Wed, Aug 01, 2012 at 08:10:37AM +0200, Marek Vasut wrote:
> > > Dear Shawn Guo,
> > >
> > > > On Tue, Jul 31, 2012 at 10:42:28PM -0700, Guenter Roeck wrote:
&g
On Wed, Aug 01, 2012 at 08:10:37AM +0200, Marek Vasut wrote:
> Dear Shawn Guo,
>
> > On Tue, Jul 31, 2012 at 10:42:28PM -0700, Guenter Roeck wrote:
> > > On Wed, Aug 01, 2012 at 01:58:56PM +0800, Shawn Guo wrote:
> > > > On Tue, Jul 31, 2012 at 10:2
On Wed, Aug 01, 2012 at 11:16:15AM +0530, Shubhrajyoti Datta wrote:
> On Wed, Aug 1, 2012 at 10:59 AM, Guenter Roeck wrote:
> > On Wed, Aug 01, 2012 at 07:00:54AM +0200, Marek Vasut wrote:
> >> Dear Shawn Guo,
> >>
> >> > On Tue, Jul 31, 2012 at 08:35:59PM
On Wed, Aug 01, 2012 at 02:28:40PM +0800, Shawn Guo wrote:
> On Tue, Jul 31, 2012 at 10:42:28PM -0700, Guenter Roeck wrote:
> > On Wed, Aug 01, 2012 at 01:58:56PM +0800, Shawn Guo wrote:
> > > On Tue, Jul 31, 2012 at 10:29:47PM -0700, Guenter Roeck wrote:
> > > > Anyo
On Wed, Aug 01, 2012 at 01:58:56PM +0800, Shawn Guo wrote:
> On Tue, Jul 31, 2012 at 10:29:47PM -0700, Guenter Roeck wrote:
> > Anyone up for writing some patches ? If not, I'll do it.
> >
> Go ahead.
>
Ok, will do. It isn't that simple, actually, since at leas
On Wed, Aug 01, 2012 at 07:00:54AM +0200, Marek Vasut wrote:
> Dear Shawn Guo,
>
> > On Tue, Jul 31, 2012 at 08:35:59PM -0700, Guenter Roeck wrote:
> > > I think the call to spi_master_put() triggers the call to
> > > spi_master_release(). If so, kfree() would
On Wed, Aug 01, 2012 at 11:53:36AM +0800, Shawn Guo wrote:
> On Wed, Aug 01, 2012 at 04:31:04AM +0200, Marek Vasut wrote:
> > > Couple of reasons for asking: No other SPI master driver calls it in the
> > > remove function (unless I missed it), most drivers don't call it in the
> > > probe function
Hi Marek,
On Wed, Aug 01, 2012 at 04:31:04AM +0200, Marek Vasut wrote:
> Dear Guenter Roeck,
>
> [...]
>
> > > +static int __devexit mxs_spi_remove(struct platform_device *pdev)
> > > +{
> > > + struct spi_master *host;
> > > +
On Fri, Jul 06, 2012 at 06:17:25AM -, 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.
>
> Based on previous attempt by:
> Fabio Estevam
>
> Signed-off-by: Fabio Estevam
> Signed-off-by: Marek
43 matches
Mail list logo