Fabian Frederick | 25 Apr 10:45 2015
Picon

[PATCH 1/1 linux-next] cpufreq: pxa: replace typedef pxa_freqs_t by structure

See Documentation/CodingStyle.

Signed-off-by: Fabian Frederick <fabf <at> skynet.be>
---
 drivers/cpufreq/pxa2xx-cpufreq.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c
index e24269a..fcf6e34 100644
--- a/drivers/cpufreq/pxa2xx-cpufreq.c
+++ b/drivers/cpufreq/pxa2xx-cpufreq.c
 <at>  <at>  -56,7 +56,7  <at>  <at>  module_param(pxa27x_maxfreq, uint, 0);
 MODULE_PARM_DESC(pxa27x_maxfreq, "Set the pxa27x maxfreq in MHz"
 		 "(typically 624=>pxa270, 416=>pxa271, 520=>pxa272)");

-typedef struct {
+struct pxa_freqs {
 	unsigned int khz;
 	unsigned int membus;
 	unsigned int cccr;
 <at>  <at>  -64,7 +64,7  <at>  <at>  typedef struct {
 	unsigned int cclkcfg;
 	int vmin;
 	int vmax;
-} pxa_freqs_t;
+};

 /* Define the refresh period in mSec for the SDRAM and the number of rows */
 #define SDRAM_TREF	64	/* standard 64ms SDRAM */
 <at>  <at>  -86,7 +86,7  <at>  <at>  static unsigned int sdram_rows;
(Continue reading)

ahaslam | 24 Apr 19:35 2015

[RFC v5 0/8] genpd multiple states v5

From: Axel Haslam <ahaslam <at> baylibre.com>

Some architectures may have intermediate power
levels between on and off. each state in between
may have its own set of procedures to put the
power domain into that state.

This patch adds the ability to declare multiple
states for a given generic power domain, the idea
is that the deepest state will be entered which
does not violate any of the device or sub-domain
latency constraints.

Changes since v4:
* move to power_on/off callbacks out of the state array
  Platforms can check the state_idx to know what
  state the power on/off corresponds to.

* convert states to pointer,
  Dynamically allocate the states array to save memory
  on platforms with several power domains.

* fix bisect-ability, 
  by allowing the old latencies values to be used if the
  state_count is 0. (meaning no states defined by the platform)

* rename target_state to state_idx and remove init_state,
  platforms can directly set state_idx on registering
  a domain that is off.

(Continue reading)

Bartosz Golaszewski | 24 Apr 16:36 2015

[PATCH] Documentation: update cputopology.txt

From: Bartosz Golaszewski <bgolaszewski+renesas <at> baylibre.com>

The documentation on cpu topology seems to be a bit out-of-date. It
doesn't mention the **_siblings_list attributes and uses old names
for topology_**_cpumask() macros.

Add information on missing attributes plus some minor clarifications.

Signed-off-by: Bartosz Golaszewski <bgolaszewski+renesas <at> baylibre.com>
---
 Documentation/cputopology.txt | 34 +++++++++++++++++++++++++---------
 1 file changed, 25 insertions(+), 9 deletions(-)

diff --git a/Documentation/cputopology.txt b/Documentation/cputopology.txt
index 0aad6de..27e67d7 100644
--- a/Documentation/cputopology.txt
+++ b/Documentation/cputopology.txt
 <at>  <at>  -1,6 +1,6  <at>  <at> 

 Export CPU topology info via sysfs. Items (attributes) are similar
-to /proc/cpuinfo.
+to /proc/cpuinfo output of some architectures:

 1) /sys/devices/system/cpu/cpuX/topology/physical_package_id:

 <at>  <at>  -23,20 +23,35  <at>  <at>  to /proc/cpuinfo.
 4) /sys/devices/system/cpu/cpuX/topology/thread_siblings:

 	internal kernel map of cpuX's hardware threads within the same
-	core as cpuX
(Continue reading)

Rajendra Nayak | 23 Apr 15:46 2015

[RFC 0/7] qcom: Add support for tsens driver

This is an attempt to have a single tsens driver for
the different versions of the tsens IP that exist, on
different qcom msm/apq SoCs.
Support is added for msm8916, msm8960 and msm8974 families.
Based on top of the latest eeprom framework patches [1]

A lot of the work is based of original code from Stephen Boyd
and Siddartha Mohanadoss. I have also picked some of what
Narendran Rajan did in his attempt to upstream the support
for 8960 family. I could not keep the original authorship on
any of the patches because I ended up moving the code around
quite a bit in an effort to have a single driver for the
various devices. I would be glad to change the authorship
for any of the patches if needed.

[1] https://lwn.net/Articles/638565/

Rajendra Nayak (6):
  thermal: qcom: tsens: Add a skeletal tsens drivers
  thermal: qcom: tsens-8916: Add support for 8916 family of SoCs
  thermal: qcom: tsens-8974: Add support for 8974 family of SoCs
  thermal: qcom: tsens-8960: Add support for 8960 family of SoCs
  arm: dts: msm8974: Add thermal zones, tsens and eeprom nodes
  arm: dts: apq8064: Add thermal zones, tsens and eeprom nodes

