linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Frank Schäfer" <fschaefer.oss@googlemail.com>
To: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: em28xx + ov2640 and v4l2-clk
Date: Sun, 13 Oct 2013 16:00:49 +0200	[thread overview]
Message-ID: <525AA791.1080306@googlemail.com> (raw)
In-Reply-To: <20131012064555.380f692e.m.chehab@samsung.com>

[snip]

Am 12.10.2013 05:45, schrieb Mauro Carvalho Chehab:
>
> Changing the input will likely power on the device. The design of the
> old suspend callback were to call it when the device is not being used.
> Any try to use the device makes it to wake up, as it makes no sense to
> use a device in standby state.
>
> Also, changing the power states is a requirement, when switching the
> mode between analog, digital TV (or capture without tuner - although I
> think em28xx will turn the analog tuner on in this case, even not being
> required).
>
> The patches that just rename the previous standby callback to s_power 
> callback did a crap job, as it didn't consider the nuances of the API
> used on that time nor they didn't change the drivers to move the GPIO
> bits into s_power().
>
> Looking with today's view, it would likely be better if those patches
> were just adding a power callback without touching the standby callback.

The main problem is, that since commit 622b828ab7 ("v4l2_subdev: rename
tuner s_standby operation to core s_power") all subdevices are powered
down, not only the tuners.
But other subdevices may not wake up automatically when needed, so this
commit should also have introduced (s_power, 1) calls.
At least for em28xx it seems that this din't cause any regressions up to
now, because none of the subdevs used by this driver did anything
essential in its s_power callbacks (most of them don't support it at all).
But it's of course a ticking bomb.
The introduction of v4l2-clk enabling/disabling in the sensor subdevs'
(soc_cameras') s_power callbacks now let this bomb in em28xx explode.
This time, it only caused scary warnings/traces, but it could be
non-working (never waking up) devices next time.

> I suspect that the solution would be to fork s_power into two different
> callbacks: one asymetric to just put the device into suspend mode (as
> before), and another symmetric one, where the device needs to be explicitly
> enabled before its usage and disabled at suspend or driver exit.
>

Or, if we want to keep the API as is, we have to introduce (s_power, 1)
calls in the affected drivers to avoid regressions due to future subdev
changes.

Regards,
Frank


  reply	other threads:[~2013-10-13 14:00 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-16 19:00 em28xx + ov2640 and v4l2-clk Frank Schäfer
2013-08-17 10:51 ` Guennadi Liakhovetski
2013-08-18 11:40   ` Frank Schäfer
2013-08-18 15:20     ` Mauro Carvalho Chehab
2013-08-20 13:38       ` Laurent Pinchart
2013-08-20 15:31         ` Mauro Carvalho Chehab
2013-08-20 16:39           ` Frank Schäfer
2013-08-24 18:52             ` Mauro Carvalho Chehab
2013-08-20 16:34         ` Frank Schäfer
2013-08-21 20:39           ` Frank Schäfer
2013-08-21 21:42             ` Sylwester Nawrocki
2013-08-22 22:15               ` Frank Schäfer
2013-08-24 19:03                 ` Mauro Carvalho Chehab
2013-08-24 21:28                   ` Sylwester Nawrocki
2013-08-26 13:54                   ` Guennadi Liakhovetski
2013-08-26 14:09                     ` Mauro Carvalho Chehab
2013-08-27 12:52                       ` Laurent Pinchart
2013-08-27 14:08                         ` Mauro Carvalho Chehab
2013-08-27 15:27                           ` Laurent Pinchart
2013-08-27 16:00                             ` Mauro Carvalho Chehab
2013-08-28  9:00                               ` Sylwester Nawrocki
2013-08-28  9:27                                 ` Mauro Carvalho Chehab
2013-08-28  9:50                                   ` Laurent Pinchart
2013-09-02 18:30                         ` Frank Schäfer
2013-09-02 21:44                           ` Sylwester Nawrocki
2013-09-02 22:02                           ` Laurent Pinchart
2013-08-30 10:30                 ` Guennadi Liakhovetski
2013-08-30 13:43                   ` Frank Schäfer
2013-10-08 16:21       ` Frank Schäfer
2013-10-08 16:38         ` Guennadi Liakhovetski
2013-10-10 13:33           ` Frank Schäfer
2013-10-10 13:50             ` Guennadi Liakhovetski
2013-10-10 17:15               ` Frank Schäfer
2013-10-10 17:50                 ` Guennadi Liakhovetski
2013-10-10 18:38                   ` Frank Schäfer
2013-10-10 18:57                     ` Frank Schäfer
2013-10-12  3:45               ` Mauro Carvalho Chehab
2013-10-13 14:00                 ` Frank Schäfer [this message]
2013-10-16 19:39                   ` Frank Schäfer
2013-10-15  7:37                 ` Guennadi Liakhovetski
2013-10-15  8:37                   ` 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=525AA791.1080306@googlemail.com \
    --to=fschaefer.oss@googlemail.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=hans.verkuil@cisco.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).