<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/pinctrl, branch v3.18.28</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.28</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.28'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2014-09-04T17:21:45Z</updated>
<entry>
<title>pinctrl: generic: Fix PIN_CONFIG_DRIVE_OPEN_SOURCE source/drain doc mismatch</title>
<updated>2014-09-04T17:21:45Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2014-09-03T18:01:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0d37899363b0e5486f8800231b7edd75e8b60942'/>
<id>urn:sha1:0d37899363b0e5486f8800231b7edd75e8b60942</id>
<content type='text'>
PIN_CONFIG_DRIVE_OPEN_SOURCE enables open source, not open drain.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: clean up after enable refactoring</title>
<updated>2014-09-04T08:05:07Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2014-09-03T11:02:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=03e9f0cac5da6af85758276cb4624caf5911f2b9'/>
<id>urn:sha1:03e9f0cac5da6af85758276cb4624caf5911f2b9</id>
<content type='text'>
commit 2243a87d90b42eb38bc281957df3e57c712b5e56
"pinctrl: avoid duplicated calling enable_pinmux_setting for a pin"
removed the .disable callback from the struct pinmux_ops,
making the .enable() callback the only remaining callback.

However .enable() is a bad name as it seems to imply that a
muxing can also be disabled. Rename the callback to .set_mux()
and also take this opportunity to clean out any remaining
mentions of .disable() from the documentation.

Acked-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Bjorn Andersson &lt;bjorn.andersson@sonymobile.com&gt;
Acked-by: Fan Wu &lt;fwu@marvell.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: avoid duplicated calling enable_pinmux_setting for a pin</title>
<updated>2014-07-11T12:08:26Z</updated>
<author>
<name>Fan Wu</name>
<email>fwu@marvell.com</email>
</author>
<published>2014-06-09T01:37:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2243a87d90b42eb38bc281957df3e57c712b5e56'/>
<id>urn:sha1:2243a87d90b42eb38bc281957df3e57c712b5e56</id>
<content type='text'>
What the patch does:
1. Call pinmux_disable_setting ahead of pinmux_enable_setting
  each time pinctrl_select_state is called
2. Remove the HW disable operation in pinmux_disable_setting function.
3. Remove the disable ops in struct pinmux_ops
4. Remove all the disable ops users in current code base.

Notes:
1. Great thanks for the suggestion from Linus, Tony Lindgren and
   Stephen Warren and Everyone that shared comments on this patch.
2. The patch also includes comment fixes from Stephen Warren.

The reason why we do this:
1. To avoid duplicated calling of the enable_setting operation
   without disabling operation inbetween which will let the pin
   descriptor desc-&gt;mux_usecount increase monotonously.
2. The HW pin disable operation is not useful for any of the
   existing platforms.
   And this can be used to avoid the HW glitch after using the
   item #1 modification.

In the following case, the issue can be reproduced:
1. There is a driver that need to switch pin state dynamically,
   e.g. between "sleep" and "default" state
2. The pin setting configuration in a DTS node may be like this:

  component a {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = &lt;&amp;a_grp_setting &amp;c_grp_setting&gt;;
	pinctrl-1 = &lt;&amp;b_grp_setting &amp;c_grp_setting&gt;;
  }

  The "c_grp_setting" config node is totally identical, maybe like
  following one:

  c_grp_setting: c_grp_setting {
	pinctrl-single,pins = &lt;GPIO48 AF6&gt;;
  }

3. When switching the pin state in the following official pinctrl
   sequence:
	pin = pinctrl_get();
	state = pinctrl_lookup_state(wanted_state);
	pinctrl_select_state(state);
	pinctrl_put();

Test Result:
1. The switch is completed as expected, that is: the device's
   pin configuration is changed according to the description in the
   "wanted_state" group setting
