All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 0/3] Runtime Interpreter Power Sequences
@ 2012-10-19  9:06 ` Alexandre Courbot
  0 siblings, 0 replies; 20+ messages in thread
From: Alexandre Courbot @ 2012-10-19  9:06 UTC (permalink / raw)
  To: Stephen Warren, Thierry Reding, Simon Glass, Grant Likely,
	Rob Herring, Mark Brown, Anton Vorontsov, David Woodhouse,
	Arnd Bergmann
  Cc: Leela Krishna Amudala, linux-tegra, linux-kernel, linux-fbdev,
	devicetree-discuss, linux-pm, linux-doc, Alexandre Courbot

Quite a big redesign of the feature - both structures and code have been
simplified and should be easier to read and understand, data duplication is
avoided, and much less memory allocations take place at runtime. Usage
interface is also simpler and IMHO more logical.

What happened is that platform_power_seq and power_seq have been merged,
and so power sequences declared as platform data are used "as-is". The
"build" step is not needed anymore - resources are allocated when a
power sequence is added into a set.

There is still one design flaw that I would like to solve: sequences are
still tied to a device, i.e. if you have two devices that use the same
powering scheme, you have to declare two identical power sequences and assign
each of these to one device. It would be much more flexible if sequences could
be shared across devices. The problem is that the resources structure,
references by steps, cannot be shared. Actually we could share it by having
a linked list of devices and resolved resources in the resource structure and
thus share power sequences over devices. That would work for regulator and
PWM resources, which have a get_regulator/pwm(dev, id) function that could
return a different resource depending on the device that is passed.
But there is no similar get_gpio() function for GPIOs which number is directly
specified in the resource, and I don't know if such a function would make
sense otherwise. Opinions on the subject are welcome.

Alexandre Courbot (3):
  Runtime Interpreted Power Sequences
  pwm_backlight: use power sequences
  tegra: ventana: add PWM backlight to device tree

 .../devicetree/bindings/power/power_seq.txt        | 121 +++++++
 .../bindings/video/backlight/pwm-backlight.txt     |  72 +++-
 Documentation/power/power_seq.txt                  | 253 ++++++++++++++
 arch/arm/boot/dts/tegra20-ventana.dts              |  59 +++-
 drivers/power/Kconfig                              |   1 +
 drivers/power/Makefile                             |   1 +
 drivers/power/power_seq/Kconfig                    |   2 +
 drivers/power/power_seq/Makefile                   |   1 +
 drivers/power/power_seq/power_seq.c                | 376 +++++++++++++++++++++
 drivers/power/power_seq/power_seq_delay.c          |  65 ++++
 drivers/power/power_seq/power_seq_gpio.c           |  94 ++++++
 drivers/power/power_seq/power_seq_pwm.c            |  82 +++++
 drivers/power/power_seq/power_seq_regulator.c      |  83 +++++
 drivers/video/backlight/Kconfig                    |   1 +
 drivers/video/backlight/pwm_bl.c                   | 161 +++++++--
 include/linux/power_seq.h                          | 203 +++++++++++
 include/linux/pwm_backlight.h                      |  18 +-
 17 files changed, 1553 insertions(+), 40 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/power/power_seq.txt
 create mode 100644 Documentation/power/power_seq.txt
 create mode 100644 drivers/power/power_seq/Kconfig
 create mode 100644 drivers/power/power_seq/Makefile
 create mode 100644 drivers/power/power_seq/power_seq.c
 create mode 100644 drivers/power/power_seq/power_seq_delay.c
 create mode 100644 drivers/power/power_seq/power_seq_gpio.c
 create mode 100644 drivers/power/power_seq/power_seq_pwm.c
 create mode 100644 drivers/power/power_seq/power_seq_regulator.c
 create mode 100644 include/linux/power_seq.h

-- 
1.7.12.3


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2012-10-19 16:00 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-19  9:06 [PATCH v7 0/3] Runtime Interpreter Power Sequences Alexandre Courbot
2012-10-19  9:06 ` Alexandre Courbot
2012-10-19  9:06 ` Alexandre Courbot
2012-10-19  9:06 ` [PATCH v7 1/3] Runtime Interpreted " Alexandre Courbot
2012-10-19  9:06   ` Alexandre Courbot
2012-10-19  9:06   ` Alexandre Courbot
     [not found] ` <1350637589-7405-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-10-19  9:06   ` [PATCH v7 2/3] pwm_backlight: use power sequences Alexandre Courbot
2012-10-19  9:06     ` Alexandre Courbot
2012-10-19  9:06     ` Alexandre Courbot
     [not found]     ` <1350637589-7405-3-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-10-19  9:20       ` Tony Prisk
2012-10-19  9:20         ` Tony Prisk
2012-10-19  9:20         ` Tony Prisk
2012-10-19  9:31         ` Alex Courbot
2012-10-19  9:31           ` Alex Courbot
2012-10-19  9:31           ` Alex Courbot
2012-10-19 16:00         ` Stephen Warren
2012-10-19 16:00           ` Stephen Warren
2012-10-19  9:06   ` [PATCH v7 3/3] tegra: ventana: add PWM backlight to device tree Alexandre Courbot
2012-10-19  9:06     ` Alexandre Courbot
2012-10-19  9:06     ` Alexandre Courbot

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.