All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH 2/2] ASoC: Add ADAU1977 driver
Date: Tue, 04 Feb 2014 14:31:19 +0100	[thread overview]
Message-ID: <52F0EBA7.7000501@metafoo.de> (raw)
In-Reply-To: <20140204121224.GW22609@sirena.org.uk>

On 02/04/2014 01:12 PM, Mark Brown wrote:
> On Tue, Feb 04, 2014 at 12:16:38PM +0100, Lars-Peter Clausen wrote:
>> On 02/03/2014 07:40 PM, Mark Brown wrote:
>
>>>>   sound/soc/codecs/adau1977-i2c.c        |  58 ++
>>>>   sound/soc/codecs/adau1977-spi.c        |  73 +++
>
>>> This isn't the general style, if we want to do that we should be
>>> converting all the other drivers.
>
>> I think we want to change it. Cause as it is right now we always get
>> issues when the SPI core is build-in, but the I2C core is built as a
>> module. Using the scheme used in this driver the core module for the
>> driver does not depend on either framework, but provides a library
>> to the bus specific modules. E.g. if SPI is built-in and the SPI
>> driver for the ADAU1977 is built-in the core will also be built-in,
>> but it is still possible to build I2C as a module and also build the
>> ADAU1977 I2C driver as a module. And I know there is
>> SND_SOC_I2C_AND_SPI, but in my opinion it's a hack to work around
>> the issue. E.g. if you have a board driver and the board driver
>> selects the CODEC driver, the board driver also has to depend on
>> SND_SOC_I2C_AND_SPI to avoid any issues (None of the board drivers
>> do this right now).
>
> I'm having a hard time seeing that as a meaningful issue to be honest -
> only I2C has the modular option and I'm never terribly convinced about
> the realism of scenarios that trigger this.  In any case the main thing
> is that we shouldn't be silently putting something like this into driver
> submissions, we should be actively making the change to all drivers.

I think this is the cleaner approach rather than the #ifdef mess we 
currently find in drivers with more than one interface. And there is the 
thing that you can actually build a config that results in a build error 
which triggers the occasional randconfig build failures for ASoC. Once the 
last three drivers that still soc-io have been converted to regmap I think 
we should move the selection of REGMAP_I2C and REGMAP_SPI to the individual 
drivers rather letting the core select them unconditionally. Using this new 
scheme will make it easier to avoid the situation where you end up selection 
REGMAP_I2C or REGMAP_SPI even though I2S or SPI_MASTER is not selected. I 
don't have a problem with updating the other drivers to use the new scheme, 
but it's not like we have to update them all at once in one atomic step. And 
you have to start somewhere.

  reply	other threads:[~2014-02-04 13:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-03 14:57 [PATCH 1/2] devicetree: Add devicetree bindings documentation for the ADAU1977 Lars-Peter Clausen
2014-02-03 14:57 ` [PATCH 2/2] ASoC: Add ADAU1977 driver Lars-Peter Clausen
2014-02-03 18:40   ` Mark Brown
2014-02-04 11:16     ` Lars-Peter Clausen
2014-02-04 12:12       ` Mark Brown
2014-02-04 13:31         ` Lars-Peter Clausen [this message]
2014-02-04 14:10           ` Mark Brown
     [not found] ` <1391439428-3198-1-git-send-email-lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2014-02-03 15:15   ` [PATCH 1/2] devicetree: Add devicetree bindings documentation for the ADAU1977 Geert Uytterhoeven
     [not found]     ` <CAMuHMdVQGZE+1YuWCnJefzy08kb6vNmRN8k+1-K82BubOBAOxQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-04 11:48       ` Lars-Peter Clausen

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=52F0EBA7.7000501@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    /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 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.