From: Hans Verkuil <hverkuil@xs4all.nl>
To: David Brownell <david-b@pacbell.net>
Cc: Laurent Pinchart <laurent.pinchart@skynet.be>,
video4linux-list@redhat.com,
"Trilok Soni" <soni.trilok@gmail.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"davinci-linux-open-source@linux.davincidsp.com"
<davinci-linux-open-source@linux.davincidsp.com>,
linux-kernel@vger.kernel.org
Subject: Re: v4l2_device/v4l2_subdev: please review (PATCH 1/3)
Date: Sat, 29 Nov 2008 20:53:15 +0100 [thread overview]
Message-ID: <200811292053.16121.hverkuil@xs4all.nl> (raw)
In-Reply-To: <200811291146.44371.david-b@pacbell.net>
On Saturday 29 November 2008 20:46:43 David Brownell wrote:
> On Saturday 29 November 2008, Hans Verkuil wrote:
> > > > +And this to go from an i2c_client to a v4l2_subdev struct:
> > > > +
> > > > + struct v4l2_subdev *sd = i2c_get_clientdata(client);
> > > > +
> > > > +Finally you need to make a command function to make
> > > > +driver->command() call the right subdev_ops functions:
> > > > +
> > > > +static int
> > > > +subdev_command(struct i2c_client *client, unsigned cmd, void
> > > > *arg) +{
> > > > + return v4l2_subdev_command(i2c_get_clientdata(client), cmd,
> > > > arg); +}
> > > > +
> > > > +If driver->command is never used then you can leave this out.
> > > > +Eventually the driver->command usage should be removed from
> > > > v4l.
> > >
> > > Should it then be added to the list of features scheduled for
> > > removal?
> >
> > No, driver->command is part of the i2c subsystem and we are not the
> > only users, so it can't be scheduled for removal.
>
> ISTR that the only use of the i2c_driver.command() mechanism
> is for video/DVB driver support. It's kind of an ugly wart,
> and it'd be good to see such ioctl-ish interfaces vanish.
>
> This came up a while back as part of a "how can we clean up
> the I2C stack" discussion. So it would be nice if V4L2 wasn't
> effectively adding new reasons (and advice) to use this.
If v4l is indeed the only user, then once all i2c drivers are converted
to this new sub device API, then command can indeed go away.
Would be nice, but it will probably take a few kernel cycles before we
are there. It's a lot of work, but very worthwhile in my opinion.
Regards,
Hans
--
Hans Verkuil - video4linux developer - sponsored by TANDBERG
next prev parent reply other threads:[~2008-11-29 19:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200811242309.37489.hverkuil@xs4all.nl>
2008-11-25 6:51 ` v4l2_device/v4l2_subdev: please review Trilok Soni
2008-11-25 7:10 ` Hans Verkuil
2008-11-25 7:27 ` Trilok Soni
2008-11-25 17:48 ` v4l2_device/v4l2_subdev: please review (PATCH 1/3) Hans Verkuil
2008-11-28 23:34 ` Laurent Pinchart
2008-11-29 14:19 ` Hans Verkuil
2008-11-29 19:08 ` Guennadi Liakhovetski
2008-11-30 13:58 ` Hans Verkuil
2008-11-29 19:46 ` David Brownell
2008-11-29 19:53 ` Hans Verkuil [this message]
2008-11-30 21:02 ` Laurent Pinchart
2008-11-30 21:40 ` Hans Verkuil
2008-11-25 17:48 ` v4l2_device/v4l2_subdev: please review (PATCH 2/3) Hans Verkuil
2008-11-25 17:49 ` v4l2_device/v4l2_subdev: please review (PATCH 3/3) Hans Verkuil
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=200811292053.16121.hverkuil@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=david-b@pacbell.net \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=laurent.pinchart@skynet.be \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=soni.trilok@gmail.com \
--cc=video4linux-list@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®