All of lore.kernel.org
 help / color / mirror / Atom feed
From: gregkh@linuxfoundation.org (Greg Kroah-Hartman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V3 1/8] drivers: Add boot constraints core
Date: Tue, 29 Aug 2017 08:39:23 +0200	[thread overview]
Message-ID: <20170829063923.GD12198@kroah.com> (raw)
In-Reply-To: <1a844e27ee7e0b22acf8ea582bf4e8d35f54c84a.1501578037.git.viresh.kumar@linaro.org>

On Tue, Aug 01, 2017 at 02:53:42PM +0530, Viresh Kumar wrote:
> Some devices are powered ON by the bootloader before the bootloader
> handovers control to Linux. It maybe important for those devices to keep
> working until the time a Linux device driver probes the device and
> reconfigure its resources.
> 
> A typical example of that can be the LCD controller, which is used by
> the bootloaders to show image(s) while the platform is booting into
> Linux. The LCD controller can be using some resources, like clk,
> regulators, PM domain, etc, that are shared between several devices.
> These shared resources should be configured to satisfy need of all the
> users. If another device's (X) driver gets probed before the LCD
> controller driver in this case, then it may end up reconfiguring these
> resources to ranges satisfying the current users (only device X) and
> that can make the LCD screen unstable.
> 
> This patch introduces the concept of boot-constraints, which will be set
> by the bootloaders and the kernel will satisfy them until the time
> driver for such a device is probed (successfully or unsuccessfully).
> 
> The list of boot constraint types is empty for now, and will be
> incrementally updated by later patches.
> 
> Only two routines are exposed by the boot constraints core for now:
> 
> - dev_boot_constraint_add(): This shall be called by parts of the kernel
>   (before the device is probed) to set the constraints.
> 
> - dev_boot_constraints_remove(): This is called only by the driver core
>   after a device is probed successfully or unsuccessfully. Special
>   handling is done here for deffered probing.

How is this information getting to the kernel from the bootloader?  I
didn't see where that happened, just a single example driver that
somehow "knew" what had to happen, which seems odd...

This is a lot of new code for no users, I would like to see at least 3
real drivers that are using it before we merge it, as then you have a
chance of getting the user/kernel api correct.

thanks,

greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Vincent Guittot <vincent.guittot@linaro.org>,
	Mark Brown <broonie@kernel.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Rajendra Nayak <rnayak@codeaurora.org>,
	Shiraz Hashim <shashim@codeaurora.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, robdclark@gmail.com
Subject: Re: [PATCH V3 1/8] drivers: Add boot constraints core
Date: Tue, 29 Aug 2017 08:39:23 +0200	[thread overview]
Message-ID: <20170829063923.GD12198@kroah.com> (raw)
In-Reply-To: <1a844e27ee7e0b22acf8ea582bf4e8d35f54c84a.1501578037.git.viresh.kumar@linaro.org>

On Tue, Aug 01, 2017 at 02:53:42PM +0530, Viresh Kumar wrote:
> Some devices are powered ON by the bootloader before the bootloader
> handovers control to Linux. It maybe important for those devices to keep
> working until the time a Linux device driver probes the device and
> reconfigure its resources.
> 
> A typical example of that can be the LCD controller, which is used by
> the bootloaders to show image(s) while the platform is booting into
> Linux. The LCD controller can be using some resources, like clk,
> regulators, PM domain, etc, that are shared between several devices.
> These shared resources should be configured to satisfy need of all the
> users. If another device's (X) driver gets probed before the LCD
> controller driver in this case, then it may end up reconfiguring these
> resources to ranges satisfying the current users (only device X) and
> that can make the LCD screen unstable.
> 
> This patch introduces the concept of boot-constraints, which will be set
> by the bootloaders and the kernel will satisfy them until the time
> driver for such a device is probed (successfully or unsuccessfully).
> 
> The list of boot constraint types is empty for now, and will be
> incrementally updated by later patches.
> 
> Only two routines are exposed by the boot constraints core for now:
> 
> - dev_boot_constraint_add(): This shall be called by parts of the kernel
>   (before the device is probed) to set the constraints.
> 
> - dev_boot_constraints_remove(): This is called only by the driver core
>   after a device is probed successfully or unsuccessfully. Special
>   handling is done here for deffered probing.