Srinivas Kandagatla (1):
  clk: qcom: gcc-msm8960: add child devices support.

 .../devicetree/bindings/thermal/qcom-tsens.txt     |  36 +++
 arch/arm/boot/dts/qcom-apq8064.dtsi                | 108 +++++++
(Continue reading)

grygorii.strashko | 23 Apr 12:43 2015

[PATCH] mmc: core: add missing pm event in mmc_pm_notify to fix hib restore

From: Grygorii Strashko <Grygorii.Strashko <at> linaro.org>

The PM_RESTORE_PREPARE is not handled now in mmc_pm_notify(),
as result mmc_rescan() could be scheduled and executed at
late hibernation restore stages when MMC device is suspended
already - which, in turn, will lead to system crash on TI dra7-evm board:

WARNING: CPU: 0 PID: 3188 at drivers/bus/omap_l3_noc.c:148 l3_interrupt_handler+0x258/0x374()
44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_PER1_P3 (Idle): Data Access in User mode during
Functional access

Hence, add missed PM_RESTORE_PREPARE PM event in mmc_pm_notify().

Signed-off-by: Grygorii Strashko <Grygorii.Strashko <at> linaro.org>
---
 drivers/mmc/core/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index c296bc0..92e7671 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
 <at>  <at>  -2651,6 +2651,7  <at>  <at>  int mmc_pm_notify(struct notifier_block *notify_block,
 	switch (mode) {
 	case PM_HIBERNATION_PREPARE:
 	case PM_SUSPEND_PREPARE:
+	case PM_RESTORE_PREPARE:
 		spin_lock_irqsave(&host->lock, flags);
 		host->rescan_disable = 1;
 		spin_unlock_irqrestore(&host->lock, flags);
(Continue reading)

Rajendra Nayak | 23 Apr 10:45 2015

[RFC/RFT 0/6] qcom: Add runtime PM support

The patches add runtime PM support (using PM clocks) for 
devices in qcom SoCs. Also converts serial/sdhci/i2c and
spi drivers to cleanup clock handling and use runtime PM
apis instead.

There are a couple [1][2] of other patch series that this one is
based off, so I have pushed a branch [3] with all the dependecies
if anyone wants to play with this series.
I have been able to test the serial and sdhci driver changes to a
fair extent, i2c for a sucessfull probe and could not test anything
on spi. So any testing on these drivers is highly appreciated.

[1] https://www.mail-archive.com/linux-arm-msm <at> vger.kernel.org/msg14157.html
[2] https://www.mail-archive.com/linux-arm-msm <at> vger.kernel.org/msg14268.html
[3] https://github.com/rrnayak/linux/tree/v4.0/runtime-rfc

Rajendra Nayak (6):
  PM / clock_ops: Make pm_clk_notify() do nothing in case DT passes
    power-domains
  clk: qcom: Add runtime support to handle clocks using PM clocks
  serial: msm: convert driver to use runtime PM apis
  mmc: sdhci-msm: convert driver to use runtime PM apis
  i2c: qup: Get rid of clock handling as its done using runtime
    callbacks
  spi: qup: Get rid of clock handling as its done using runtime
    callbacks

 drivers/base/power/clock_ops.c  |  8 ++++-
 drivers/clk/qcom/gdsc.c         | 20 +++++++++++
 drivers/i2c/busses/i2c-qup.c    | 74 +++++++++--------------------------------
(Continue reading)

Rajendra Nayak | 23 Apr 10:33 2015

[PATCH 0/5] PM / clock_ops: provide default runtime ops and cleanup users

Most users of PM clocks do the exact same thing in runtime callbacks.
Provide default callbacks and cleanup the existing users (keystone/davinci
/omap1/sh)

Rajendra Nayak (5):
  PM / clock_ops: Provide default runtime ops to users
  arm: keystone: remove boilerplate code and use USE_PM_CLK_RUNTIME_OPS
  arm: omap1: remove boilerplate code and use USE_PM_CLK_RUNTIME_OPS
  arm: davinci: remove boilerplate code and use USE_PM_CLK_RUNTIME_OPS
  drivers: sh: remove boilerplate code and use USE_PM_CLK_RUNTIME_OPS

 arch/arm/mach-davinci/pm_domain.c  | 32 +-------------------------
 arch/arm/mach-keystone/pm_domain.c | 33 +-------------------------
 arch/arm/mach-omap1/pm_bus.c       | 37 ++----------------------------
 drivers/base/power/clock_ops.c     | 38 ++++++++++++++++++++++++++++++
 drivers/sh/pm_runtime.c            | 47 ++------------------------------------
 include/linux/pm_clock.h           | 10 ++++++++
 6 files changed, 54 insertions(+), 143 deletions(-)

--

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Jin Qian | 23 Apr 02:50 2015

[PATCH 3/3] power: add a dummy wakeup_source to record statistics

After a wakeup_source is destroyed, we lost all information such as how
long this wakeup_source has been active. Add a dummy wakeup_source to
record such info.

Signed-off-by: Jin Qian <jinqian <at> android.com>
---
 drivers/base/power/wakeup.c | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
index bdb45f3..732683c 100644
--- a/drivers/base/power/wakeup.c
+++ b/drivers/base/power/wakeup.c
 <at>  <at>  -59,6 +59,11  <at>  <at>  static DECLARE_WAIT_QUEUE_HEAD(wakeup_count_wait_queue);

 static ktime_t last_read_time;

+static struct wakeup_source deleted_ws = {
+	.name = "deleted",
+	.lock =  __SPIN_LOCK_UNLOCKED(deleted_ws.lock),
+};
+
 /**
  * wakeup_source_prepare - Prepare a new wakeup source for initialization.
  *  <at> ws: Wakeup source to prepare.
 <at>  <at>  -110,6 +115,33  <at>  <at>  void wakeup_source_drop(struct wakeup_source *ws)
 }
 EXPORT_SYMBOL_GPL(wakeup_source_drop);

+/*
(Continue reading)

Jin Qian | 23 Apr 02:50 2015

[PATCH 1/3] power: validate wakeup source before activating it.

A rogue wakeup source not registered in wakeup_sources list is not visible
from wakeup_sources_stats_show. Check if the wakeup source is registered
properly by looking at the timer function.

Signed-off-by: Jin Qian <jinqian <at> android.com>
---
 drivers/base/power/wakeup.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
index 7726200..f24c622 100644
--- a/drivers/base/power/wakeup.c
+++ b/drivers/base/power/wakeup.c
 <at>  <at>  -14,6 +14,7  <at>  <at> 
 #include <linux/suspend.h>
 #include <linux/seq_file.h>
 #include <linux/debugfs.h>
+#include <linux/types.h>
 #include <trace/events/power.h>

 #include "power.h"
 <at>  <at>  -351,6 +352,19  <at>  <at>  int device_set_wakeup_enable(struct device *dev, bool enable)
 }
 EXPORT_SYMBOL_GPL(device_set_wakeup_enable);

+/**
+ * validate_wakeup_source - validate the given wakeup source.
+ *  <at> ws: Wakeup source to be validated.
+ */
+static bool validate_wakeup_source(struct wakeup_source *ws)
(Continue reading)

ahaslam | 22 Apr 11:45 2015

[RFC v4 0/8] genpd multiple states v4

From: Axel Haslam <ahaslam <at> baylibre.com>

Some architectures may have intermediate power
levels between on and off. each state in between
may have its own set of procedures to put the
power domain into that state.

This patch adds the ability to declare multiple
states for a given generic power domain, the idea
is that the deepest state will be entered which
does not violate any of the device or sub-domain
latency constraints.

Changes since v3:
* remove old power on/off function at the end of the
series so that compilation will not break in between.

Changes since v2:
* remove state argument and macros from save/restore
callbacks.

* added init_state for platforms to pass the
initial state when the genpd is initially off.

* convert current genpd users for the structure changes.

* compile tested for shmobile_defconfig, exynos_defconfig,
s3c6400_defconfig u8500_defconfig.

Changes since v1:
(Continue reading)

Magnus Damm | 21 Apr 17:01 2015
Picon

[PATCH/RFC 00/03] irqchip: renesas-irqc: Fine grained Runtime PM support

irqchip: renesas-irqc: Fine grained Runtime PM support

[PATCH/RFC 01/03] irqchip: renesas-irqc: Add irq_enable() and irq_disable()
[PATCH/RFC 02/03] irqchip: renesas-irqc: Add fine grained Runtime PM code
[PATCH/RFC 03/03] irqchip: renesas-irqc: Rely on Runtime PM for wakeup

These patches attempt to convert the IRQC driver from using a mix of clock
framework and Runtime PM into only using Runtime PM and doing that in a
more fine grained way than before. With these patches in place, if there
is no interrupt used then the clock and/or power domain will not be used.

Basic operation is that With these patches applied ->irq_enable() will
perform Runtime PM 'get sync' and ->irq_disable() simply performs
Runtime PM 'put'. The trigger mode callback is assumed to happen at any
time so there is a get/put wrapper there.

Unless I'm misunderstanding the IRQ core code this means that the IRQC
struct device will be in Runtime PM 'get sync' state after someone has
started using an interrupt.

As for wakeup support, based on IRQ_WAKEUP_STATE being toggled in
irq_set_irq_wake() together with the irqd_is_wakeup_set() usage in
suspend_device_irqs() it looks like interrupts used for wakeup will
stay enabled once we use Runtime PM in ->irq_enable() and ->irq_disable()
and because of that the clock operations and custom ->irq_set_wake()
should not be necessary.

I have boot tested this with some simple PHY link state change IRQs
on a Koelsch board, but I have not tried Suspend-to-RAM yet with wakeup
support. It would be useful to test this with Suspend-to-RAM on APE6EVM.
(Continue reading)


Gmane