On Tue, Feb 04, 2014 at 04:29:14PM -0500, Matt Porter wrote:
> On Tue, Feb 04, 2014 at 05:28:36PM +, Mark Brown wrote:
> > > + /*
> > > + * Regulator API handles empty constraints but not NULL
> > > + * constraints
> > > + */
> > > + if (!reg_data)
>
On Tue, Feb 04, 2014 at 04:16:38PM -0500, Matt Porter wrote:
> On Tue, Feb 04, 2014 at 05:23:09PM +, Mark Brown wrote:
> > Is this really only a regulator - does the chip have no other functions?
> It's your average multi-function device with other functions as you are
> suspecting. Buried i
On Tue, Feb 04, 2014 at 05:28:36PM +, Mark Brown wrote:
> On Tue, Feb 04, 2014 at 07:19:10AM -0500, Matt Porter wrote:
>
> > +static unsigned int bcm59056_get_mode(struct regulator_dev *dev)
> > +{
> > + return REGULATOR_MODE_NORMAL;
> > +}
> > +
> > +static int bcm59056_set_mode(struct regu
On Tue, Feb 04, 2014 at 05:23:09PM +, Mark Brown wrote:
> On Tue, Feb 04, 2014 at 07:19:08AM -0500, Matt Porter wrote:
> > Add a DT binding for the BCM59056 PMU. The binding inherits from
> > the generic regulator bindings.
>
> Is this really only a regulator - does the chip have no other func
Ulf Hansson writes:
> Due to the available runtime PM callbacks, we are now able to put our
> device into low power state at system suspend.
>
> Earlier we could not accomplish this without trusting a power domain
> for the device to take care of it. Now we are able to cope with
> scenarios both
On Tue, Feb 04, 2014 at 04:58:51PM +0100, Ulf Hansson wrote:
> The driver core is now taking care of putting our pins into default
> state at probe. Thus we can remove the redundant call for it in probe.
I applied this one too, as with the last patch it looks independant of
the runtime PM stuff.
On Tue, Feb 04, 2014 at 04:58:50PM +0100, Ulf Hansson wrote:
> Make use of clk_prepare_enable and clk_disable_unprepare to simplify
> code. No functional change.
I went ahead and applied this since it looks good and seems like an
unrelated cleanup to the runtime PM stuff which seems to be where th
On Tue, Feb 04, 2014 at 04:58:48PM +0100, Ulf Hansson wrote:
> @@ -2328,8 +2300,23 @@ static int pl022_suspend(struct device *dev)
> return ret;
> }
>
> - pm_runtime_get_sync(dev);
> - pl022_suspend_resources(pl022, false);
> + pm_runtime_disable(dev);
> +
> +
On Tue, Feb 04, 2014 at 04:58:41PM +0100, Ulf Hansson wrote:
> The fixes for the amba bus needs to be merged prior to the other, thus I think
> it could make sense to merge this complete patchset through Russell's tree,
> if he and the other maintainers think this is okay.
What are the actual dep
On Tue, Feb 04, 2014 at 07:19:10AM -0500, Matt Porter wrote:
> +static unsigned int bcm59056_get_mode(struct regulator_dev *dev)
> +{
> + return REGULATOR_MODE_NORMAL;
> +}
> +
> +static int bcm59056_set_mode(struct regulator_dev *dev, unsigned int mode)
> +{
> + if (mode == REGULATOR_MODE
On Tue, Feb 04, 2014 at 07:19:08AM -0500, Matt Porter wrote:
> Add a DT binding for the BCM59056 PMU. The binding inherits from
> the generic regulator bindings.
Is this really only a regulator - does the chip have no other functions?
> +- regulators: This is the list of child nodes that specify
On Tue, Feb 04, 2014 at 05:08:32PM +, Lee Jones wrote:
> > What using of_match_ptr() should do is allow the compiler to figure out
> > that the table isn't used when DT is disabled and discard it without
> > ifdefs. Not sure if that actually works yet but that's the idea.
> Right, but I'm gu
> > > > +static struct i2c_driver bcm59056_i2c_driver = {
> > > > + .driver = {
> > > > + .name = "bcm59056",
> > > > + .owner = THIS_MODULE,
> > > > + .of_match_table = of_match_ptr(bcm59056_of_match),
>
> > > No need to use of_match_ptr()
On Tue, Feb 04, 2014 at 04:58:49PM +0100, Ulf Hansson wrote:
> Use clk_disable_unprepare and clk_prepare_enable from the runtime PM
> callbacks, to fully gate|ungate clocks. Potentially this will save more
> power, depending on the clock tree for the current SOC.
The same patch has already been ap
On Tue, Feb 04, 2014 at 09:31:19AM -0500, Matt Porter wrote:
> On Tue, Feb 04, 2014 at 01:29:51PM +, Lee Jones wrote:
> > > +static struct i2c_driver bcm59056_i2c_driver = {
> > > + .driver = {
> > > +.name = "bcm59056",
> > > +.owner = THIS_MODULE,
> > > +.
To give provision for amba drivers to make use of the late|early PM
callbacks, we point the amba bus PM callbacks to the generic versions
of these.
Cc: Russell King
Signed-off-by: Ulf Hansson
---
drivers/amba/bus.c |6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/amba/bus.c
In runtime suspended state, we are not expecting IRQs and thus we can
safely mask them, not only for pwrreg_nopower variants but for all.
Obviously we then also need to make sure we restore the IRQ mask while
becoming runtime resumed.
Cc: Russell King
Signed-off-by: Ulf Hansson
---
drivers/mmc
Convert to the SET_PM_RUNTIME_PM macro while defining the runtime PM
callbacks. This means the callbacks becomes available for both
CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME, which is needed by drivers and
power domains.
Cc: Russell King
Signed-off-by: Ulf Hansson
---
drivers/amba/bus.c |4 ++--
Convert to the SET_PM_RUNTIME_PM macro while defining the runtime PM
callbacks. This means the callbacks becomes available for both
CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME, which is needed to handle the
combinations of these scenarios.
Cc: Russell King
Signed-off-by: Ulf Hansson
---
drivers/mmc/h
Convert to the SET_PM_RUNTIME_PM macro while defining the runtime PM
callbacks. This means the callbacks becomes available for both
CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME, which is needed to handle the
combinations of these scenarios.
Cc: Mark Brown
Signed-off-by: Ulf Hansson
---
drivers/spi/spi
Due to the available runtime PM callbacks for CONFIG_PM, we are now
able to put the device into complete low power state at system suspend.
Previously only the resources controlled by the driver were put into
low power state at system suspend. Both the amba bus and a potential
power domain were ig
Use clk_disable_unprepare and clk_prepare_enable from the runtime PM
callbacks, to fully gate|ungate clocks. Potentially this will save more
power, depending on the clock tree for the current SOC.
Cc: Mark Brown
Signed-off-by: Ulf Hansson
---
drivers/spi/spi-pl022.c |4 ++--
1 file changed,
Make use of clk_prepare_enable and clk_disable_unprepare to simplify
code. No functional change.
Cc: Mark Brown
Signed-off-by: Ulf Hansson
---
drivers/spi/spi-pl022.c | 15 +++
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi
Due to the available runtime PM callbacks, we are now able to put our
device into low power state at system suspend.
Earlier we could not accomplish this without trusting a power domain
for the device to take care of it. Now we are able to cope with
scenarios both with and without a power domain.
The driver core is now taking care of putting our pins into default
state at probe. Thus we can remove the redundant call for it in probe.
Cc: Mark Brown
Signed-off-by: Ulf Hansson
---
drivers/spi/spi-pl022.c |2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/spi/spi-pl022.c b/driv
The amba bus are responsible for pm_runtime_enable|disable, remove the
redundant pm_runtime_disable at driver removal.
Cc: Alessandro Rubini
Cc: Linus Walleij
Cc: Wolfram Sang
Signed-off-by: Ulf Hansson
---
drivers/i2c/busses/i2c-nomadik.c |1 -
1 file changed, 1 deletion(-)
diff --git a
At system suspend_late, runtime PM has been disabled by the PM core
which means we can safely operate on these resources. Consequentially
we no longer have to wait until the noirq phase of the system suspend.
Cc: Alessandro Rubini
Cc: Linus Walleij
Cc: Wolfram Sang
Signed-off-by: Ulf Hansson
-
Since the device is active while a successful probe has been completed,
the reference counting for the clock will be screwed up and never reach
zero.
The issue is resolved by implementing runtime PM callbacks and let them
handle the resources accordingly, including the clock.
Cc: Alessandro Rubin
Use devm_* functions to simplify code and error handling.
Cc: Alessandro Rubini
Cc: Linus Walleij
Cc: Wolfram Sang
Signed-off-by: Ulf Hansson
---
drivers/i2c/busses/i2c-nomadik.c | 29 +
1 file changed, 9 insertions(+), 20 deletions(-)
diff --git a/drivers/i2c/b
For !CONFIG_PM_RUNTIME, the device were never put back into active
state while resuming.
For CONFIG_PM_RUNTIME, we blindly trusted the device to be inactive
while we were about to handle it at suspend late, which is just too
optimistic.
Even if the driver uses pm_runtime_put_sync() after each tra
Since the runtime PM state is expected to be active according to the
amba bus, we must align our behaviour while probing to it.
Moreover, this is needed to be able to have the driver fully functional
without depending on CONFIG_RUNTIME_PM.
Cc: Alessandro Rubini
Cc: Linus Walleij
Cc: Wolfram San
We should never be busy performing transfers at suspend late, thus
there are no reason to check for it.
Cc: Alessandro Rubini
Cc: Linus Walleij
Cc: Wolfram Sang
Signed-off-by: Ulf Hansson
---
drivers/i2c/busses/i2c-nomadik.c | 10 --
1 file changed, 10 deletions(-)
diff --git a/dri
This patchset fixes the PM problems you yet when combining CONFIG_PM_SLEEP and
CONFIG_PM_RUNTIME. In principle these drivers did not manage to put it's devices
into low power state at system suspend, which then this patchset intend to fix.
Both the drivers and the amba bus converts to the new SET_
> > ... then you'll still need this.
>
> Yes, I was far too vague..I'm going to stop explicitly populating the
> data field.
>
> static const struct of_device_id bcm59056_of_match[] = {
> { .compatible = "brcm,bcm59056"},
> { }
> };
+1
> > And I don't think you can drop this, as the
On Tue, Feb 04, 2014 at 02:47:31PM +, Lee Jones wrote:
> Hold your horses. :)
Holding :)
> > > > Add a driver for the BCM59056 PMU multi-function device. The driver
> > > > initially supports regmap initialization and instantiation of the
> > > > voltage regulator device function of the PMU.
Hold your horses. :)
> > > Add a driver for the BCM59056 PMU multi-function device. The driver
> > > initially supports regmap initialization and instantiation of the
> > > voltage regulator device function of the PMU.
> > >
> > > Signed-off-by: Matt Porter
> > > Reviewed-by: Tim Kryger
> > > R
On Tue, Feb 04, 2014 at 01:40:43PM +, Lee Jones wrote:
> > The BCM59056 is a multi-function power management unit used with the
> > BCM281xx family of SoCs. This series adds an MFD and voltage regulator
> > driver to support the BCM59056. The bcm28155-ap DT support is updated
> > to enable use
Intel Baytrail I2C controllers can be enumerated from PCI as well as from
ACPI. In order to support this add the Baytrail PCI IDs to the driver.
Signed-off-by: Mika Westerberg
---
drivers/i2c/busses/i2c-designware-pcidrv.c | 25 +++--
1 file changed, 23 insertions(+), 2 delet
On Tue, Feb 04, 2014 at 01:29:51PM +, Lee Jones wrote:
> > Add a driver for the BCM59056 PMU multi-function device. The driver
> > initially supports regmap initialization and instantiation of the
> > voltage regulator device function of the PMU.
> >
> > Signed-off-by: Matt Porter
> > Reviewe
> The BCM59056 is a multi-function power management unit used with the
> BCM281xx family of SoCs. This series adds an MFD and voltage regulator
> driver to support the BCM59056. The bcm28155-ap DT support is updated
> to enable use of regulators on the otg and sdhci peripherals.
>
> Matt Porter (6
> Add a driver for the BCM59056 PMU multi-function device. The driver
> initially supports regmap initialization and instantiation of the
> voltage regulator device function of the PMU.
>
> Signed-off-by: Matt Porter
> Reviewed-by: Tim Kryger
> Reviewed-by: Markus Mayer
> ---
> drivers/mfd/Kco
The PCI part of the DesignWare I2C driver does a lot of things that are not
required anymore. For example drivers aren't supposed to handle PCI state
transitions themselves. This is all provided by the PCI bus core already.
In addition to that there is no point scheduling RPM suspend on driver's
i
Enable BCM59056 MFD and regulator drivers to manage voltage
regulators on BCM281xx platforms.
Signed-off-by: Tim Kryger
Signed-off-by: Matt Porter
Reviewed-by: Markus Mayer
---
arch/arm/configs/bcm_defconfig | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/configs/bcm_defcon
Voltage regulators are needed very early due to deferred probe
being incompatible with built-in USB gadget drivers. In order to
have the PMU driver available before USB UDC, make i2c available
during subsys_initcall.
Signed-off-by: Matt Porter
Reviewed-by: Tim Kryger
Reviewed-by: Markus Mayer
-
Add a regulator driver for the BCM59056 PMU voltage regulators.
The driver supports LDOs and DCDCs in normal mode only. There is
no support for low-power mode or power sequencing.
Signed-off-by: Matt Porter
Reviewed-by: Tim Kryger
Reviewed-by: Markus Mayer
---
drivers/regulator/Kconfig
Add a DT binding for the BCM59056 PMU. The binding inherits from
the generic regulator bindings.
Signed-off-by: Matt Porter
Reviewed-by: Tim Kryger
Reviewed-by: Markus Mayer
---
.../devicetree/bindings/regulator/bcm59056.txt | 37 ++
1 file changed, 37 insertions(+)
cr
Add a dtsi to support the BCM59056 PMU used by the BCM281xx family
of SoCs. Enable regulators for use with the dwc2 and sdhci on
bcm28155-ap.
Signed-off-by: Tim Kryger
Signed-off-by: Matt Porter
Reviewed-by: Markus Mayer
---
arch/arm/boot/dts/bcm28155-ap.dts | 41 ++
arch/arm/boot/dts
Add a driver for the BCM59056 PMU multi-function device. The driver
initially supports regmap initialization and instantiation of the
voltage regulator device function of the PMU.
Signed-off-by: Matt Porter
Reviewed-by: Tim Kryger
Reviewed-by: Markus Mayer
---
drivers/mfd/Kconfig |
The BCM59056 is a multi-function power management unit used with the
BCM281xx family of SoCs. This series adds an MFD and voltage regulator
driver to support the BCM59056. The bcm28155-ap DT support is updated
to enable use of regulators on the otg and sdhci peripherals.
Matt Porter (6):
i2c: bc
On Tue, Feb 04, 2014 at 02:50:46PM +0900, Jingoo Han wrote:
> Add CONFIG_PM_RUNTIME to i2c_dw_pci_runtime_idle() to fix the
> build warning when CONFIG_PM_RUNTIME is not selected. This is
> because runtime PM callbacks defined by SET_RUNTIME_PM_OPS are
> only used when the CONFIG_PM_RUNTIME is enab
50 matches
Mail list logo