<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/staging/mt7621-pinctrl, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/staging/mt7621-pinctrl?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/staging/mt7621-pinctrl?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2020-12-08T08:58:01Z</updated>
<entry>
<title>pinctrl: ralink: add a pinctrl driver for the rt2880 family</title>
<updated>2020-12-08T08:58:01Z</updated>
<author>
<name>Sergio Paracuellos</name>
<email>sergio.paracuellos@gmail.com</email>
</author>
<published>2020-12-08T07:55:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=518b466a21ad7fa1e338fa4ed9d180ef439d3bc0'/>
<id>urn:sha1:518b466a21ad7fa1e338fa4ed9d180ef439d3bc0</id>
<content type='text'>
These Socs have 1-3 banks of 8-32 gpios. Rather then setting the muxing of each
pin individually, these socs have mux groups that when set will effect 1-N pins.
Pin groups have a 2, 4 or 8 different muxes.

Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Sergio Paracuellos &lt;sergio.paracuellos@gmail.com&gt;
Link: https://lore.kernel.org/r/20201208075523.7060-3-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: mt7621-pinctrl: stop using the deprecated 'pinctrl_add_gpio_range'</title>
<updated>2020-12-07T14:10:16Z</updated>
<author>
<name>Sergio Paracuellos</name>
<email>sergio.paracuellos@gmail.com</email>
</author>
<published>2020-12-06T10:53:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=94168e2ba4dc6a8db033afcd32ad64ab8ec9f09c'/>
<id>urn:sha1:94168e2ba4dc6a8db033afcd32ad64ab8ec9f09c</id>
<content type='text'>
If the gpio DT node has the 'gpio-ranges' property, the range will be
added by the gpio core and doesn't need to be added by the pinctrl
driver.

By having the gpio-ranges property, we can map every pin between
gpio node and pinctrl node and we can stop using the deprecated
pinctrl_add_gpio_range() function.

Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Sergio Paracuellos &lt;sergio.paracuellos@gmail.com&gt;
Link: https://lore.kernel.org/r/20201206105333.18428-1-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: mt7621-pinctrl: Use correct pointer type argument for sizeof</title>
<updated>2020-04-23T11:36:20Z</updated>
<author>
<name>Jason Yan</name>
<email>yanaijie@huawei.com</email>
</author>
<published>2020-04-20T13:34:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5975b85ae244dd607965518129e816e4072bc976'/>
<id>urn:sha1:5975b85ae244dd607965518129e816e4072bc976</id>
<content type='text'>
Fix the following coccicheck warning:

drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c:223:14-36: WARNING: Use
correct pointer type argument for sizeof

Signed-off-by: Jason Yan &lt;yanaijie@huawei.com&gt;
Link: https://lore.kernel.org/r/20200420133416.3087-1-yanaijie@huawei.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: mt7621-pinctrl: Add of_node_put() before return</title>
<updated>2019-07-22T05:34:15Z</updated>
<author>
<name>Nishka Dasgupta</name>
<email>nishkadg.linux@gmail.com</email>
</author>
<published>2019-07-16T05:59:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c4011dde241d371972788a735cd1b5d547991d46'/>
<id>urn:sha1:c4011dde241d371972788a735cd1b5d547991d46</id>
<content type='text'>
Each iteration of for_each_compatible_node puts the previous node, but
in the case of a return from the middle of the loop, there is no put,
thus causing a memory leak. Add an of_node_put before the return.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta &lt;nishkadg.linux@gmail.com&gt;
Link: https://lore.kernel.org/r/20190716055908.3183-1-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: add missing SPDX lines to Makefile files</title>
<updated>2019-04-03T09:10:15Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-04-02T10:31:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=97ed8eab2a0067bee21aa634c938454660e76a38'/>
<id>urn:sha1:97ed8eab2a0067bee21aa634c938454660e76a38</id>
<content type='text'>
There are a few remaining drivers/staging/*/Makefile files that do not
have SPDX identifiers in them.  Add the correct GPL-2.0 identifier to
them to make scanning tools happy.

Reviewed-by: Mukesh Ojha &lt;mojha@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: add missing SPDX lines to Kconfig files</title>
<updated>2019-04-03T09:10:15Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-04-02T10:31:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=99b75a4e3275e85814db0fa2f49274bd3d5359d3'/>
<id>urn:sha1:99b75a4e3275e85814db0fa2f49274bd3d5359d3</id>
<content type='text'>
There are a few remaining drivers/staging/*/Kconfig files that do not
have SPDX identifiers in them.  Add the correct GPL-2.0 identifier to
them to make scanning tools happy.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: mt7621-pinctrl: Test devm_kzalloc for failure while improving the code</title>
<updated>2019-01-30T14:38:50Z</updated>
<author>
<name>Nishad Kamdar</name>
<email>nishadkamdar@gmail.com</email>
</author>
<published>2019-01-29T15:45:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f2829d070f3da88a500f257013f387c5dc7617db'/>
<id>urn:sha1:f2829d070f3da88a500f257013f387c5dc7617db</id>
<content type='text'>
This patch tests the return of devm_kzalloc for failure and
improves the code.

