All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org,
	Jean-Francois Moine <moinejf@free.fr>,
	Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [RFCv1 PATCH 1/7] gspca: allow subdrivers to use the control framework.
Date: Sat, 05 May 2012 16:59:30 +0200	[thread overview]
Message-ID: <4FA54052.1090009@redhat.com> (raw)
In-Reply-To: <201205051650.03626.hverkuil@xs4all.nl>

Hi,

On 05/05/2012 04:50 PM, Hans Verkuil wrote:
> On Sat May 5 2012 16:46:32 Hans de Goede wrote:
>> Hi,
>>
>> On 05/05/2012 10:34 AM, Hans Verkuil wrote:
>>> On Sat May 5 2012 09:43:01 Hans de Goede wrote:
>>>> Hi,
>>>>
>>>> I'm slowly working my way though this series today (both review, as well
>>>> as some tweaks and testing).
>>>
>>> Thanks for that!
>>>
>>> One note: I initialized the controls in sd_init. That's wrong, it should be
>>> sd_config. sd_init is also called on resume, so that would initialize the
>>> controls twice.
>>
>> You cannot move the initializing of the controls to sd_config, since in many
>> cases the sensor probing is done in sd_init, and we need to know the sensor
>> type to init the controls.
>
> Or you move the sensor probing to sd_config as I did. It makes no sense
> anyway to do sensor probing every time you resume.
>
> Unless there is another good reason for doing the probing in sd_init I prefer
> to move it to sd_config.

Sensor probing does more then just sensor probing, it also configures
things like the i2c clockrate, and if the bus between bridge and sensor
is spi / i2c or 3-wire, or whatever ...

After a suspend resume all bets are of wrt bridge state, so we prefer to
always do a full re-init as we do on initial probe, so that we (hopefully)
will put the bridge back in a sane state.

I think moving the probing from init to config is a bad idea, the chance
that we will get regressions (after a suspend/resume) from this are too
big IMHO.

Regards,

Hans

  reply	other threads:[~2012-05-05 14:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-28 15:09 [RFCv1 PATCH 0/7] gspca: allow use of control framework and other fixes Hans Verkuil
2012-04-28 15:09 ` [RFCv1 PATCH 1/7] gspca: allow subdrivers to use the control framework Hans Verkuil
2012-04-28 15:09   ` [RFCv1 PATCH 2/7] zc3xx: convert to " Hans Verkuil
2012-05-05 14:35     ` Hans de Goede
2012-04-28 15:09   ` [RFCv1 PATCH 3/7] sn9c20x: " Hans Verkuil
2012-04-28 15:09   ` [RFCv1 PATCH 4/7] gspca: use video_drvdata(file) instead of file->private_data Hans Verkuil
2012-04-28 15:09   ` [RFCv1 PATCH 5/7] gscpa: use v4l2_fh and add G/S_PRIORITY support Hans Verkuil
2012-04-28 15:09   ` [RFCv1 PATCH 6/7] gspca: add support for control events Hans Verkuil
2012-04-28 15:09   ` [RFCv1 PATCH 7/7] gspca: fix querycap and incorrect return codes Hans Verkuil
2012-05-05  7:43   ` [RFCv1 PATCH 1/7] gspca: allow subdrivers to use the control framework Hans de Goede
2012-05-05  8:34     ` Hans Verkuil
2012-05-05 14:46       ` Hans de Goede
2012-05-05 14:50         ` Hans Verkuil
2012-05-05 14:59           ` Hans de Goede [this message]
2012-05-05 17:20             ` Jean-Francois Moine
2012-05-05  9:14     ` Hans Verkuil
2012-05-05 14:44       ` Hans de Goede
2012-05-05 15:02         ` Hans Verkuil
2012-05-05 15:41           ` Hans de Goede
2012-05-05 15:05         ` Hans de Goede
2012-05-05 15:40           ` Hans de Goede
2012-05-05 17:24           ` Jean-Francois Moine
2012-04-30 11:13 ` [RFCv1 PATCH 0/7] gspca: allow use of control framework and other fixes Hans de Goede
2012-05-01 10:28   ` Jean-Francois Moine
2012-05-05  7:38     ` Hans de Goede

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=4FA54052.1090009@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=moinejf@free.fr \
    /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.