<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pinctrl/pinconf.c, branch linux-3.13.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.13.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.13.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2013-09-23T08:47:14Z</updated>
<entry>
<title>pinctrl: remove an unnecessary cast</title>
<updated>2013-09-23T08:47:14Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2013-09-17T10:47:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=81d36c4fff7401b099d98818a517ee6bc02e93f2'/>
<id>urn:sha1:81d36c4fff7401b099d98818a517ee6bc02e93f2</id>
<content type='text'>
sizeof() is already size_t so there is no need to cast here.  Generally,
casting inside the min() macro instead of using min_t() is considered
bad style.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: fix pinconf_dbg_config_write return type</title>
<updated>2013-09-23T08:47:03Z</updated>
<author>
<name>Vincent Stehlé</name>
</author>
<published>2013-09-16T20:50:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3b59e432ec9c093311e0ad057e330e04feb79007'/>
<id>urn:sha1:3b59e432ec9c093311e0ad057e330e04feb79007</id>
<content type='text'>
Have pinconf_dbg_config_write() return a ssize_t. This fixes the following
compilation warning:

  drivers/pinctrl/pinconf.c:617:2: warning: initialization from incompatible pointer type [enabled by default]
  drivers/pinctrl/pinconf.c:617:2: warning: (near initialization for ‘pinconf_dbg_pinconfig_fops.write’) [enabled by default]

Signed-off-by: Vincent Stehlé &lt;vincent.stehle@laposte.net&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&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>
</author>
<published>2013-08-27T18:32:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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: pinconf: fix comparison of different types</title>
<updated>2013-08-07T20:30:32Z</updated>
<author>
<name>Jingoo Han</name>
</author>
<published>2013-08-06T09:10:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9b6803542e1bd544289d605c84233a0e0a46ac7d'/>
<id>urn:sha1:9b6803542e1bd544289d605c84233a0e0a46ac7d</id>
<content type='text'>
Fix the following sparse warning:

drivers/pinctrl/pinconf.c:521:20: error: incompatible types in comparison expression (different type sizes)

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: shut up a couple of pinctrl warnings</title>
<updated>2013-08-07T20:29:30Z</updated>
<author>
<name>Russell King - ARM Linux</name>
</author>
<published>2013-07-28T12:13:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8a9dcc3ffed66bf6f66c45b11f34de02b0fda4a0'/>
<id>urn:sha1:8a9dcc3ffed66bf6f66c45b11f34de02b0fda4a0</id>
<content type='text'>
So, I notice that we get a couple of warnings from the pinctrl code:

drivers/pinctrl/pinconf.c: In function 'pinconf_dbg_config_print':
drivers/pinctrl/pinconf.c:433:36: warning: 'configs' may be used uninitialized in this function
drivers/pinctrl/pinconf.c: In function 'pinconf_dbg_config_write':
drivers/pinctrl/pinconf.c:511:36: warning: 'configs' may be used uninitialized in this function

While the compiler might not be able to work out that "configs" is
safe, the code doesn't lend itself very well to identifying that
fact when reading it either.  This can be trivially solved by a slight
restructuring of the code - which also reduces the LOC.

Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: rip out the direct pinconf API</title>
<updated>2013-06-25T10:54:56Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2013-06-24T13:06:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ad42fc6c84795d19972e7f7dee70fe74bec4c2d8'/>
<id>urn:sha1:ad42fc6c84795d19972e7f7dee70fe74bec4c2d8</id>
<content type='text'>
From the inception ot the pin config API there has been the
possibility to get a handle at a pin directly and configure
its electrical characteristics. For this reason we had:

int pin_config_get(const char *dev_name, const char *name,
               unsigned long *config);
int pin_config_set(const char *dev_name, const char *name,
               unsigned long config);
int pin_config_group_get(const char *dev_name,
               const char *pin_group,
               unsigned long *config);
int pin_config_group_set(const char *dev_name,
               const char *pin_group,
               unsigned long config);

After the introduction of the pin control states that will
control pins associated with devices, and its subsequent
introduction to the device core, as well as the
introduction of pin control hogs that can set up states on
boot and optionally also at sleep, this direct pin control
API is a thing of the past.

As could be expected, it has zero in-kernel users.
Let's delete this API and make our world simpler.

Reported-by: Tony Lindgren &lt;tony@atomide.com&gt;
Reviewed-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: pinconf: take the right mutex</title>
<updated>2013-05-27T13:53:32Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2013-05-27T13:53:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a386267a2ceea33d76fa2b7f1c2e72a858fcb68e'/>
<id>urn:sha1:a386267a2ceea33d76fa2b7f1c2e72a858fcb68e</id>
<content type='text'>
The pinconf_dgb_config_print() takes the per-pincontroller
mutex, when what it wants to take is actually the pin maps
mutex.

Reported-by: James Hogan &lt;james.hogan@imgtec.com&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: move subsystem mutex to pinctrl_dev struct</title>
<updated>2013-04-26T15:01:35Z</updated>
<author>
<name>Patrice Chotard</name>
</author>
<published>2013-04-11T09:01:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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/pinconfig: fix misplaced goto</title>
<updated>2013-04-26T15:00:14Z</updated>
<author>
<name>Laurent Meunier</name>
</author>
<published>2013-04-24T11:05:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cb6d315dc36ce56bc017051befa9ac9391300eb9'/>
<id>urn:sha1:cb6d315dc36ce56bc017051befa9ac9391300eb9</id>
<content type='text'>
This update contains a basic fix that went unseen through
test and review.

Signed-off-by: Laurent Meunier &lt;laurent.meunier@st.com&gt;
Reviewed-by: Patrice Chotard &lt;patrice.chotard@stericsson.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl/pinconfig: add debug interface</title>
<updated>2013-04-19T13:45:05Z</updated>
<author>
<name>Laurent Meunier</name>
</author>
<published>2013-04-18T08:48:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f07512e615dd8ebd0866efc38b39ccd41f1495d8'/>
<id>urn:sha1:f07512e615dd8ebd0866efc38b39ccd41f1495d8</id>
<content type='text'>
This update adds a debugfs interface to modify a pin configuration
for a given state in the pinctrl map. This allows to modify the
configuration for a non-active state, typically sleep state.
This configuration is not applied right away, but only when the state
will be entered.

This solution is mandated for us by HW validation: in order
to test and verify several pin configurations during sleep without
recompiling the software.

Change log in this patch set;
Take into account latest feedback from Stephen Warren:
- stale comments update
- improved code efficiency and readibility
- limit size of global variable pinconf_dbg_conf
- remove req_type as it can easily be added later when
add/delete requests support is implemented

Signed-off-by: Laurent Meunier &lt;laurent.meunier@st.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
</feed>
