All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Frank Schäfer" <fschaefer.oss@googlemail.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: m.chehab@samsung.com, linux-media@vger.kernel.org
Subject: Re: [PATCH] em28xx: make sure that all subdevices are powered on when needed
Date: Sat, 19 Oct 2013 11:55:26 +0200	[thread overview]
Message-ID: <5262570E.1020707@googlemail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1310182228130.12288@axis700.grange>

Am 18.10.2013 22:30, schrieb Guennadi Liakhovetski:
> Hi Frank
>
> Thanks for the patch
>
> On Wed, 16 Oct 2013, Frank Schäfer wrote:
>
>> Commit 622b828ab7 ("v4l2_subdev: rename tuner s_standby operation to
>> core s_power") replaced the tuner s_standby call in the em28xx driver with
>> a (s_power, 0) call which suspends all subdevices.
>> But it neglected to add corresponding (s_power, 1) calls to make sure that
>> the subdevices are powered on again when needed.
>>
>> This patch fixes this issue by adding a (s_power, 1) call to
>> function em28xx_wake_i2c().
>>
>> Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
>> ---
>>  drivers/media/usb/em28xx/em28xx-core.c |    1 +
>>  1 Datei geändert, 1 Zeile hinzugefügt(+)
>>
>> diff --git a/drivers/media/usb/em28xx/em28xx-core.c b/drivers/media/usb/em28xx/em28xx-core.c
>> index fc157af..8896789 100644
>> --- a/drivers/media/usb/em28xx/em28xx-core.c
>> +++ b/drivers/media/usb/em28xx/em28xx-core.c
>> @@ -1243,6 +1243,7 @@ EXPORT_SYMBOL_GPL(em28xx_init_usb_xfer);
>>   */
>>  void em28xx_wake_i2c(struct em28xx *dev)
>>  {
>> +	v4l2_device_call_all(&dev->v4l2_dev, 0, core,  s_power, 1);
>>  	v4l2_device_call_all(&dev->v4l2_dev, 0, core,  reset, 0);
>>  	v4l2_device_call_all(&dev->v4l2_dev, 0, video, s_routing,
>>  			INPUT(dev->ctl_input)->vmux, 0, 0);
> Do I understand it right, that you're proposing this as an alternative to 
> my power-balancing patch?
Yes.
Your patch was nevertheless useful, because it pointed out further bugs
in em28xx_v4l2_open().
I've sent another RFC patch which should fix them, too.

>  It's certainly smaller and simpler, have you 
> also tested it with the ov2640 and my clock patches to see, whether this 
> really balances calls to .s_power() perfectly?
Yes, I've tested the patch with the VAD Laplace webcam (ov2640), a
Hauppauge HVR 900 and a Terratec Cinergy 200.
Please note that the patch does not balance .s_power() calls perfectly,
it only makes sure that the subdevices are powered on when needed.
This also avoids the scary v4l2-clk warnings.
Due to the various GPIO sequences, I see no chance to make s_power calls
really balanced in such drivers.

Regards,
Frank

> Thanks
> Guennadi
> ---
> Guennadi Liakhovetski, Ph.D.
> Freelance Open-Source Software Developer
> http://www.open-technology.de/


  reply	other threads:[~2013-10-19  9:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16 19:41 [PATCH] em28xx: make sure that all subdevices are powered on when needed Frank Schäfer
2013-10-18 20:30 ` Guennadi Liakhovetski
2013-10-19  9:55   ` Frank Schäfer [this message]
2013-10-19 16:32     ` Guennadi Liakhovetski
2013-10-20 16:29       ` Frank Schäfer
2013-10-20 17:47         ` Guennadi Liakhovetski

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=5262570E.1020707@googlemail.com \
    --to=fschaefer.oss@googlemail.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.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 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.