On Wed, Oct 19, 2011 at 04:04:29PM -0700, Stephen Warren wrote:
@@ -113,6 +204,10 @@ extern struct pinctrl_dev *pinctrl_register(struct pinctrl_desc *pctldesc,
...
+extern int pin_config(struct pinctrl_dev *pctldev, int pin,
enum pin_config_param param, unsigned long data);
+extern int pin_config_group(struct pinctrl_dev *pctldev, const char *pin_group,
enum pin_config_param param, unsigned long data);
Hmmm. Do we really want to expose these as public APIs? I suppose it will allow us to start configuring all these parameters ASAP, but all previous discussion has been aimed at having the pinctrl core set up an initial set of values at boot-time using a board-supplied table (so no external API), and then we were still talking about how to manipulate the values at run-time. Do we really want to encode all this information into drivers calling these APIs?
+1
We should not require device driver to call these APIs directly. There are so many pinctrl subsystem internal details left to its users.
The Stephen's proposal [1] about adding a new param into pinmux_enable() to specify pin configuration is much preferred to me.
Regards, Shawn
[1] http://article.gmane.org/gmane.linux.ports.arm.kernel/137341