<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/pinctrl/pinctrl.h, branch v3.6.6</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.6.6</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.6.6'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2012-07-03T19:51:08+00:00</updated>
<entry>
<title>pinctrl: add pinctrl_add_gpio_ranges function</title>
<updated>2012-07-03T19:51:08+00:00</updated>
<author>
<name>Dong Aisheng</name>
<email>dong.aisheng@linaro.org</email>
</author>
<published>2012-05-23T13:22:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3e5e00b654997aa2c3998d30f7213b9611eb23d7'/>
<id>urn:sha1:3e5e00b654997aa2c3998d30f7213b9611eb23d7</id>
<content type='text'>
Often GPIO ranges are added in batch, so create a special
function for that.

Acked-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Signed-off-by: Dong Aisheng &lt;dong.aisheng@linaro.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: remove pinctrl_remove_gpio_range</title>
<updated>2012-07-03T19:51:07+00:00</updated>
<author>
<name>Dong Aisheng</name>
<email>dong.aisheng@linaro.org</email>
</author>
<published>2012-05-23T13:22:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5d589b092ab212bbcc27828167e1c036e7fc77d2'/>
<id>urn:sha1:5d589b092ab212bbcc27828167e1c036e7fc77d2</id>
<content type='text'>
The gpio ranges will be automatically removed when the pinctrl
driver is unregistered.

Acked-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Signed-off-by: Dong Aisheng &lt;dong.aisheng@linaro.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: add kerneldoc for pinctrl_ops device tree functions</title>
<updated>2012-04-26T21:07:14+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2012-04-26T16:18:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=02ae6da28fb7aa31d8bf1972c99e83c58b684198'/>
<id>urn:sha1:02ae6da28fb7aa31d8bf1972c99e83c58b684198</id>
<content type='text'>
Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: replace list_*() with get_*_count()</title>
<updated>2012-04-18T11:53:10+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@st.com</email>
</author>
<published>2012-03-30T05:55:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d1e90e9e7467dbfe521b25ba79f520bf676ebc36'/>
<id>urn:sha1:d1e90e9e7467dbfe521b25ba79f520bf676ebc36</id>
<content type='text'>
Most of the SoC drivers implement list_groups() and list_functions()
routines for pinctrl and pinmux. These routines continue returning
zero until the selector argument is greater than total count of
available groups or functions.

This patch replaces these list_*() routines with get_*_count()
routines, which returns the number of available selection for SoC
driver. pinctrl layer will use this value to check the range it can
choose.

This patch fixes all user drivers for this change. There are other
routines in user drivers, which have checks to check validity of
selector passed to them. It is also no more required and hence
removed.

Documentation updated as well.

Acked-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@st.com&gt;
[Folded in fix and fixed a minor merge artifact manually]
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: core device tree mapping table parsing support</title>
<updated>2012-04-18T11:53:10+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@wwwdotorg.org</email>
</author>
<published>2012-03-23T16:29:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=57291ce295c0aca738dd284c4a9c591c09ebee71'/>
<id>urn:sha1:57291ce295c0aca738dd284c4a9c591c09ebee71</id>
<content type='text'>
During pinctrl_get(), if the client device has a device tree node, look
for the common pinctrl properties there. If found, parse the referenced
device tree nodes, with the help of the pinctrl drivers, and generate
mapping table entries from them.

During pinctrl_put(), free any results of device tree parsing.

Acked-by: Dong Aisheng &lt;dong.aisheng@linaro.org&gt;
Signed-off-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: forward-declare struct device</title>
<updated>2012-03-06T22:29:05+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@wwwdotorg.org</email>
</author>
<published>2012-03-06T19:12:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0acfb076f7987bd4bb5cd5de879ba3e3e71724e9'/>
<id>urn:sha1:0acfb076f7987bd4bb5cd5de879ba3e3e71724e9</id>
<content type='text'>
Add a dummy declaration of struct device to avoid the following warning:

In file included from include/linux/pinctrl/machine.h:15:0,
                 from arch/arm/mach-tegra/board-pinmux.h:18,
                 from arch/arm/mach-tegra/board-trimslice-pinmux.c:20:
include/linux/pinctrl/pinctrl.h:115:12: warning: 'struct device' declared inside parameter list [enabled by default]
include/linux/pinctrl/pinctrl.h:115:12: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]