Signed-off-by: Nishad Kamdar &lt;nishadkamdar@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: mt7621-pinctrl: Remove space after cast</title>
<updated>2019-01-25T08:52:01Z</updated>
<author>
<name>Nishad Kamdar</name>
<email>nishadkamdar@gmail.com</email>
</author>
<published>2019-01-23T16:31:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d31f6b8043d8f0384bdfa818aa9e31b6404ef883'/>
<id>urn:sha1:d31f6b8043d8f0384bdfa818aa9e31b6404ef883</id>
<content type='text'>
This patch removes space after a cast as it
is not needed.
Issue found by checkpatch.

Signed-off-by: Nishad Kamdar &lt;nishadkamdar@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: mt7621-pinctrl: use pinconf-generic for 'dt_node_to_map' and 'dt_free_map'</title>
<updated>2019-01-07T10:28:13Z</updated>
<author>
<name>Sergio Paracuellos</name>
<email>sergio.paracuellos@gmail.com</email>
</author>
<published>2019-01-04T11:34:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0ca1f90861b6d64386261096b42bfc81ce11948a'/>
<id>urn:sha1:0ca1f90861b6d64386261096b42bfc81ce11948a</id>
<content type='text'>
Instead of reimplement afunction to do 'dt_node_to_map' task like
'rt2880_pinctrl_dt_node_to_map' make use of 'pinconf_generic_dt_node_to_map_all'
generic function for this task. Also use its equivalent function for free which
is 'pinconf_generic_dt_free_map'. Remove 'rt2880_pinctrl_dt_node_to_map' function
which is not needed anymore. This decrease a bit driver LOC and make it more
generic. To properly compile this changes 'GENERIC_PINCONF' option is selected
with the driver in its Kconfig file.

This also fix a problem with function 'rt2880_pinctrl_dt_node_to_map' which was
calling internally 'pinctrl_utils_reserve_map' which expects 'num_maps' to be initialized.
It does a memory allocation based on the value, and triggers the following
warning if is not properly set:

if (unlikely(order &gt;= MAX_ORDER)) {
        WARN_ON_ONCE(!(gfp_mask &amp; __GFP_NOWARN));
        return NULL;
}

Generic function 'pinconf_generic_dt_node_to_map_all' initializes properly
'num_maps' to zero fixing the problem.

Fixes: e12a1a6e087b ("staging: mt7621-pinctrl: refactor rt2880_pinctrl_dt_node_to_map function")
Reported-by: NeilBrown &lt;neil@brown.name&gt;
Tested-by: NeilBrown &lt;neil@brown.name&gt;
Signed-off-by: Sergio Paracuellos &lt;sergio.paracuellos@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: mt7621-pinctrl: fix uninitialized variable ngroups</title>
<updated>2018-11-11T19:47:38Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2018-11-10T23:28:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=cd56a5141331abfe218d744a3d66e1788135d482'/>
<id>urn:sha1:cd56a5141331abfe218d744a3d66e1788135d482</id>
<content type='text'>
Currently the for_each_node_with_property loop us incrementing variable
ngroups however it was not initialized and hence will contain garbage.
Fix this by initializing ngroups to zero.

Detected with static analysis with cppcheck:

drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c:89]: (error) Uninitialized
variable: ngroups

Fixes: e12a1a6e087b ("staging: mt7621-pinctrl: refactor rt2880_pinctrl_dt_node_to_map function")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Reviewed-by: Sergio Paracuellos &lt;sergio.paracuellos@gmail.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