How is this information getting to the kernel from the bootloader?  I
didn't see where that happened, just a single example driver that
somehow "knew" what had to happen, which seems odd...

This is a lot of new code for no users, I would like to see at least 3
real drivers that are using it before we merge it, as then you have a
chance of getting the user/kernel api correct.

thanks,

greg k-h

  reply	other threads:[~2017-08-29  6:39 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01  9:23 [PATCH V3 0/8] drivers: Boot Constraints core Viresh Kumar
2017-08-01  9:23 ` Viresh Kumar
2017-08-01  9:23 ` [PATCH V3 1/8] drivers: Add boot constraints core Viresh Kumar
2017-08-01  9:23   ` Viresh Kumar
2017-08-29  6:39   ` Greg Kroah-Hartman [this message]
2017-08-29  6:39     ` Greg Kroah-Hartman
2017-08-29  9:52     ` Viresh Kumar
2017-08-29  9:52       ` Viresh Kumar
2017-08-29 12:03       ` Greg Kroah-Hartman
2017-08-29 12:03         ` Greg Kroah-Hartman
2017-09-04  9:15         ` Viresh Kumar
2017-09-04  9:15           ` Viresh Kumar
2017-09-04  9:38           ` Greg Kroah-Hartman
2017-09-04  9:38             ` Greg Kroah-Hartman
2017-09-19 22:46             ` Viresh Kumar
2017-09-19 22:46               ` Viresh Kumar
2017-08-01  9:23 ` [PATCH V3 2/8] drivers: boot_constraint: Add boot_constraints_disable kernel parameter Viresh Kumar
2017-08-01  9:23   ` Viresh Kumar
2017-08-29  6:37   ` Greg Kroah-Hartman
2017-08-29  6:37     ` Greg Kroah-Hartman
2017-08-29  6:48     ` Jani Nikula
2017-08-29  6:48       ` Jani Nikula
2017-08-29 10:02     ` Viresh Kumar
2017-08-29 10:02       ` Viresh Kumar
2017-08-29 11:56       ` Greg Kroah-Hartman
2017-08-29 11:56         ` Greg Kroah-Hartman
2017-08-01  9:23 ` [PATCH V3 3/8] drivers: boot_constraint: Add support for supply constraints Viresh Kumar
2017-08-01  9:23   ` Viresh Kumar
2017-08-01  9:23 ` [PATCH V3 4/8] drivers: boot_constraint: Add support for clk constraints Viresh Kumar
2017-08-01  9:23   ` Viresh Kumar
2017-08-01  9:23 ` [PATCH V3 5/8] drivers: boot_constraint: Add support for PM constraints Viresh Kumar
2017-08-01  9:23   ` Viresh Kumar
2017-08-01  9:23 ` [PATCH V3 6/8] drivers: boot_constraint: Add debugfs support Viresh Kumar
2017-08-01  9:23   ` Viresh Kumar
2017-08-29  6:36   ` Greg Kroah-Hartman
2017-08-29  6:36     ` Greg Kroah-Hartman
2017-08-29 10:04     ` Viresh Kumar
2017-08-29 10:04       ` Viresh Kumar
2017-08-01  9:23 ` [PATCH V3 7/8] drivers: boot_constraint: Manage deferrable constraints Viresh Kumar
2017-08-01  9:23   ` Viresh Kumar
2017-08-01  9:23 ` [PATCH V3 8/8] drivers: boot_constraint: Add Qualcomm display controller constraints Viresh Kumar
2017-08-01  9:23   ` Viresh Kumar
2017-09-04 16:25   ` Pavel Machek
2017-09-04 16:25     ` Pavel Machek
2017-09-19 22:40     ` Viresh Kumar
2017-09-19 22:40       ` Viresh Kumar

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=20170829063923.GD12198@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.