public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: Mark Brown <broonie-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Dynamically-allocated i2c_device_id vs MODULE_DEVICE_TABLE
Date: Fri, 23 Jan 2009 20:23:32 -0600	[thread overview]
Message-ID: <497A7BA4.2080908@freescale.com> (raw)
In-Reply-To: <20090124012817.GA31775-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>

Mark Brown wrote:

> Really what
> you're having to do here is fairly nasty and there's no good reason for
> it to be supported - if something is being registered dynamically and
> passing instantiation specific data around it really should be the
> device and not the driver.

What we need is a way for the codec driver to do its stuff without needing a 
socdev.

I think I see your point, though.  I'm calling i2c_add_driver, which 
technically could result in my i2c_probe function being called multiple times, 
if there are multiple matches in the device tree.  I'll have to check that out 
on Monday.

 > The fact that attempting to do this looks
> bad is a win on the part of the I2C core.
>
> For now an idiomatic solution for ASoC drivers is to have a single
> static variable that you use to get the socdev through.

Well, that's what I do today.  I was hoping to avoid that, but if I'm right 
about i2c_add_driver, then this trick doesn't really work either.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

  parent reply	other threads:[~2009-01-24  2:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-23 21:03 Dynamically-allocated i2c_device_id vs MODULE_DEVICE_TABLE Timur Tabi
     [not found] ` <497A3097.1030808-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2009-01-23 22:26   ` Jon Smirl
2009-01-24  1:28   ` Mark Brown
     [not found]     ` <20090124012817.GA31775-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2009-01-24  2:23       ` Timur Tabi [this message]
     [not found]         ` <497A7BA4.2080908-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2009-01-24 11:39           ` Mark Brown
2009-01-24 16:50   ` Ben Dooks
     [not found]     ` <20090124165040.GL8032-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
2009-01-26 18:06       ` Timur Tabi
     [not found]         ` <ed82fe3e0901261006u2223ccb3n5d7b3be9a85df7c7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-01-26 19:16           ` Jon Smirl

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=497A7BA4.2080908@freescale.com \
    --to=timur-kzfg59tc24xl57midrcfdg@public.gmane.org \
    --cc=broonie-GFdadSzt00ze9xe1eoZjHA@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.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