<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/pinctrl/core.c, branch v3.11.2</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.11.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.11.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-07-25T15:18:36Z</updated>
<entry>
<title>pinctrl: fix a memleak when freeing maps</title>
<updated>2013-07-25T15:18:36Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2013-07-22T23:43:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=db6c2c69c27f2c4fd1e2a1c6b0b1119b1e885f8a'/>
<id>urn:sha1:db6c2c69c27f2c4fd1e2a1c6b0b1119b1e885f8a</id>
<content type='text'>
We forgot to free the node itself when free:ing a map.

Reported-by: xulinuxkernel &lt;xulinuxkernel@gmail.com&gt;
Reviewed-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: Staticize local symbols</title>
<updated>2013-06-18T14:54:45Z</updated>
<author>
<name>Sachin Kamat</name>
<email>sachin.kamat@linaro.org</email>
</author>
<published>2013-06-18T09:04:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=843aec9653acbc636207467d2c17f3d5902172d3'/>
<id>urn:sha1:843aec9653acbc636207467d2c17f3d5902172d3</id>
<content type='text'>
Symbols referenced only in this file are made static.

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Cc: Patrice Chotard &lt;patrice.chotard@st.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: core: fix missing unlock on error in pinctrl_find_gpio_range_from_pin()</title>
<updated>2013-06-18T07:41:15Z</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2013-06-18T04:24:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c8f50e8657a6dd8d6b2a596e4b4659fd77dc1718'/>
<id>urn:sha1:c8f50e8657a6dd8d6b2a596e4b4659fd77dc1718</id>
<content type='text'>
Add the missing unlock before return from function pinctrl_find_gpio_range_from_pin()
in the error handling case.

Introduced by commit 2ff3477efd7086544b9e298fc63afab0645921b4.
(pinctrl: add pin list based GPIO ranges)

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: export pinctrl_pm_select_*_state</title>
<updated>2013-06-17T16:29:32Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2013-06-17T15:12:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f472deadd541f35fb002c033b76b645130705e7d'/>
<id>urn:sha1:f472deadd541f35fb002c033b76b645130705e7d</id>
<content type='text'>
The three functions pinctrl_pm_select_default_state,
pinctrl_pm_select_sleep_state, and pinctrl_pm_select_idle_state
are used in drivers that can be loadable modules, and should
be exported.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: add pin list based GPIO ranges</title>
<updated>2013-06-17T16:18:28Z</updated>
<author>
<name>Christian Ruppert</name>
<email>christian.ruppert@abilis.com</email>
</author>
<published>2013-06-13T12:55:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c8587eeef8fc219e806e868c6f0c7170c769efab'/>
<id>urn:sha1:c8587eeef8fc219e806e868c6f0c7170c769efab</id>
<content type='text'>
Traditionally, GPIO ranges are based on consecutive ranges of both GPIO
and pin numbers. This patch allows for GPIO ranges with arbitrary lists
of pin numbers.

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>drivers: pinctrl sleep and idle states in the core</title>
<updated>2013-06-16T09:56:52Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2013-06-05T13:30:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=14005ee270cad7078adbce6b7f3687b992a8334e'/>
<id>urn:sha1:14005ee270cad7078adbce6b7f3687b992a8334e</id>
<content type='text'>
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.

Cc: Hebbar Gururaja &lt;gururaja.hebbar@ti.com&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Acked-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Mark Brown &lt;broonie@kernel.org&gt;
Reviewed-by: Kevin Hilman &lt;khilman@linaro.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: sink pinctrldev_list_mutex</title>
<updated>2013-06-16T09:56:50Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2013-05-16T07:17:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=44d5f7bbead9e7fbc8731322d5f595d28ad219e9'/>
<id>urn:sha1:44d5f7bbead9e7fbc8731322d5f595d28ad219e9</id>
<content type='text'>
The pinctrldev_list_mutex is sinked into the functions that
actually traverse the list and lock it there. The code makes
much more sense in this way. All the callers are in
non-performance critical paths and the code is way more
readable this way.

