[PATCH/RESEND] soc-camera: add runtime pm support for subdevices

2010-02-08 Thread Guennadi Liakhovetski
To save power soc-camera powers subdevices down, when they are not in use, if this is supported by the platform. However, the V4L standard dictates, that video nodes shall preserve configuration between uses. This requires runtime power management, which is implemented by this patch. It allows

Re: [PATCH/RESEND] soc-camera: add runtime pm support for subdevices

2010-02-08 Thread Mauro Carvalho Chehab
Guennadi Liakhovetski wrote: > To save power soc-camera powers subdevices down, when they are not in use, > if this is supported by the platform. However, the V4L standard dictates, > that video nodes shall preserve configuration between uses. This requires > runtime power management, which is i

Re: [PATCH/RESEND] soc-camera: add runtime pm support for subdevices

2010-02-08 Thread Guennadi Liakhovetski
Hi Mauro Thanks for your comments. On Mon, 8 Feb 2010, Mauro Carvalho Chehab wrote: > Guennadi Liakhovetski wrote: > > To save power soc-camera powers subdevices down, when they are not in use, > > if this is supported by the platform. However, the V4L standard dictates, > > that video nodes s

Re: [PATCH/RESEND] soc-camera: add runtime pm support for subdevices

2010-02-08 Thread Mauro Carvalho Chehab
Guennadi Liakhovetski wrote: > Hi Mauro > > Thanks for your comments. > > On Mon, 8 Feb 2010, Mauro Carvalho Chehab wrote: > >> Guennadi Liakhovetski wrote: >>> To save power soc-camera powers subdevices down, when they are not in use, >>> if this is supported by the platform. However, the V4L

Re: [PATCH/RESEND] soc-camera: add runtime pm support for subdevices

2010-02-09 Thread Guennadi Liakhovetski
On Mon, 8 Feb 2010, Mauro Carvalho Chehab wrote: > In fact, on all drivers, there are devices that needs to be turn on only when > streaming is happening: sensors, analog TV/audio demods, digital demods. Also, > a few devices (for example: TV tuners) could eventually be on power off when > no devi

Re: [PATCH/RESEND] soc-camera: add runtime pm support for subdevices

2010-02-09 Thread Hans Verkuil
> On Mon, 8 Feb 2010, Mauro Carvalho Chehab wrote: > >> In fact, on all drivers, there are devices that needs to be turn on only >> when >> streaming is happening: sensors, analog TV/audio demods, digital demods. >> Also, >> a few devices (for example: TV tuners) could eventually be on power off >

Re: [PATCH/RESEND] soc-camera: add runtime pm support for subdevices

