All of lore.kernel.org
 help / color / mirror / Atom feed
* v4l2 subdevices and fops
       [not found]     ` <4B84BA3A.3090809@redhat.com>
@ 2010-03-08 12:44       ` m7aalton
  2010-03-08 18:03         ` Hans Verkuil
  0 siblings, 1 reply; 3+ messages in thread
From: m7aalton @ 2010-03-08 12:44 UTC (permalink / raw)
  To: linux-media

Hello.

I'm writing a radio driver which uses subdevice file operations to
handle RDS reception and transmission. Some IOCTL call-backs to the main
device are easy to pass to the subdevice driver. To me it seems that
adding the fops pointer to the following struct in v4l2-subdev.h would
make passing the file operation call-backs equally convenient.

struct v4l2_subdev_ops {
	const struct v4l2_subdev_core_ops  *core;
	const struct v4l2_subdev_tuner_ops *tuner;
	const struct v4l2_subdev_audio_ops *audio;
	const struct v4l2_subdev_video_ops *video;
	const struct v4l2_subdev_pad_ops   *pad;
};

Could I expand the above struct in the way I described? Have I missed
something? Do you understand what I'm saying? :-)

Cheers,
Matti 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: v4l2 subdevices and fops
  2010-03-08 12:44       ` v4l2 subdevices and fops m7aalton
@ 2010-03-08 18:03         ` Hans Verkuil
  2010-03-09  8:38           ` m7aalton
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Verkuil @ 2010-03-08 18:03 UTC (permalink / raw)
  To: matti.j.aaltonen; +Cc: linux-media

On Monday 08 March 2010 13:44:25 m7aalton wrote:
> Hello.
> 
> I'm writing a radio driver which uses subdevice file operations to
> handle RDS reception and transmission. Some IOCTL call-backs to the main
> device are easy to pass to the subdevice driver. To me it seems that
> adding the fops pointer to the following struct in v4l2-subdev.h would
> make passing the file operation call-backs equally convenient.
> 
> struct v4l2_subdev_ops {
> 	const struct v4l2_subdev_core_ops  *core;
> 	const struct v4l2_subdev_tuner_ops *tuner;
> 	const struct v4l2_subdev_audio_ops *audio;
> 	const struct v4l2_subdev_video_ops *video;
> 	const struct v4l2_subdev_pad_ops   *pad;
> };
> 
> Could I expand the above struct in the way I described? Have I missed
> something? Do you understand what I'm saying? :-)

Yes, I understand :-)

It is possible to add rds ops. The question is whether it is used often enough
to warrant the addition of a new rds_ops struct. Until recently rds was a rare
beast to see inside a driver. If the rds ops are general enough to be used in
more than one subdev driver, then I think you should make a proposal. If the
rds ops are unique to your driver, though, then it should be done through
the core ops ioctl callback.

Regards,

	Hans

> 
> Cheers,
> Matti 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: v4l2 subdevices and fops
  2010-03-08 18:03         ` Hans Verkuil
@ 2010-03-09  8:38           ` m7aalton
  0 siblings, 0 replies; 3+ messages in thread
From: m7aalton @ 2010-03-09  8:38 UTC (permalink / raw)
  To: ext Hans Verkuil; +Cc: linux-media

Hi.

On Mon, 2010-03-08 at 19:03 +0100, ext Hans Verkuil wrote:
> On Monday 08 March 2010 13:44:25 m7aalton wrote:
> > Hello.
> > 
> > I'm writing a radio driver which uses subdevice file operations to
> > handle RDS reception and transmission. Some IOCTL call-backs to the main
> > device are easy to pass to the subdevice driver. To me it seems that
> > adding the fops pointer to the following struct in v4l2-subdev.h would
> > make passing the file operation call-backs equally convenient.
> > 
> > struct v4l2_subdev_ops {
> > 	const struct v4l2_subdev_core_ops  *core;
> > 	const struct v4l2_subdev_tuner_ops *tuner;
> > 	const struct v4l2_subdev_audio_ops *audio;
> > 	const struct v4l2_subdev_video_ops *video;
> > 	const struct v4l2_subdev_pad_ops   *pad;
> > };
> > 
> > Could I expand the above struct in the way I described? Have I missed
> > something? Do you understand what I'm saying? :-)
> 
> Yes, I understand :-)
> 
> It is possible to add rds ops. The question is whether it is used often enough
> to warrant the addition of a new rds_ops struct. Until recently rds was a rare
> beast to see inside a driver. If the rds ops are general enough to be used in
> more than one subdev driver, then I think you should make a proposal. If the
> rds ops are unique to your driver, though, then it should be done through
> the core ops ioctl callback.

I mean file operation like open, close, read and write, which should be
general enough. Our driver just passes through the RDS data... But it's
probably best if we send the patches to this list so that everyone can
comment. It may need a couple of iterations before it gets accepted.

Thanks,

Matti

> Regards,
> 
> 	Hans
> 
> > 
> > Cheers,
> > Matti 
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-media" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> > 
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-09  8:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1243448117.8697.790.camel@alkaloid.netup.ru>
     [not found] ` <20090601045241.2e27b26a@pedra.chehab.org>
     [not found]   ` <1266854419.16063.92.camel@alkaloid.netup.ru>
     [not found]     ` <4B84BA3A.3090809@redhat.com>
2010-03-08 12:44       ` v4l2 subdevices and fops m7aalton
2010-03-08 18:03         ` Hans Verkuil
2010-03-09  8:38           ` m7aalton

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.