mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Jacopo Mondi" <jacopo@jmondi.org>,
	"Niklas Söderlund" <niklas.soderlund@ragnatech.se>
Subject: Re: Regulator probe on demand (or circular dependencies)
Date: Wed, 11 Dec 2019 22:42:43 +0000	[thread overview]
Message-ID: <fb87c957-40e8-587e-5789-33b740f8326d@ideasonboard.com> (raw)
In-Reply-To: <20191209163755.GF5483@sirena.org.uk>

Hi Mark,

On 09/12/2019 16:37, Mark Brown wrote:
> On Fri, Dec 06, 2019 at 04:38:04PM +0000, Kieran Bingham wrote:
> 
>> The MAX9286 also exposes 2 GPIO pins, as such I have configured the
>> MAX9286 driver [1] to expose a gpio-chip [2].
> 
> So this seems like a MFD then?  The nice thing about using the MFD
> subsystem is that it means that the drivers for the various subsystems
> on the device can instantiate in any order and defer separately without
> interfering with each other which seems like it's the issue here.

As long as we can defer and not break the other layers this could
potentially work.

Breaking the GMSL driver out to have it's own bus (generically for
serdes buses) and allowing the MAX9286 to probe fully before probing any
subdevices is another alternative suggestion I've had (but much more
work I think).

>>  - is there anything I can do here within regulator_dev_lookup() to
>>    attempt creating the regulator_dev 'on-demand' when
>>    of_find_regulator_by_node(node) returns empty? (or is that crazy, and
>>    just a rabbit-hole?)
> 
> This seems like a terrible idea, you'll have a half baked regulator in

Ohh eep, I just re-read my description, and I don't think I described my
intention very well at all. (or at all!)

I wouldn't want to have just a half baked struct regulator_dev on it's
own ... I was more wondering if we can kick the core driver framework to
fully probe this regulator (which would thus create the required
regulator_dev structures). It was more a question of can we guide the
core driver framework that it really needs to probe this device
immediately ...

I was sort of wondering if something like this could optimise away some
of the -EPROBE_DEFER iterations at a more global level, but I don't know
how or if that would work anyway.

> the system which will need special casing all over the place and
> doubtless be an ongoing source of bugs.

Indeed, I wasn't expecting to have some different case non-probed
regulator ...

Anyway, it's possibly a moot point I think - Niklas has suggested that
he can indeed resolve the -EPROBE_DEFER restrictions.

I'm not yet sure if we want to go full MFD yet ... so I've left this
feature out of my latest posting for the driver - and we'll discuss the
direction for solving this in our team.

Thanks again,
-- 
Regards
--
Kieran

  parent reply	other threads:[~2019-12-11 22:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06 16:38 Kieran Bingham
2019-12-09 16:37 ` Mark Brown
2019-12-09 17:03   ` Kieran Bingham
2019-12-09 17:13     ` Mark Brown
2019-12-09 17:16     ` Niklas Söderlund
2019-12-11 22:42   ` Kieran Bingham [this message]
2019-12-12 15:56     ` Mark Brown
2019-12-12 16:18       ` Geert Uytterhoeven
2019-12-12 16:49         ` Mark Brown

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=fb87c957-40e8-587e-5789-33b740f8326d@ideasonboard.com \
    --to=kieran.bingham@ideasonboard.com \
    --cc=broonie@kernel.org \
    --cc=jacopo@jmondi.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=niklas.soderlund@ragnatech.se \
    /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®