Re: [PATCH v2] pinctrl: add support for group and pinmux states
From: Linus Walleij
Date: Mon Jan 02 2012 - 06:46:29 EST
On Tue, Dec 20, 2011 at 3:22 AM, Haojian Zhuang
<haojian.zhuang@xxxxxxxxx> wrote:
> Do we really need to configure low power mode in device driver?
Who said anything about the device driver?
It's just an API, I was imagining the group states being triggered
from where it makes sense. In our case it would currently be done
in the central system-wide runtime PM and system idle loop. Not
in device drivers at all.
> In most time,
> user will set and tune the low power mode of pins.
>
> If the low power setting
> could be configured via sysfs, it could save a lot of time to rebuild kernel.
pinctrl does not have a sysfs interface, and as per discussion with
Grant this needs to be designed with care. I think proper device nodes
for the pin controllers and iopctl():s is way more apropriate if we really
want a userspace interface to pinctrl stuff.
> Especially GPIO pins are board specific. I think that configure all low power
> setting in board specific code is more reasonable.
As outlined in my response to Stephen you supply the group states
to your driver along with any other platform data or DT nodes.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/