Signed-off-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: split pincontrol states into its own header</title>
<updated>2012-03-06T22:08:19+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2012-03-06T20:15:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9a01be1715b6a027765701ca09ba0401ff066fc5'/>
<id>urn:sha1:9a01be1715b6a027765701ca09ba0401ff066fc5</id>
<content type='text'>
Move the pin control state defines into its own header file,
since it is used both by machine.h which is facing the platform
and by consumer.h which is facing the drivers, and pinctrl.h
which is pinctrl-driver internal, let's not have each and every
.h file include all others, then isolation is moot.

Acked-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: fix and simplify locking</title>
<updated>2012-03-05T10:19:49+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2012-03-02T20:05:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=57b676f9c1b7cd84397fe5a86c9bd2788ac4bd32'/>
<id>urn:sha1:57b676f9c1b7cd84397fe5a86c9bd2788ac4bd32</id>
<content type='text'>
There are many problems with the current pinctrl locking:

struct pinctrl_dev's gpio_ranges_lock isn't effective;
pinctrl_match_gpio_range() only holds this lock while searching for a gpio
range, but the found range is return and manipulated after releading the
lock. This could allow pinctrl_remove_gpio_range() for that range while it
is in use, and the caller may very well delete the range after removing it,
causing pinctrl code to touch the now-free range object.

Solving this requires the introduction of a higher-level lock, at least
a lock per pin controller, which both gpio range registration and
pinctrl_get()/put() will acquire.

There is missing locking on HW programming; pin controllers may pack the
configuration for different pins/groups/config options/... into one
register, and hence have to read-modify-write the register. This needs to
be protected, but currently isn't. Related, a future change will add a
"complete" op to the pin controller drivers, the idea being that each
state's programming will be programmed into the pinctrl driver followed
by the "complete" call, which may e.g. flush a register cache to HW. For
this to work, it must not be possible to interleave the pinctrl driver
calls for different devices.

As above, solving this requires the introduction of a higher-level lock,
at least a lock per pin controller, which will be held for the duration
of any pinctrl_enable()/disable() call.

However, each pinctrl mapping table entry may affect a different pin
controller if necessary. Hence, with a per-pin-controller lock, almost
any pinctrl API may need to acquire multiple locks, one per controller.
To avoid deadlock, these would need to be acquired in the same order in
all cases. This is extremely difficult to implement in the case of
pinctrl_get(), which doesn't know which pin controllers to lock until it
has parsed the entire mapping table, since it contains somewhat arbitrary
data.

The simplest solution here is to introduce a single lock that covers all
pin controllers at once. This will be acquired by all pinctrl APIs.

This then makes struct pinctrl's mutex irrelevant, since that single lock
will always be held whenever this mutex is currently held.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: introduce PINCTRL_STATE_DEFAULT, define hogs as that state</title>
<updated>2012-03-02T15:18:24+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2012-03-02T01:48:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=46919ae63d4820e76724beb655274ce143f0da0b'/>
<id>urn:sha1:46919ae63d4820e76724beb655274ce143f0da0b</id>
<content type='text'>
This provides a single centralized name for the default state.

Update PIN_MAP_* macros to use this state name, instead of requiring the
user to pass a state name in.

With this change, hog entries in the mapping table are defined as those
with state name PINCTRL_STATE_DEFAULT, i.e. all entries have the same
name. This interacts badly with the nested iteration over mapping table
entries in pinctrl_hog_maps() and pinctrl_hog_map() which would now
attempt to claim each hog mapping table entry multiple times. Replacing
the custom hog code with a simple pinctrl_get()/pinctrl_enable().

Update documentation and mapping tables to use this.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Dong Aisheng &lt;dong.aisheng@linaro.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: remove unnecessary max pin number</title>
<updated>2012-01-03T08:10:09+00:00</updated>
<author>
<name>Chanho Park</name>
<email>chanho61.park@samsung.com</email>
</author>
<published>2012-01-03T07:47:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0d2006bbf09e817f125ba1e42b2549bc2c5d7351'/>
<id>urn:sha1:0d2006bbf09e817f125ba1e42b2549bc2c5d7351</id>
<content type='text'>
This patch removes maxpin member in the pin control descriptor
because we don't need this value as we enumerate a pin space
using offset.

Signed-off-by: Chanho Park &lt;chanho61.park@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
</feed>
