All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] SPI : spi-pxa2xx : fix spi init of WM510205 codec via ACPI (resend)
@ 2015-06-23 11:16 Christian Hartmann
  2015-06-24  8:23 ` Charles Keepax
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Hartmann @ 2015-06-23 11:16 UTC (permalink / raw)
  To: patches, alsa-devel

Hello,

I have one patch that enables the spi initialization of the WM510205 audio codec
Without the patch, this message indicates that the codec chip fails
with the current chipselect number in spi-pxa2xx:


[ 0.296256] pxa2xx-spi 80860F0E:00: cs1 >= max 1
[ 0.296270] spi_master spi32766: failed to add SPI device
WM510205:00 from ACPI

So raise num_chipselect by one to enable the codec. The WM510202 is on
chipselect = 1.

With the patch applied I got in dmesg now:

[    6.056829] pxa2xx-spi 80860F0E:00: no DMA channels available, using PIO
[    6.067035] pxa2xx-spi 80860F0E:00: registered master spi32766 (dynamic)
[    6.067214] spi spi-WM510205:00: 8333333 Hz actual, PIO
[    6.067221] spi spi-WM510205:00: setup mode 0, 8 bits/w, 8000000 Hz max --> 0
[    6.067287] pxa2xx-spi 80860F0E:00: registered child spi-WM510205:00

Signed-off-by: Christian Hartmann <cornogle@googlemail.com>
---
 drivers/spi/spi-pxa2xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index e3223ac..7b54b04 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1279,7 +1279,7 @@ pxa2xx_spi_acpi_get_pdata(struct platform_device *pdev)
     if (adev->pnp.unique_id && !kstrtoint(adev->pnp.unique_id, 0, &devid))
         ssp->port_id = devid;

-    pdata->num_chipselect = 1;
+    pdata->num_chipselect = 2;
     pdata->enable_dma = true;

     return pdata;
-- 
1.8.3.1


would be nice to hear some feedback or comments about this patch.

Notice: That is my first attempt to make the codec chip via ACPI
(DSDT) configuration
working on Linux systems and some other patches are needed to let the
codec work together with the intel_sst_acpi driver under baytrail systems.
Currently I am trying to write the also needed machine driver which
binds to this
codec chip. Also the arizona-core / arizona-spi drivers have to be patched,
but that patches will be landing later...

cheers
Christian Hartmann

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] SPI : spi-pxa2xx : fix spi init of WM510205 codec via ACPI (resend)
  2015-06-23 11:16 [PATCH 1/1] SPI : spi-pxa2xx : fix spi init of WM510205 codec via ACPI (resend) Christian Hartmann
@ 2015-06-24  8:23 ` Charles Keepax
  0 siblings, 0 replies; 2+ messages in thread
From: Charles Keepax @ 2015-06-24  8:23 UTC (permalink / raw)
  To: Christian Hartmann; +Cc: alsa-devel, patches

On Tue, Jun 23, 2015 at 01:16:54PM +0200, Christian Hartmann wrote:
> Hello,
> 
> I have one patch that enables the spi initialization of the WM510205 audio codec
> Without the patch, this message indicates that the codec chip fails
> with the current chipselect number in spi-pxa2xx:
> 
> 
> [ 0.296256] pxa2xx-spi 80860F0E:00: cs1 >= max 1
> [ 0.296270] spi_master spi32766: failed to add SPI device
> WM510205:00 from ACPI
> 
> So raise num_chipselect by one to enable the codec. The WM510202 is on
> chipselect = 1.
> 
> With the patch applied I got in dmesg now:
> 
> [    6.056829] pxa2xx-spi 80860F0E:00: no DMA channels available, using PIO
> [    6.067035] pxa2xx-spi 80860F0E:00: registered master spi32766 (dynamic)
> [    6.067214] spi spi-WM510205:00: 8333333 Hz actual, PIO
> [    6.067221] spi spi-WM510205:00: setup mode 0, 8 bits/w, 8000000 Hz max --> 0
> [    6.067287] pxa2xx-spi 80860F0E:00: registered child spi-WM510205:00
> 
> Signed-off-by: Christian Hartmann <cornogle@googlemail.com>
> ---

You need to send the patch to the right people, you definitely
need to send the patch to Mark Brown as he is maintainer for the
SPI subsystem so will be the person who applies your patch.

Additionally, you probably want to try to look for if there are
any active people on this particular spi driver and include them.
The script get_maintainer.pl is a good starting point although it
often includes too few people without the git option and too many
with the git option.

Thanks,
Charles

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-24  8:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-23 11:16 [PATCH 1/1] SPI : spi-pxa2xx : fix spi init of WM510205 codec via ACPI (resend) Christian Hartmann
2015-06-24  8:23 ` Charles Keepax

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.