Also refactor the function get_pinctrl_dev_from_devname() to
follow the design pattern of get_pinctrl_dev_from_of_node()
which is slightly simpler.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: fix mutex deadlock in get_pinctrl_dev_from_of_node()</title>
<updated>2013-04-30T11:02:04Z</updated>
<author>
<name>Daniel Mack</name>
<email>zonque@gmail.com</email>
</author>
<published>2013-04-26T16:57:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d463f82d22f90096d1352de3837b1602a3410b5d'/>
<id>urn:sha1:d463f82d22f90096d1352de3837b1602a3410b5d</id>
<content type='text'>
This obvious bug was introduced by d755910b7 ("pinctrl: move subsystem
mutex to pinctrl_dev struct").

Signed-off-by: Daniel Mack &lt;zonque@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: move subsystem mutex to pinctrl_dev struct</title>
<updated>2013-04-26T15:01:35Z</updated>
<author>
<name>Patrice Chotard</name>
<email>patrice.chotard@st.com</email>
</author>
<published>2013-04-11T09:01:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=42fed7ba44e4e8c1fb27b28ad14490cb1daff3c7'/>
<id>urn:sha1:42fed7ba44e4e8c1fb27b28ad14490cb1daff3c7</id>
<content type='text'>
This mutex avoids deadlock in case of use of multiple pin
controllers. Before this modification, by using a global
mutex, deadlock appeared when, for example, a call to
pinctrl_pins_show() locked the pinctrl_mutex, called the
ops-&gt;pin_dbg_show of a particular pin controller. If this
pin controller needs I2C access to retrieve configuration
information and I2C driver is using pinctrl to drive its
pins, a call to pinctrl_select_state() try to lock again
pinctrl_mutex which leads to a deadlock.

Notice that the mutex grab from the two direction functions
was moved into pinctrl_gpio_direction().

For several cases, we can't replace pinctrl_mutex by
pctldev-&gt;mutex, because at this stage, pctldev is
not accessible :
	- pinctrl_get()/pinctrl_put()
	- pinctrl_register_maps()

So add respectively pinctrl_list_mutex and
pinctrl_maps_mutex in order to protect
pinctrl_list and pinctrl_maps list instead.

Reintroduce pinctrldev_list_mutex in
find_pinctrl_by_of_node(),
pinctrl_find_and_add_gpio_range()
pinctrl_request_gpio(), pinctrl_free_gpio(),
pinctrl_gpio_direction(), pinctrl_devices_show(),
pinctrl_register() and pinctrl_unregister() to
protect pinctrldev_list.

Changes v2-&gt;v3:
- Fix a missing EXPORT_SYMBOL_GPL() for pinctrl_select_state().

Changes v1-&gt;v2:
- pinctrl_select_state_locked() is removed, all lock mechanism
  is located inside pinctrl_select_state(). When parsing
  the state-&gt;setting list, take the per-pin-controller driver
  lock. (Patrice).
- Introduce pinctrldev_list_mutex to protect pinctrldev_list
  in all functions which parse or modify pictrldev_list.
  (Patrice).
- move find_pinctrl_by_of_node() from pinctrl/devicetree.c to
  pinctrl/core.c in order to protect pinctrldev_list.
  (Patrice).
- Sink mutex:es into some functions and remove some _locked
  variants down to where the lists are actually accessed to
  make things simpler. (Linus)
- Drop *all* mutexes completely from pinctrl_lookup_state()
  and pinctrl_select_state() - no relevant mutex was taken
  and it was unclear what this was protecting against. (Linus)

Reported by : Seraphin Bonnaffe &lt;seraphin.bonnaffe@stericsson.com&gt;
Signed-off-by: Patrice Chotard &lt;patrice.chotard@st.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: simplify the re-enable old state code in pinctrl_select_state</title>
<updated>2013-04-03T12:38:27Z</updated>
<author>
<name>Richard Genoud</name>
<email>richard.genoud@gmail.com</email>
</author>
<published>2013-03-29T09:03:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=385d94246b05f7c06d7ecb5215087e5ebddbf1e6'/>
<id>urn:sha1:385d94246b05f7c06d7ecb5215087e5ebddbf1e6</id>
<content type='text'>
Instead of just enabling the settings that were disabled in the 1st
loop, it's simpler to recall pinctrl_select_state with the old state.

Signed-off-by: Richard Genoud &lt;richard.genoud@gmail.com&gt;
Reviewed-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
</feed>
