From: Johan Hovold <johan@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Johan Hovold <johan@kernel.org>,
Michael Trimarchi <michael@amarulasolutions.com>,
Jacob Siverskog <jacob@teenage.engineering>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] ASoC: pcm179x: Add I2C interface driver
Date: Tue, 19 Jan 2016 15:11:44 +0100 [thread overview]
Message-ID: <20160119141144.GB12069@localhost> (raw)
In-Reply-To: <20160119122524.GM6588@sirena.org.uk>
On Tue, Jan 19, 2016 at 12:25:24PM +0000, Mark Brown wrote:
> On Mon, Jan 18, 2016 at 05:56:57PM +0100, Johan Hovold wrote:
> > On Mon, Jan 18, 2016 at 05:14:42PM +0100, Michael Trimarchi wrote:
>
> > > > + { .compatible = "ti,pcm1792a", },
> > > > + { }
> > > > +};
> > > > +MODULE_DEVICE_TABLE(of, pcm179x_of_match);
>
> > > can match go in the common part?
>
> > For matching purposes it could, but that would prevent the OF-aliases
> > from being defined for the driver modules.
>
> > There are a couple of codec drivers that have taken this route, and it
> > works as long as they also define a legacy (e.g. i2c_device_id) table
> > that modalias autoloading can fall back to.
>
> > But having having the common module carry the OF-aliases does not seem
> > like the right thing to do (e.g. as the common module cannot drive
> > anything on its own) even if it avoids a copy of the OF id table.
>
> This does seem like something that the modules code should be able to
> cope with - we have a reference from the driver struct to the table
> which you'd really expect it to be using. We already have some issues
> there with userspace not handling multiple modaliases terribly well IIRC.
That reference is only used for matching, while the aliases are
generated from the MODULE_DEVICE_TABLE macro (and elf magic).
Even if this sometimes means duplicating an id-table (and i2c and spi OF
id tables aren't necessarily always identical either), it seems to me
that the MODULE_DEVICE_TABLE should go in the actual driver rather than
any module dependency.
Thanks,
Johan
next prev parent reply other threads:[~2016-01-19 14:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-18 15:57 [PATCH 0/3] ASoC: pcm179x: Add I2C support, declare support for continuous rates Jacob Siverskog
2016-01-18 15:57 ` [PATCH 1/3] ASoC: pcm179x: Split into core and SPI parts Jacob Siverskog
2016-01-18 15:57 ` Jacob Siverskog
2016-01-18 18:24 ` [alsa-devel] " kbuild test robot
2016-01-18 18:24 ` kbuild test robot
2016-01-18 19:59 ` Johan Hovold
2016-01-18 15:57 ` [PATCH 2/3] ASoC: pcm179x: Add I2C interface driver Jacob Siverskog
2016-01-18 16:14 ` Michael Trimarchi
2016-01-18 16:14 ` Michael Trimarchi
2016-01-18 16:56 ` Johan Hovold
2016-01-19 12:25 ` Mark Brown
2016-01-19 14:11 ` Johan Hovold [this message]
2016-01-19 16:32 ` Mark Brown
2016-01-21 10:59 ` Johan Hovold
2016-01-18 19:10 ` kbuild test robot
2016-01-18 19:10 ` kbuild test robot
2016-01-18 15:57 ` [PATCH 3/3] ASoC: pcm179x: Support continuous rates Jacob Siverskog
2016-01-18 16:06 ` [PATCH 0/3] ASoC: pcm179x: Add I2C support, declare support for " Michael Trimarchi
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=20160119141144.GB12069@localhost \
--to=johan@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=jacob@teenage.engineering \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@amarulasolutions.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.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.