All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH v3 0/3] Power sequences with PWM and DT support
@ 2012-07-27 12:05 ` Alexandre Courbot
  0 siblings, 0 replies; 192+ messages in thread
From: Alexandre Courbot @ 2012-07-27 12:05 UTC (permalink / raw)
  To: Stephen Warren, Thierry Reding, Simon Glass, Grant Likely,
	Rob Herring, Greg Kroah-Hartman, Mark Brown, Arnd Bergmann
  Cc: linux-tegra, linux-kernel, linux-fbdev, devicetree-discuss,
	Alexandre Courbot

Widening audience for this version.

The issue addressed is that the power sequences for backlights (and probably
other devices), which were implemented using board-specific callbacks so far,
could not be used with the device tree. This series of patches adds a small
power sequence interpreter that allows to acquire and control regulators, GPIOs,
and PWMs during sequences defined in the device tree or as platform data. It is
easy to use, low-footprint, and takes care of managing the resources it
acquires. This should help making the kernel less board-dependant.

Comments are especially welcome about the DT bindings proposal, which most
certainly needs to be refined, if not completely redesigned. Documentation is
still incomplete and will consolidate once the implementation reaches a stable
state.

The tegra device tree nodes of patch 3 are just here as an example usage.

Changelog:

v3:
- Move to driver to base/
- Use sub-nodes to describe steps in the DT as suggested by Simon Glass
- Write some documentation
- Make the DT support optional

Alexandre Courbot (3):
  runtime interpreted power sequences
  pwm_backlight: use power sequences
  tegra: add pwm backlight device tree nodes

 .../bindings/video/backlight/pwm-backlight.txt     |  55 +++-
 Documentation/power/power_seq.txt                  | 120 +++++++++
 arch/arm/boot/dts/tegra20-ventana.dts              |  53 ++++
 arch/arm/boot/dts/tegra20.dtsi                     |   2 +-
 drivers/base/Kconfig                               |   4 +
 drivers/base/Makefile                              |   1 +
 drivers/base/power_seq.c                           | 300 +++++++++++++++++++++
 drivers/video/backlight/Kconfig                    |   1 +
 drivers/video/backlight/pwm_bl.c                   | 213 +++++++++++----
 include/linux/power_seq.h                          | 139 ++++++++++
 include/linux/pwm_backlight.h                      |  18 +-
 11 files changed, 843 insertions(+), 63 deletions(-)
 create mode 100644 Documentation/power/power_seq.txt
 create mode 100644 drivers/base/power_seq.c
 create mode 100644 include/linux/power_seq.h

-- 
1.7.11.3

^ permalink raw reply	[flat|nested] 192+ messages in thread
* Re: Gethering power management/policy hw drivers under drivers/power/? (Re: [RFC][PATCH v3 1/3] runtime interpreted power sequences)
@ 2012-07-30  3:04 ` 함명주
  0 siblings, 0 replies; 192+ messages in thread
From: 함명주 @ 2012-07-30  3:04 UTC (permalink / raw)
  To: Anton Vorontsov, Alex Courbot, Jean Pihet
  Cc: Greg Kroah-Hartman, David Woodhouse, Stephen Warren,
	Thierry Reding, Simon Glass, Grant Likely, Rob Herring,
	Mark Brown, Arnd Bergmann, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Liam Girdwood,
	Rafael J. Wysocki, linux-pm-u79uwXL29TY76Z2rM5mHXA

> On Mon, Jul 30, 2012 at 10:51:42AM +0900, Alex Courbot wrote:
> [...]
> > On the other hand I have just noticed that the apparently unrelated
> > Adaptive Voltage Scaling driver just appeared in drivers/power/avs.
> > So if Anton and David are ok with this, maybe I could put the power
> > sequences code in its own subdirectory within drivers/power.
> 
> Well, currently drivers/power/ is indeed just for power supply class
> subsystem and drivers. But if the trend is to gather power management
> ("policy") stuff under one directory, i.e.
> 
> drivers/
>   power/
>     supplies/    <- former "power supply class and drivers"
>     regulators/
>     idle/
>     cpuidle/
>     cpufreq/
>     devfreq/
>     avs/
>     ...
> 
> That would probably make sense, we could easily see the big picture.
> But if we're not going to do this long-term, I would suggest to stick
> to just a new directory under drivers (and move drivers/power/avs/ to
> drivers/avs).
> 
> Cc'ing some more people...
> 
> Thanks,
> 
> p.s. Jean, why am I the last person who discovers drivers/power/avs/?
> Would be nice to Cc me on such patches; by moving AVS under
> drivers/power/ you effectively nominated me as its maintainer. :-)
> 
> -- 
> Anton Vorontsov
> Email: cbouatmailru@gmail.com
> 

