Hi Linus, On Friday 17 of May 2013 13:59:54 Linus Walleij wrote: > On Fri, May 17, 2013 at 11:09 AM, Tomasz Figa <tomasz.figa@xxxxxxxxx> wrote: > >> Just add another state, pctldev->hog_shutdown to this, and > >> add an operation pinctrl_force_poweroff() in the same spirit as > >> pinctrl_force_sleep() that we already have. > >> > >> Add a new state to include/linux/pinctrl/pinctrl-state.h: > >> #define PINCTRL_STATE_POWEROFF "poweroff" > >> > >> And define you pin table to hog these pins with the mentioned > >> default and poweroff states. > >> > >> Result: pinctrl core keeps track of your offstate too. > > > > Power down mode settings on our pin controller are completely unrelated to > > normal mode settings. You can set them once in appropriate registers and > > pins are switched to them automatically when the SoC enters sleep mode. > > Aha so it's actually automatic sleep modes, not power down > (as in, disconnect the power and then push the "on" button to > get it back up). > > Please remember to document it per above in the code and the > device tree, so everybody understands what it is. Sure. > > So IMHO in our case power mode settings are just additional pin > > configuration options, next to pull-up/-down and driver strength. > > I see. Yes that is different. > > You might want to have a debugfs file in your driver for inspecting > them though, that sounds like it could be helpful. I'd recommend > augmenting your .pin_config_dbg_show() callback in the > struct pinconf_ops to display this for each pin, in addition to the > current configuration. Seems reasonable. Best regards, -- Tomasz Figa Linux Kernel Developer Samsung R&D Institute Poland Samsung Electronics -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html