public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [alsa-devel] [PATCH 2/6] ASoC: codecs: AK4641 depends on GPIOLIB
Date: Mon, 03 Oct 2011 18:19:48 +0200	[thread overview]
Message-ID: <9353092.2X2OeIUYGE@wuerfel> (raw)
In-Reply-To: <20111003152002.GP3731@opensource.wolfsonmicro.com>

On Monday 03 October 2011 16:20:02 Mark Brown wrote:
> On Mon, Oct 03, 2011 at 04:47:07PM +0200, Arnd Bergmann wrote:
> 
> > sound/soc/codecs/wm1250-ev1.c:32:14: error: array type has incomplete element type
> 
> OK, that's the gpio_request_ stuff not being implemented thing that I
> have seen some reports of.  Looks like that's not been stubbed out, but
> for Prima2 the best fix is just to turn on gpiolib since there's no
> excuse for a new platform to not use it.

With the latest changes that Russell did in this direction, we can probably
set ARCH_WANT_OPTIONAL_GPIOLIB on ARM for all platforms that don't
provide their own gpio implementation or already require gpiolib.

However, I see no reason to force-enable gpiolib on platforms that
don't actually have any GPIO. On those, you would still get the same
problem with this code in the wm1250-ev1 driver:

        for (i = 0; i < ARRAY_SIZE(wm1250->gpios); i++) {
                wm1250->gpios[i].gpio = pdata->gpios[i];
                wm1250->gpios[i].label = wm1250_gpio_names[i];
                wm1250->gpios[i].flags = GPIOF_OUT_INIT_LOW;
        }

When the GPIO API is stubbed out, the definition of struct gpio
is empty, so you cannot access the members, which seems to be
intentional behavior.

In order to make that work, I think we need one of the two patches
below.

	Arnd

--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -24,7 +24,11 @@
 #include <linux/errno.h>
 
 struct device;
-struct gpio;
+struct gpio {
+       unsigned        gpio;
+       unsigned long   flags;
+       const char      *label;
+};
 struct gpio_chip;
 
 /*


--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -58,7 +58,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_UDA134X
 	select SND_SOC_UDA1380 if I2C
 	select SND_SOC_WL1273 if MFD_WL1273_CORE
-	select SND_SOC_WM1250_EV1 if I2C
+	select SND_SOC_WM1250_EV1 if I2C && GENERIC_GPIO
 	select SND_SOC_WM2000 if I2C
 	select SND_SOC_WM5100 if I2C
 	select SND_SOC_WM8350 if MFD_WM8350

  reply	other threads:[~2011-10-03 16:19 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-02 20:27 [PATCH 0/6] ASoC fixes from ARM randconfig builds Arnd Bergmann
2011-10-02 20:27 ` [PATCH 1/6] ASoC: codecs/wm8682: use __devexit_p Arnd Bergmann
2011-10-02 20:36   ` Mark Brown
2011-10-02 20:28 ` [PATCH 2/6] ASoC: codecs: AK4641 depends on GPIOLIB Arnd Bergmann
2011-10-02 20:41   ` Mark Brown
2011-10-02 20:53     ` Arnd Bergmann
2011-10-02 21:27       ` Mark Brown
2011-10-03 10:59         ` Arnd Bergmann
2011-10-03 13:45     ` Russell King - ARM Linux
2011-10-03 14:35       ` [alsa-devel] " Mark Brown
2011-10-03 14:47         ` Arnd Bergmann
2011-10-03 15:20           ` Mark Brown
2011-10-03 16:19             ` Arnd Bergmann [this message]
2011-10-03 16:34               ` Mark Brown
2011-10-02 20:28 ` [PATCH 3/6] ASoC: imx: eukrea_tlv320 needs i2c Arnd Bergmann
2011-10-02 20:49   ` Mark Brown
2011-10-02 20:28 ` [PATCH 4/6] ASoC: sh: use correct __iomem annotations Arnd Bergmann
2011-10-02 20:50   ` Mark Brown
2011-10-02 21:20     ` Arnd Bergmann
2011-10-02 20:28 ` [PATCH 5/6] ASoC: samsung: fix Kconfig dependencies Arnd Bergmann
2011-10-02 20:47   ` Mark Brown
2011-10-02 21:14     ` Arnd Bergmann
2011-10-02 21:29       ` Mark Brown
2011-10-03  6:48       ` [alsa-devel] " Sangbeom Kim
2011-10-03 11:50         ` Arnd Bergmann
2011-10-03 12:07           ` Mark Brown
2011-10-03 13:43             ` [PATCH 5/6] ASoC: samsung: wm8994 depends on mfd_wm8994 Arnd Bergmann
2011-10-03 14:08               ` Mark Brown
2011-10-03 14:35                 ` [PATCH v3] " Arnd Bergmann
2011-10-03 14:40                   ` Mark Brown
2011-10-02 20:28 ` [PATCH 6/6] ASoC: samsung: add missing __devexit_p() annotations Arnd Bergmann
2011-10-02 20:48   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9353092.2X2OeIUYGE@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox