mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo@jmondi.org>
To: Daniel Scally <djrscally@gmail.com>
Cc: "Krzysztof Hałasa" <khalasa@piap.pl>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Sakari Ailus" <sakari.ailus@iki.fi>,
	"Matteo Lisi" <matteo.lisi@engicam.com>
Subject: Re: [PATCH v5] Driver for ON Semi AR0521 camera sensor
Date: Tue, 12 Oct 2021 09:16:30 +0200	[thread overview]
Message-ID: <YWU2TmTDjkETta3a@uno.localdomain> (raw)
In-Reply-To: <6c89cdb5-4920-8d01-2051-b64b804db9f6@gmail.com>

Hi Daniel,

On Mon, Oct 11, 2021 at 11:22:10PM +0100, Daniel Scally wrote:
> Hi Jacopo
>
> On 11/10/2021 15:34, Jacopo Mondi wrote:
> >>>> +static int ar0521_remove(struct i2c_client *client)
> >>>> +{
> >>>> +	struct v4l2_subdev *sd = i2c_get_clientdata(client);
> >>>> +	struct ar0521_dev *sensor = to_ar0521_dev(sd);
> >>>> +
> >>>> +	v4l2_async_unregister_subdev(&sensor->sd);
> >>>> +	media_entity_cleanup(&sensor->sd.entity);
> >>>> +	v4l2_ctrl_handler_free(&sensor->ctrls.handler);
> >>>> +	pm_runtime_disable(&client->dev);
> >>>> +	pm_runtime_set_suspended(&client->dev);
> >>> set_suspended() then disable maybe ?
> >> Other drivers seem to do it the above way but I don't know the
> >> difference.
> > Maybe I'm wrong but calling set_suspend() after pm_runtime() had been
> > disabled seems pointless. A minor anyway as it's in the driver's
> > remove function.
> >
>
> fwiw, the kernel doc [1] for pm_runtime_set_suspended() does say that
> it's not valid to call it for devices where runtime PM is still enabled.
>

Ah, great! thanks for pointing it out, it was very well visible in the
documentation :) Sorry for the noise!

Cheers
   j

>
> [1]
> https://elixir.bootlin.com/linux/latest/source/include/linux/pm_runtime.h#L510
>

  reply	other threads:[~2021-10-12  7:15 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05 12:05 Krzysztof Hałasa
2021-10-06 17:10 ` Sakari Ailus
2021-10-07  9:11   ` Krzysztof Hałasa
2021-10-09  9:07     ` Jacopo Mondi
2021-10-09 20:18       ` Randy Dunlap
2021-10-09 20:34         ` Sakari Ailus
2021-10-11  6:24           ` Krzysztof Hałasa
2021-10-11  6:20       ` Krzysztof Hałasa
2021-10-11  6:31         ` Laurent Pinchart
2021-10-12  7:52           ` Krzysztof Hałasa
2021-10-09 10:24 ` Jacopo Mondi
2021-10-11 12:19   ` Krzysztof Hałasa
2021-10-11 14:34     ` Jacopo Mondi
2021-10-11 22:22       ` Daniel Scally
2021-10-12  7:16         ` Jacopo Mondi [this message]
2021-10-12 12:24       ` Krzysztof Hałasa
2021-10-12 20:30         ` Sakari Ailus
2021-10-13  5:39           ` Krzysztof Hałasa
2021-10-20 18:43             ` Sakari Ailus
2021-10-22  6:42               ` Krzysztof Hałasa
2021-10-13  8:26         ` Jacopo Mondi
2021-10-13 12:55           ` Krzysztof Hałasa
2021-10-13 15:14             ` Jacopo Mondi
2021-10-14  5:43               ` Krzysztof Hałasa
2021-10-14  7:59                 ` Jacopo Mondi
2021-10-14 10:43                   ` Krzysztof Hałasa

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=YWU2TmTDjkETta3a@uno.localdomain \
    --to=jacopo@jmondi.org \
    --cc=djrscally@gmail.com \
    --cc=khalasa@piap.pl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=matteo.lisi@engicam.com \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@iki.fi \
    /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

all inboxes | Powered by JetHome®