<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pinctrl/pinconf.c, branch linux-4.0.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.0.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.0.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-01-11T21:32:19Z</updated>
<entry>
<title>pinctrl: pinconf-generic: Allow driver to specify DT params</title>
<updated>2015-01-11T21:32:19Z</updated>
<author>
<name>Soren Brinkmann</name>
</author>
<published>2015-01-09T15:43:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dd4d01f7bad886c22687224bc7070b87de8deb51'/>
<id>urn:sha1:dd4d01f7bad886c22687224bc7070b87de8deb51</id>
<content type='text'>
Additionally to the generic DT parameters, allow drivers to provide
driver-specific DT parameters to be used with the generic parser
infrastructure.

To achieve this 'struct pinctrl_desc' is extended to pass custom pinconf
option to the core. In order to pass this kind of information, the
related data structures - 'struct pinconf_generic_dt_params',
'pin_config_item' - are moved from pinconf internals to the
pinconf-generic header.

Additionally pinconfg-generic is refactored to not only iterate over the
generic pinconf parameters but also take the parameters into account
that are provided through the driver's 'struct pinctrl_desc'.
In particular 'pinconf_generic_parse_dt_config()' and
'pinconf_generic_dump' helpers are split into two parts each. In order
to have a more generic helper that can be used to process the generic
parameters as well as the driver-specific ones.

v2:
 - fix typo
 - add missing documentation for @conf_items member in struct
 - rebase to pinctrl/devel: conflict in abx500
 - rename _pinconf_generic_dump() to pinconf_generic_dump_one()
 - removed '_' from _parse_dt_cfg()
 - removed BUG_ONs, error condition is handled in if statements
 - removed pinconf_generic_dump_group() &amp; pinconf_generic_dump_pin
   helpers
   - fixed up corresponding call sites
   - renamed pinconf_generic_dump() to pinconf_generic_dump_pins()
   - added kernel-doc to pinconf_generic_dump_pins()
 - add kernel-doc
 - more verbose commit message

Signed-off-by: Soren Brinkmann &lt;soren.brinkmann@xilinx.com&gt;
Tested-by: Andreas FÃ¤rber &lt;afaerber@suse.de&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: pinconf: remove warning: unused variable 'ops'</title>
<updated>2013-12-13T12:55:15Z</updated>
<author>
<name>Alexandre Belloni</name>
</author>
<published>2013-12-13T11:14:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b5728cf766f61e8a08121315a6b6883a0a2c21b9'/>
<id>urn:sha1:b5728cf766f61e8a08121315a6b6883a0a2c21b9</id>
<content type='text'>
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: pinconf: remove checks on ops-&gt;pin_config_get</title>
<updated>2013-12-12T18:11:07Z</updated>
<author>
<name>Alexandre Belloni</name>
</author>
<published>2013-12-09T10:38:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c420619d5177ac8f4a624a2ec6d0ed00b8b64ddb'/>
<id>urn:sha1:c420619d5177ac8f4a624a2ec6d0ed00b8b64ddb</id>
<content type='text'>
ops-&gt;pin_config_get() is only used in one specific path that will only be taken
for generic pinconf drivers (ops-&gt;is_generic == true) when dumping the pinconf
by using debugfs.

By removing the check in pinconf_check_ops(), let's stop pressuring people to
write a pin_config_get() function that will never be used and so will probably
never be tested.

Removing the check in pinconf_pins_show() allows driver to not implement
pin_config_get() but still get a dump of the pinconf in debugfs by implementing
pin_config_dbg_show().

Finally, not implementing pin_config_get() now results in returning -ENOTSUPP
instead of -EINVAL. While this doesn't have any real impact for now, this feels
more right.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<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>
</feed>
