All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Ryan Mallon <ryan-7Wk5F4Od5/oYd5yxfr4S2w@public.gmane.org>
Cc: i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Subject: Re: New style i2c drivers for ALSA SoC
Date: Mon, 12 May 2008 23:05:25 +0200	[thread overview]
Message-ID: <20080512230525.0d3952bd@hyperion.delvare> (raw)
In-Reply-To: <4828AE22.2030705-7Wk5F4Od5/oYd5yxfr4S2w@public.gmane.org>

Hi Ryan,

On Tue, 13 May 2008 08:52:50 +1200, Ryan Mallon wrote:
> Jean Delvare wrote:
> > Since 2.6.26-rc1, you can and should provide a list of devices
> > supported by your driver. Your driver definition would look like:
> > 
> > static const struct i2c_device_id aic2x_i2c_id[] = {
> > 	{ "tlv320aic2x", 0 },
> > 	{ }
> > };
> > MODULE_DEVICE_TABLE(i2c, aic2x_i2c_id);
> 
> Done. I had thought this was option if a driver only supported a single
> device?

It is optional up to and including 2.6.26-rc2, but hopefully I'll be
done with the cleanups for 2.6.26-rc3 and using .id_table will be the
only way for a driver to match its devices.

> 
> > static struct i2c_driver aic2x_i2c_driver = {
> > 	.driver		= {
> > 		.name	= "tlv320aic2x",
> > 		.owner	= THIS_MODULE,
> > 	},
> > 	.probe		= aic2x_i2c_probe,
> > 	.remove		= aic2x_i2c_remove,
> > 	.id_table	= aic2x_i2c_id,
> > };
> > 
> > Also note that there's already a driver in the kernel tree
> > (drivers/media/video/tlv320aic23b.c) for apparently the same hardware,
> > so maybe there's some code to share.
> 
> Yes. The tlv320aic23b is both an audio codec and a video decoder of some
> sort. We only use the audio codec part on our particular board. The
> driver under drivers/media/video is pretty minimal, and appears that it
> may have been hard coded for a particular graphics card that it appears
> on? The driver I have for the audio codec is already substantially
> larger. There is also the problem that the soc codec stuff should live
> under sound/soc/codecs and video decoders should live under
> drivers/media/video. Assuming I post patches for my work at some stage
> (which I intend to do), perhaps it is easier to have two drivers to
> start with, and then merge them if people have hardware which is using
> both the audio and video codec functionality?

I don't know what it the best approach myself. I just wanted you to be
aware that this other driver existed.

-- 
Jean Delvare

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

  parent reply	other threads:[~2008-05-12 21:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-12  0:57 New style i2c drivers for ALSA SoC Ryan Mallon
     [not found] ` <482795E7.9040007-7Wk5F4Od5/oYd5yxfr4S2w@public.gmane.org>
2008-05-12  6:20   ` Jean Delvare
     [not found]     ` <20080512082025.01e5d0c0-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-05-12 20:52       ` Ryan Mallon
     [not found]         ` <4828AE22.2030705-7Wk5F4Od5/oYd5yxfr4S2w@public.gmane.org>
2008-05-12 21:05           ` Jean Delvare [this message]
2008-05-12 21:15   ` Ben Dooks

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=20080512230525.0d3952bd@hyperion.delvare \
    --to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
    --cc=i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
    --cc=ryan-7Wk5F4Od5/oYd5yxfr4S2w@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 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.