Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>,
	oe-kbuild-all@lists.linux.dev, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	Naushir Patuck <naush@raspberrypi.com>,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v4 3/4] media: raspberrypi: Add support for RP1-CFE
Date: Tue, 10 Sep 2024 10:21:54 +0000	[thread overview]
Message-ID: <ZuAdwpUHQn4fdDjc@kekkonen.localdomain> (raw)
In-Reply-To: <20240910101137.GD6996@pendragon.ideasonboard.com>

Hi Laurent,

On Tue, Sep 10, 2024 at 01:11:37PM +0300, Laurent Pinchart wrote:
> On Tue, Sep 10, 2024 at 12:56:38PM +0300, Tomi Valkeinen wrote:
> > On 10/09/2024 12:19, Jacopo Mondi wrote:
> > 
> > > However, I think this current patch is correct (assuming the above
> > > reasoning on i2c sensor drivers is correct) and doesn't require
> > > CONFIG_PM, so I would be tempted to keep this version.
> > 
> > I think the existence of this discussion alone proves my point that we 
> > should only support PM-case, unless !PM is a requirement =).
> 
> For me it proves there's a dire need to document the runtime PM API in a
> way that a human could understand :-)
> 
> > But if you do want to keep !PM:
> > 
> > Is there a reason why not mark the device as active with 
> > pm_runtime_set_active() after calling pispbe_runtime_resume and before 
> > accessing the device? That feels like the most logical way to use the 
> > function, and it would be right regardless whether the core will enable 
> > the parents before probe() or not.
> 
> Does pm_runtime_set_active() resume the parent ?

No, it simply sets the device's runtime PM status.

> 
> > And not related to the BE or CFE drivers, but it strikes me odd that to 
> > support PM and !PM we need to play with these tricks. I think the core 
> > should just do the right thing if the driver does pm_runtime_get_sync() 
> > even with !PM (although maybe the time has passed to be able to do that).
> 
> The runtime PM concepts are nice, but the API is wrong in my opinion.
> Instead of being designed to expose the internals of runtime PM, it
> should focus on usability from a driver point of view first.

It's been moving a little bit to that direction, largely with new helper
functions.

I²C devices have been powered on for probe since commit a76e9bd89ae70 .
Relation to runtime PM wasn't considered at the time, apparently.

-- 
Kind regards,

Sakari Ailus


  reply	other threads:[~2024-09-10 10:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240904-rp1-cfe-v4-3-f1b5b3d69c81@ideasonboard.com>
2024-09-05 10:50 ` [PATCH v4 3/4] media: raspberrypi: Add support for RP1-CFE kernel test robot
2024-09-05 11:11   ` Laurent Pinchart
2024-09-09  5:08     ` Tomi Valkeinen
2024-09-09  5:22       ` Tomi Valkeinen
2024-09-09  9:13         ` Jacopo Mondi
2024-09-09 10:04           ` Tomi Valkeinen
2024-09-09 13:29             ` Jacopo Mondi
2024-09-09 13:45               ` Laurent Pinchart
2024-09-09 15:52                 ` Sakari Ailus
2024-09-10  9:19                   ` Jacopo Mondi
2024-09-10  9:25                     ` Sakari Ailus
2024-09-10  9:42                       ` Jacopo Mondi
2024-09-10  9:55                         ` Sakari Ailus
2024-09-10 10:06                           ` Laurent Pinchart
2024-09-10 10:12                             ` Tomi Valkeinen
2024-09-10  9:56                     ` Tomi Valkeinen
2024-09-10 10:11                       ` Laurent Pinchart
2024-09-10 10:21                         ` Sakari Ailus [this message]
2024-09-10 10:26                         ` Tomi Valkeinen
2024-09-10 10:18                       ` Jacopo Mondi
2024-09-10 10:28                         ` Tomi Valkeinen

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=ZuAdwpUHQn4fdDjc@kekkonen.localdomain \
    --to=sakari.ailus@linux.intel.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=florian.fainelli@broadcom.com \
    --cc=jacopo.mondi@ideasonboard.com \
    --cc=kernel-list@raspberrypi.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=krzk@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=lkp@intel.com \
    --cc=mchehab@kernel.org \
    --cc=naush@raspberrypi.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh+dt@kernel.org \
    --cc=tomi.valkeinen@ideasonboard.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