2. The "desc-&gt;mux_usecount" of the corresponding pins in "c_group"
   is increased without being decreased, because the "desc" is for
   each physical pin while the setting is for each setting node
   in the DTS.
   Thus, if the "c_grp_setting" in pinctrl-0 is not disabled ahead
   of enabling "c_grp_setting" in pinctrl-1, the desc-&gt;mux_usecount
   will keep increasing without any chance to be decreased.

According to the comments in the original code, only the setting,
in old state but not in new state, will be "disabled" (calling
pinmux_disable_setting), which is correct logic but not intact. We
still need consider case that the setting is in both old state
and new state. We can do this in the following two ways:

1. Avoid to "enable"(calling pinmux_enable_setting) the "same pin
   setting" repeatedly
2. "Disable"(calling pinmux_disable_setting) the "same pin setting",
   actually two setting instances, ahead of enabling them.

Analysis:
1. The solution #2 is better because it can avoid too much
   iteration.
2. If we disable all of the settings in the old state and one of
   the setting(s) exist in the new state, the pins mux function
   change may happen when some SoC vendors defined the
   "pinctrl-single,function-off"
   in their DTS file.
   old_setting =&gt; disabled_setting =&gt; new_setting.
3. In the pinmux framework, when a pin state is switched, the
   setting in the old state should be marked as "disabled".

Conclusion:
1. To Remove the HW disabling operation to above the glitch mentioned
   above.
2. Handle the issue mentioned above by disabling all of the settings
   in old state and then enable the all of the settings in new state.

Signed-off-by: Fan Wu &lt;fwu@marvell.com&gt;
Acked-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Patrice Chotard &lt;patrice.chotard@st.com&gt;
Acked-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-by: Maxime Coquelin &lt;maxime.coquelin@st.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: Add void * to pinctrl_pin_desc</title>
<updated>2014-01-16T13:25:37Z</updated>
<author>
<name>Sherman Yin</name>
<email>syin@broadcom.com</email>
</author>
<published>2013-12-21T02:13:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a30d54218e0306b3b7db7df34fe70d5e86fcbbe2'/>
<id>urn:sha1:a30d54218e0306b3b7db7df34fe70d5e86fcbbe2</id>
<content type='text'>
drv_data is added to the pinctrl_pin_desc for drivers to define additional
driver-specific per-pin data.

Signed-off-by: Sherman Yin &lt;syin@broadcom.com&gt;
Reviewed-by: Christian Daudt &lt;bcm@fixthebug.org&gt;
Reviewed-by: Matt Porter &lt;matt.porter@linaro.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: Adds slew-rate, input-enable/disable</title>
<updated>2013-12-16T09:55:03Z</updated>
<author>
<name>Sherman Yin</name>
<email>syin@broadcom.com</email>
</author>
<published>2013-12-11T18:37:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8ba3f4d00078e7a49c60c0bd6298f29402c3a0a0'/>
<id>urn:sha1:8ba3f4d00078e7a49c60c0bd6298f29402c3a0a0</id>
<content type='text'>
This commit adds slew-rate and input-enable/disable support for pinconf
-generic.

Signed-off-by: Sherman Yin &lt;syin@broadcom.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: provide documentation pointer</title>
<updated>2013-12-03T09:08:46Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2013-11-25T14:43:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e9c9489f1077880cb8332f3e1600bf8edba3e86a'/>
<id>urn:sha1:e9c9489f1077880cb8332f3e1600bf8edba3e86a</id>
<content type='text'>
The PIN_CONFIG_OUTPUT parameter is really tricky to understand
and needs an explicit pointer to the documentation.

Cc: Tomasz Figa &lt;t.figa@samsung.com&gt;
Cc: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl/gpio: non-linear GPIO ranges accesible from gpiolib</title>
<updated>2013-10-16T13:33:50Z</updated>
<author>
<name>Christian Ruppert</name>
<email>christian.ruppert@abilis.com</email>
</author>
<published>2013-10-15T13:37:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=586a87e6edc936d6d3c3585af504b33b9c3f0a06'/>
<id>urn:sha1:586a87e6edc936d6d3c3585af504b33b9c3f0a06</id>
<content type='text'>
This patch adds the infrastructure required to register non-linear gpio
ranges through gpiolib and the standard GPIO device tree bindings.