2010-02-09 Thread Guennadi Liakhovetski
On Tue, 9 Feb 2010, Hans Verkuil wrote: > > > On Mon, 8 Feb 2010, Mauro Carvalho Chehab wrote: > > > >> In fact, on all drivers, there are devices that needs to be turn on only > >> when > >> streaming is happening: sensors, analog TV/audio demods, digital demods. > >> Also, > >> a few devices (f

Re: [PATCH/RESEND] soc-camera: add runtime pm support for subdevices

2010-02-09 Thread Hans Verkuil
> On Tue, 9 Feb 2010, Hans Verkuil wrote: > >> >> > On Mon, 8 Feb 2010, Mauro Carvalho Chehab wrote: >> > >> >> In fact, on all drivers, there are devices that needs to be turn on >> only >> >> when >> >> streaming is happening: sensors, analog TV/audio demods, digital >> demods. >> >> Also, >> >>

Re: [PATCH/RESEND] soc-camera: add runtime pm support for subdevices

2010-02-09 Thread Guennadi Liakhovetski
On Tue, 9 Feb 2010, Hans Verkuil wrote: > > Of course you're right, and it concerns not only multiple streaming modes, > > but simple cases of multiple openings of one node. I was too fast to > > transfer the implementation from soc-camera to v4l2 - in soc-camera I'm > > counting opens and closes

Re: [PATCH/RESEND] soc-camera: add runtime pm support for subdevices

2010-02-09 Thread Mauro Carvalho Chehab
Hans Verkuil wrote: >> On Tue, 9 Feb 2010, Hans Verkuil wrote: >> On Mon, 8 Feb 2010, Mauro Carvalho Chehab wrote: > In fact, on all drivers, there are devices that needs to be turn on >>> only > when > streaming is happening: sensors, analog TV/audio demods, digital >>> demod

Re: [PATCH/RESEND] soc-camera: add runtime pm support for subdevices

2010-02-09 Thread Hans Verkuil
> Hans Verkuil wrote: >>> On Tue, 9 Feb 2010, Hans Verkuil wrote: >>> > On Mon, 8 Feb 2010, Mauro Carvalho Chehab wrote: > >> In fact, on all drivers, there are devices that needs to be turn on only >> when >> streaming is happening: sensors, analog TV/audio demods, digita

Re: [PATCH/RESEND] soc-camera: add runtime pm support for subdevices

2010-02-09 Thread Mauro Carvalho Chehab
Hans Verkuil wrote: >> Hans Verkuil wrote: >>> But if you have ideas to improve the core to make it easier to add pm >>> support to the drivers that need it, then I am all for it. >> IMO, the runtime pm should be supported at V4L core, but some callbacks >> are >> needed. Also, I can see some clas

Re: [PATCH/RESEND] soc-camera: add runtime pm support for subdevices

2010-02-09 Thread Guennadi Liakhovetski
On Tue, 9 Feb 2010, Hans Verkuil wrote: > 1) is someone using the driver (i.e. is a device node open, which is not > necessarily limited to v4l2-type device nodes)? > 2) are we actively streaming from or to some particular input or output? > > And we probably need some easy way to detect and set

Re: [linux-pm] [PATCH/RESEND] soc-camera: add runtime pm support for subdevices

2010-02-08 Thread Rafael J. Wysocki
On Monday 08 February 2010, Guennadi Liakhovetski wrote: > To save power soc-camera powers subdevices down, when they are not in use, > if this is supported by the platform. However, the V4L standard dictates, > that video nodes shall preserve configuration between uses. This requires > runtime

Re: [linux-pm] [PATCH/RESEND] soc-camera: add runtime pm support for subdevices

2010-02-09 Thread Guennadi Liakhovetski
On Mon, 8 Feb 2010, Rafael J. Wysocki wrote: > On Monday 08 February 2010, Guennadi Liakhovetski wrote: > > To save power soc-camera powers subdevices down, when they are not in use, > > if this is supported by the platform. However, the V4L standard dictates, > > that video nodes shall preserve

Re: [linux-pm] [PATCH/RESEND] soc-camera: add runtime pm support for subdevices

2010-02-09 Thread Alan Stern
On Mon, 8 Feb 2010, Guennadi Liakhovetski wrote: > To save power soc-camera powers subdevices down, when they are not in use, > if this is supported by the platform. However, the V4L standard dictates, > that video nodes shall preserve configuration between uses. This requires > runtime power m

Re: [linux-pm] [PATCH/RESEND] soc-camera: add runtime pm support for subdevices

2010-02-09 Thread Guennadi Liakhovetski
On Tue, 9 Feb 2010, Alan Stern wrote: > On Mon, 8 Feb 2010, Guennadi Liakhovetski wrote: > > > To save power soc-camera powers subdevices down, when they are not in use, > > if this is supported by the platform. However, the V4L standard dictates, > > that video nodes shall preserve configurati

Re: [linux-pm] [PATCH/RESEND] soc-camera: add runtime pm support for subdevices

2010-02-09 Thread Alan Stern
On Tue, 9 Feb 2010, Guennadi Liakhovetski wrote: > On Tue, 9 Feb 2010, Alan Stern wrote: > > > On Mon, 8 Feb 2010, Guennadi Liakhovetski wrote: > > > > > To save power soc-camera powers subdevices down, when they are not in > > > use, > > > if this is supported by the platform. However, the V4