Having power-supplies at /drivers/power/ and other power-related drivers spread at /drivers/ have been bugging me as well. I'd like to see the change you've suggested though I'm not sure how significant the side-effect will be at this point.

Generally speaking, yes, I also think the proposal is more reasonable than the current structure.



Cheers!
MyungJoo



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

end of thread, other threads:[~2012-08-07  5:10 UTC | newest]

Thread overview: 192+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-27 12:05 [RFC][PATCH v3 0/3] Power sequences with PWM and DT support Alexandre Courbot
2012-07-27 12:05 ` Alexandre Courbot
2012-07-27 12:05 ` Alexandre Courbot
2012-07-27 12:05 ` [RFC][PATCH v3 1/3] runtime interpreted power sequences Alexandre Courbot
2012-07-27 12:05   ` Alexandre Courbot
2012-07-27 12:05   ` Alexandre Courbot
     [not found]   ` <1343390750-3642-2-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-27 18:19     ` Greg Kroah-Hartman
2012-07-27 18:19       ` Greg Kroah-Hartman
2012-07-27 18:19       ` Greg Kroah-Hartman
     [not found]       ` <20120727181923.GB23564-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2012-07-30  1:51         ` Alex Courbot
2012-07-30  1:51           ` Alex Courbot
2012-07-30  1:51           ` Alex Courbot
2012-07-30  2:40           ` Gethering power management/policy hw drivers under drivers/power/? (Re: [RFC][PATCH v3 1/3] runtime interpreted power sequences) Anton Vorontsov
2012-07-30  2:40             ` Gethering power management/policy hw drivers under drivers/power/? (Re: [RFC][PATCH v3 1/3] runtime Anton Vorontsov
2012-07-30  2:40             ` Gethering power management/policy hw drivers under drivers/power/? (Re: [RFC][PATCH v3 1/3] runtime interpreted power sequences) Anton Vorontsov
2012-07-30 20:59             ` Rafael J. Wysocki
2012-07-30 20:59               ` Gethering power management/policy hw drivers under drivers/power/? (Re: [RFC][PATCH v3 1/3] runt Rafael J. Wysocki
2012-07-30 20:59               ` Gethering power management/policy hw drivers under drivers/power/? (Re: [RFC][PATCH v3 1/3] runtime interpreted power sequences) Rafael J. Wysocki
     [not found]               ` <201207302259.39396.rjw-KKrjLPT3xs0@public.gmane.org>
2012-08-01  0:51                 ` Anton Vorontsov
2012-08-01  0:51                   ` Gethering power management/policy hw drivers under drivers/power/? (Re: [RFC][PATCH v3 1/3] runt Anton Vorontsov
2012-08-01  0:51                   ` Gethering power management/policy hw drivers under drivers/power/? (Re: [RFC][PATCH v3 1/3] runtime interpreted power sequences) Anton Vorontsov
2012-08-06  8:45             ` Pihet-XID, Jean
2012-08-06  8:45               ` Gethering power management/policy hw drivers under drivers/power/? (Re: [RFC][PATCH v3 1/3] runt Pihet-XID, Jean
2012-08-06  8:45               ` Gethering power management/policy hw drivers under drivers/power/? (Re: [RFC][PATCH v3 1/3] runtime interpreted power sequences) Pihet-XID, Jean
2012-07-27 18:20     ` [RFC][PATCH v3 1/3] runtime interpreted power sequences Greg Kroah-Hartman
2012-07-27 18:20       ` Greg Kroah-Hartman
2012-07-27 18:20       ` Greg Kroah-Hartman
2012-07-30 11:00     ` Simon Glass
2012-07-30 11:00       ` Simon Glass
2012-07-30 11:00       ` Simon Glass
2012-07-31  8:37       ` Alex Courbot
2012-07-31  8:37         ` Alex Courbot
2012-07-31  8:37         ` Alex Courbot
     [not found]         ` <50179933.9090501-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-31  9:13           ` Thierry Reding
2012-07-31  9:13             ` Thierry Reding
2012-07-31  9:13             ` Thierry Reding
     [not found]             ` <20120731091324.GA15557-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-07-31 10:11               ` Alex Courbot
2012-07-31 10:11                 ` Alex Courbot
2012-07-31 10:11                 ` Alex Courbot
     [not found]                 ` <5017AF5D.2010204-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-31 10:46                   ` Thierry Reding
2012-07-31 10:46                     ` Thierry Reding
2012-07-31 10:46                     ` Thierry Reding
2012-07-31 14:23         ` Mark Brown
2012-07-31 14:23           ` Mark Brown
2012-07-31 14:23           ` Mark Brown
2012-07-30 11:33     ` Thierry Reding
2012-07-30 11:33       ` Thierry Reding
2012-07-30 11:33       ` Thierry Reding
2012-07-31  9:51       ` Alex Courbot
2012-07-31  9:51         ` Alex Courbot
2012-07-31  9:51         ` Alex Courbot
     [not found]         ` <5017AA87.2040503-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-31 10:19           ` Thierry Reding
2012-07-31 10:19             ` Thierry Reding
2012-07-31 10:19             ` Thierry Reding
     [not found]             ` <20120731101931.GB16155-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-08-01  2:50               ` Alex Courbot
2012-08-01  2:50                 ` Alex Courbot
2012-08-01  2:50                 ` Alex Courbot
     [not found]                 ` <5018997B.7010808-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-08-01  7:17                   ` Thierry Reding
2012-08-01  7:17                     ` Thierry Reding
2012-08-01  7:17                     ` Thierry Reding
2012-07-31 14:11         ` Mark Brown
2012-07-31 14:11           ` Mark Brown
2012-07-31 14:11           ` Mark Brown
2012-07-30 15:44     ` Rob Herring
2012-07-30 15:44       ` Rob Herring
2012-07-30 15:44       ` Rob Herring
     [not found]       ` <5016ABDD.5010809-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-07-30 15:47         ` Mark Brown
2012-07-30 15:47           ` Mark Brown
2012-07-30 15:47           ` Mark Brown
     [not found]           ` <20120730154706.GL4468-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-07-31  9:16             ` Thierry Reding
2012-07-31  9:16               ` Thierry Reding
2012-07-31  9:16               ` Thierry Reding
2012-07-30 22:26         ` Stephen Warren
2012-07-30 22:26           ` Stephen Warren
2012-07-30 22:26           ` Stephen Warren
     [not found]           ` <50170A14.6000201-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-07-31 10:15             ` Alex Courbot
2012-07-31 10:15               ` Alex Courbot
2012-07-31 10:15               ` Alex Courbot
2012-07-30 22:45     ` Stephen Warren
2012-07-30 22:45       ` Stephen Warren
2012-07-30 22:45       ` Stephen Warren
2012-07-31 10:32       ` Alex Courbot
2012-07-31 10:32         ` Alex Courbot
2012-07-31 10:32         ` Alex Courbot
     [not found]         ` <5017B434.2010706-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-31 10:56           ` Thierry Reding
2012-07-31 10:56             ` Thierry Reding
2012-07-31 10:56             ` Thierry Reding
     [not found]             ` <20120731105640.GD16155-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-07-31 12:22               ` Mitch Bradley
2012-07-31 12:22                 ` Mitch Bradley
2012-07-31 12:22                 ` Mitch Bradley
     [not found]                 ` <5017CDF9.2060304-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2012-07-31 12:38                   ` Thierry Reding
2012-07-31 12:38                     ` Thierry Reding
2012-07-31 12:38                     ` Thierry Reding
     [not found]                     ` <20120731123811.GA25855-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-07-31 12:55                       ` Mitch Bradley
2012-07-31 12:55                         ` Mitch Bradley
2012-07-31 12:55                         ` Mitch Bradley
2012-08-01  1:47                         ` Alex Courbot
2012-08-01  1:47                           ` Alex Courbot
2012-08-01  1:47                           ` Alex Courbot
     [not found]                           ` <50188ABB.2060304-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-08-01  2:15                             ` Mitch Bradley
2012-08-01  2:15                               ` Mitch Bradley
2012-08-01  2:15                               ` Mitch Bradley
2012-08-01  1:42                   ` Alex Courbot
2012-08-01  1:42                     ` Alex Courbot
2012-08-01  1:42                     ` Alex Courbot
2012-07-31 14:13               ` Mark Brown
2012-07-31 14:13                 ` Mark Brown
2012-07-31 14:13                 ` Mark Brown
2012-07-31 14:22                 ` Thierry Reding
2012-07-31 14:22                   ` Thierry Reding
2012-07-31 14:22                   ` Thierry Reding
2012-07-31 14:26                   ` Mark Brown
2012-07-31 14:26                     ` Mark Brown
2012-07-31 14:26                     ` Mark Brown
     [not found]                     ` <20120731142607.GV4468-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-07-31 14:32                       ` Thierry Reding
2012-07-31 14:32                         ` Thierry Reding
2012-07-31 14:32                         ` Thierry Reding
     [not found]                         ` <20120731143235.GA21126-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-07-31 15:39                           ` Mark Brown
2012-07-31 15:39                             ` Mark Brown
2012-07-31 15:39                             ` Mark Brown
2012-07-31 16:19                             ` Greg Kroah-Hartman
2012-07-31 16:19                               ` Greg Kroah-Hartman
2012-07-31 16:19                               ` Greg Kroah-Hartman
     [not found]                               ` <20120731161954.GB4941-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2012-07-31 16:22                                 ` Mark Brown
2012-07-31 16:22                                   ` Mark Brown
2012-07-31 16:22                                   ` Mark Brown
     [not found]                                   ` <20120731162230.GE11892-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-07-31 16:42                                     ` Greg Kroah-Hartman
2012-07-31 16:42                                       ` Greg Kroah-Hartman
2012-07-31 16:42                                       ` Greg Kroah-Hartman
2012-07-31 16:50                                       ` Mark Brown
2012-07-31 16:50                                         ` Mark Brown
2012-07-31 16:50                                         ` Mark Brown
2012-08-01  7:41                             ` Thierry Reding
2012-08-01  7:41                               ` Thierry Reding
2012-08-01  7:41                               ` Thierry Reding
     [not found]                               ` <20120801074113.GF29673-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-08-01 13:26                                 ` Mark Brown
2012-08-01 13:26                                   ` Mark Brown
2012-08-01 13:26                                   ` Mark Brown
     [not found]                                   ` <20120801132651.GU11892-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-08-01 13:38                                     ` Thierry Reding
2012-08-01 13:38                                       ` Thierry Reding
2012-08-01 13:38                                       ` Thierry Reding
     [not found]                                       ` <20120801133814.GA19771-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-08-01 13:55                                         ` Mark Brown
2012-08-01 13:55                                           ` Mark Brown
2012-08-01 13:55                                           ` Mark Brown
     [not found]                                           ` <20120801135531.GW11892-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-08-01 14:01                                             ` Thierry Reding
2012-08-01 14:01                                               ` Thierry Reding
2012-08-01 14:01                                               ` Thierry Reding
2012-07-31 16:34         ` Stephen Warren
2012-07-31 16:34           ` Stephen Warren
2012-07-31 16:34           ` Stephen Warren
2012-08-02  8:00       ` Alex Courbot
2012-08-02  8:00         ` Alex Courbot
2012-08-02  8:00         ` Alex Courbot
     [not found]         ` <501A338D.7080105-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-08-02  8:21           ` Thierry Reding
2012-08-02  8:21             ` Thierry Reding
2012-08-02  8:21             ` Thierry Reding
     [not found]             ` <20120802082157.GA14866-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-08-02  8:27               ` Alex Courbot
2012-08-02  8:27                 ` Alex Courbot
2012-08-02  8:27                 ` Alex Courbot
2012-08-02  8:45                 ` Thierry Reding
2012-08-02  8:45                   ` Thierry Reding
2012-08-02  8:45                   ` Thierry Reding
2012-08-02  9:20                   ` Alex Courbot
2012-08-02  9:20                     ` Alex Courbot
2012-08-02  9:20                     ` Alex Courbot
2012-08-02 18:11             ` Mark Brown
2012-08-02 18:11               ` Mark Brown
2012-08-02 18:11               ` Mark Brown
     [not found]               ` <20120802181111.GM4537-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-08-03  1:15                 ` Alex Courbot
2012-08-03  1:15                   ` Alex Courbot
2012-08-03  1:15                   ` Alex Courbot
     [not found]                   ` <501B2642.4080805-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-08-04 14:12                     ` Mark Brown
2012-08-04 14:12                       ` Mark Brown
2012-08-04 14:12                       ` Mark Brown
2012-08-06  2:27                       ` Alex Courbot
2012-08-06  2:27                         ` Alex Courbot
2012-08-06  2:27                         ` Alex Courbot
     [not found]                         ` <501F2BAA.8000808-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-08-06 16:16                           ` Stephen Warren
2012-08-06 16:16                             ` Stephen Warren
2012-08-06 16:16                             ` Stephen Warren
2012-08-07  5:10                             ` Alex Courbot
2012-08-07  5:10                               ` Alex Courbot
2012-08-07  5:10                               ` Alex Courbot
     [not found] ` <1343390750-3642-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-27 12:05   ` [RFC][PATCH v3 2/3] pwm_backlight: use " Alexandre Courbot
2012-07-27 12:05     ` Alexandre Courbot
2012-07-27 12:05     ` Alexandre Courbot
2012-07-27 12:05   ` [RFC][PATCH v3 3/3] tegra: add pwm backlight device tree nodes Alexandre Courbot
2012-07-27 12:05     ` Alexandre Courbot
2012-07-27 12:05     ` Alexandre Courbot
2012-07-30  3:04 Gethering power management/policy hw drivers under drivers/power/? (Re: [RFC][PATCH v3 1/3] runtime interpreted power sequences) 함명주
2012-07-30  3:04 ` Gethering power management/policy hw drivers under drivers/power/? (Re: [RFC][PATCH v3 1/3] runt 함명주
2012-07-30  3:04 ` Gethering power management/policy hw drivers under drivers/power/? (Re: [RFC][PATCH v3 1/3] runtime interpreted power sequences) 함명주

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.