Signed-off-by: Christian Ruppert &lt;christian.ruppert@abilis.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: Pass all configs to driver on pin_config_set()</title>
<updated>2013-08-28T11:34:41Z</updated>
<author>
<name>Sherman Yin</name>
<email>syin@broadcom.com</email>
</author>
<published>2013-08-27T18:32:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=03b054e9696c3cbd3d5905ec96da15acd0a2fe8d'/>
<id>urn:sha1:03b054e9696c3cbd3d5905ec96da15acd0a2fe8d</id>
<content type='text'>
When setting pin configuration in the pinctrl framework, pin_config_set() or
pin_config_group_set() is called in a loop to set one configuration at a time
for the specified pin or group.

This patch 1) removes the loop and 2) changes the API to pass the whole pin
config array to the driver.  It is now up to the driver to loop through the
configs.  This allows the driver to potentially combine configs and reduce the
number of writes to pin config registers.

All c files changed have been build-tested to verify the change compiles and
that the corresponding .o is successfully generated.

Signed-off-by: Sherman Yin &lt;syin@broadcom.com&gt;
Reviewed-by: Christian Daudt &lt;csd@broadcom.com&gt;
Reviewed-by: Matt Porter &lt;matt.porter@linaro.org&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: utils : add support to pass config type in generic util APIs</title>
<updated>2013-08-23T06:56:32Z</updated>
<author>
<name>Laxman Dewangan</name>
<email>ldewangan@nvidia.com</email>
</author>
<published>2013-08-21T11:23:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3287c24088abded9f111ca797fdd36f86912d199'/>
<id>urn:sha1:3287c24088abded9f111ca797fdd36f86912d199</id>
<content type='text'>
Add support to pass the config type like GROUP or PIN when using
the utils or generic pin configuration APIs. This will make the
APIs more generic.

Added additional inline APIs such that it can be use directly as
callback for the pinctrl_ops.

Changes from V1:
- Remove separate implementation for pins and group for
  pinctrl_utils_dt_free_map and improve this function
  to support both i.e. PINS and GROUPs.

Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Reviewed-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: add includes and ifdefs for non-DT builds</title>
<updated>2013-08-15T20:12:46Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2013-08-15T19:38:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0d74d4a161c9f9870039af414b712552c0ed6dfb'/>
<id>urn:sha1:0d74d4a161c9f9870039af414b712552c0ed6dfb</id>
<content type='text'>
Commit e81c8f18afc4fdd6e34d8c83814b8b5134dbb30f
"pinctrl: pinconf-generic: add generic APIs for mapping pinctrl node"
Added function prototypes with implicit dependencies
on other header files causing build warnings like this:

In file included from
arch/arm/mach-ux500/board-mop500-pins.c:12:0:
include/linux/pinctrl/pinconf-generic.h:142:3:
warning: 'struct device_node' declared inside parameter list [enabled
by default]
   unsigned *reserved_maps, unsigned *num_maps);
   ^
include/linux/pinctrl/pinconf-generic.h:142:3:
warning: its scope is only this definition or declaration, which is
probably not what you want [enabled by default]
include/linux/pinctrl/pinconf-generic.h:142:3:
warning: 'struct pinctrl_dev' declared inside parameter list [enabled
by default]
include/linux/pinctrl/pinconf-generic.h:145:3:
warning: 'struct device_node' declared inside parameter list [enabled
by default]
   unsigned *num_maps);
   ^
Let's just add ifdefs for non-DT systems (the actual code is
already ifdefed) and #include &lt;linux/device.h&gt; to get the
most important structs and forward-declare the pinctrl
core structs.

Reported-by: Olof Johansson &lt;olof@lixom.net&gt;
Cc: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
</feed>
