lkml.org 
[lkml]   [2013]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] drivers: pinctrl sleep and idle states in the core
On 06/05/2013 07:44 AM, Linus Walleij wrote:
> From: Linus Walleij <linus.walleij@linaro.org>
>
> If a device have sleep and idle states in addition to the
> default state, look up these in the core and stash them in
> the pinctrl state container.
>
> Add accessor functions for pinctrl consumers to put the pins
> into "default", "sleep" and "idle" states passing nothing but
> the struct device * affected.
>
> Solution suggested by Kevin Hilman, Mark Brown and Dmitry
> Torokhov in response to a patch series from Hebbar
> Gururaja.

> diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c

> +int pinctrl_pm_select_default_state(struct device *dev)

> +int pinctrl_pm_select_sleep_state(struct device *dev)

> +int pinctrl_pm_select_idle_state(struct device *dev)

The implementation of those 3 functions is basically identical. I'd be
inclined to move it to a helper function, and just pass (dev,
pins->xxx_state) to it.


\
 
 \ /
  Last update: 2013-06-05 20:02    [W:1.976 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site