<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/mmc/core/pwrseq_simple.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/mmc/core/pwrseq_simple.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/mmc/core/pwrseq_simple.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2021-12-28T16:53:42Z</updated>
<entry>
<title>mmc: pwrseq: Use bitmap_free() to free bitmap</title>
<updated>2021-12-28T16:53:42Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2021-12-26T14:15:36Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=28df143340b5acb7003aa8a83d0910c112be0504'/>
<id>urn:sha1:28df143340b5acb7003aa8a83d0910c112be0504</id>
<content type='text'>
kfree() and bitmap_free() are the same. But using the later is more
consistent when freeing memory allocated with bitmap_alloc().

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Link: https://lore.kernel.org/r/07a8e48db446888bd77f16b88568e80904f52103.1640528089.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194</title>
<updated>2019-05-30T18:29:22Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-28T16:57:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=af873fcecef567abf8a3468b06dd4e4aab46da6d'/>
<id>urn:sha1:af873fcecef567abf8a3468b06dd4e4aab46da6d</id>
<content type='text'>
Based on 1 normalized pattern(s):

  license terms gnu general public license gpl version 2

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 161 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Alexios Zavras &lt;alexios.zavras@intel.com&gt;
Reviewed-by: Steve Winslow &lt;swinslow@gmail.com&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190528170027.447718015@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mmc: pwrseq_simple: Fix incorrect handling of GPIO bitmap</title>
<updated>2018-10-15T14:26:00Z</updated>
<author>
<name>Janusz Krzysztofik</name>
<email>jmkrzyszt@gmail.com</email>
</author>
<published>2018-10-12T19:09:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=9c9f1ddee729846506b5d671ef5084f6e16dd1d1'/>
<id>urn:sha1:9c9f1ddee729846506b5d671ef5084f6e16dd1d1</id>
<content type='text'>
Commit b9762bebc633 ("gpiolib: Pass bitmaps, not integer arrays, to
get/set array") changed the way GPIO values are passed to
gpiod_get/set_array_value() and friends.  The new code introduced into
mmc_pwrseq_simple_set_gpios_value() incorrectly interpretes the 'value'
argument as a bitmap of GPIO values and assigns it directly to the
'values' bitmap variable passed to gpiod_set_array_value_cansleep()
instead of filling that bitmap with bits equal to the 'value' argument.
As a result, only member 0 of the array is handled correctly.

Moreover, wrong assumption is taken about the 'values' bitmap size not
exceding the number of bits of the 'value' argument type.

Fix it.

Signed-off-by: Janusz Krzysztofik &lt;jmkrzyszt@gmail.com&gt;
Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpiolib: Pass array info to get/set array functions</title>
<updated>2018-09-13T09:16:54Z</updated>
<author>
<name>Janusz Krzysztofik</name>
<email>jmkrzyszt@gmail.com</email>
</author>
<published>2018-09-05T21:50:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=77588c14ac868caece82fddbfae7de03b2cec941'/>
<id>urn:sha1:77588c14ac868caece82fddbfae7de03b2cec941</id>
<content type='text'>
In order to make use of array info obtained from gpiod_get_array() and
speed up processing of arrays matching single GPIO chip layout, that
information must be passed to get/set array functions.  Extend the
functions' API with that additional parameter and update all users.
Pass NULL if a user builds an array itself from single GPIOs.

Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Miguel Ojeda Sandonis &lt;miguel.ojeda.sandonis@gmail.com&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Sebastien Bourdelin &lt;sebastien.bourdelin@savoirfairelinux.com&gt;
Cc: Lukas Wunner &lt;lukas@wunner.de&gt;
Cc: Peter Korsgaard &lt;peter.korsgaard@barco.com&gt;
Cc: Peter Rosin &lt;peda@axentia.se&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Cc: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Rojhalat Ibrahim &lt;imr@rtschenk.de&gt;
Cc: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
Cc: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
Cc: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Cc: Michael Hennerich &lt;Michael.Hennerich@analog.com&gt;
Cc: Jonathan Cameron &lt;jic23@kernel.org&gt;
Cc: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Cc: Peter Meerwald-Stadler &lt;pmeerw@pmeerw.net&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Jiri Slaby &lt;jslaby@suse.com&gt;
Cc: Yegor Yefremov &lt;yegorslists@googlemail.com&gt;
Cc: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Janusz Krzysztofik &lt;jmkrzyszt@gmail.com&gt;
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpiolib: Pass bitmaps, not integer arrays, to get/set array</title>
<updated>2018-09-13T09:15:30Z</updated>
<author>
<name>Janusz Krzysztofik</name>
<email>jmkrzyszt@gmail.com</email>
</author>
<published>2018-09-05T21:50:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b9762bebc6332b40c33e03dea03e30fa12d9e3ed'/>
<id>urn:sha1:b9762bebc6332b40c33e03dea03e30fa12d9e3ed</id>
<content type='text'>
Most users of get/set array functions iterate consecutive bits of data,
usually a single integer, while processing array of results obtained
from, or building an array of values to be passed to those functions.
Save time wasted on those iterations by changing the functions' API to
accept bitmaps.

All current users are updated as well.

More benefits from the change are expected as soon as planned support
for accepting/passing those bitmaps directly from/to respective GPIO
chip callbacks if applicable is implemented.

Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Miguel Ojeda Sandonis &lt;miguel.ojeda.sandonis@gmail.com&gt;
Cc: Sebastien Bourdelin &lt;sebastien.bourdelin@savoirfairelinux.com&gt;
Cc: Lukas Wunner &lt;lukas@wunner.de&gt;
Cc: Peter Korsgaard &lt;peter.korsgaard@barco.com&gt;
Cc: Peter Rosin &lt;peda@axentia.se&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Cc: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Rojhalat Ibrahim &lt;imr@rtschenk.de&gt;
Cc: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
Cc: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
Cc: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Cc: Michael Hennerich &lt;Michael.Hennerich@analog.com&gt;
Cc: Jonathan Cameron &lt;jic23@kernel.org&gt;
Cc: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Cc: Peter Meerwald-Stadler &lt;pmeerw@pmeerw.net&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Jiri Slaby &lt;jslaby@suse.com&gt;
Cc: Yegor Yefremov &lt;yegorslists@googlemail.com&gt;
Cc: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Janusz Krzysztofik &lt;jmkrzyszt@gmail.com&gt;
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Tested-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: pwrseq: Use kmalloc_array instead of stack VLA</title>
<updated>2018-05-02T13:08:29Z</updated>
<author>
<name>Tobin C. Harding</name>
<email>me@tobin.cc</email>
</author>
<published>2018-03-26T06:33:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=486e6661367b40f927aadbed73237693396cbf94'/>
<id>urn:sha1:486e6661367b40f927aadbed73237693396cbf94</id>
<content type='text'>
The use of stack Variable Length Arrays needs to be avoided, as they
can be a vector for stack exhaustion, which can be both a runtime bug
(kernel Oops) or a security flaw (overwriting memory beyond the
stack). Also, in general, as code evolves it is easy to lose track of
how big a VLA can get. Thus, we can end up having runtime failures
that are hard to debug. As part of the directive[1] to remove all VLAs
from the kernel, and build with -Wvla.

Currently driver is using a VLA declared using the number of descriptors.  This
array is used to store integer values and is later used as an argument to
`gpiod_set_array_value_cansleep()` This can be avoided by using
`kmalloc_array()` to allocate memory for the array of integer values.  Memory is
free'd before return from function.

&gt;From the code it appears that it is safe to sleep so we can use GFP_KERNEL
(based _cansleep() suffix of function `gpiod_set_array_value_cansleep()`.

It can be expected that this patch will result in a small increase in overhead
due to the use of `kmalloc_array()`

[1] https://lkml.org/lkml/2018/3/7/621

Signed-off-by: Tobin C. Harding &lt;me@tobin.cc&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: pwrseq_simple: Parse DTS for the power-off-delay-us property</title>
<updated>2017-05-23T12:17:36Z</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2017-05-06T09:43:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e9256e142f597edf90c68cec22db4c4aebaa27de'/>
<id>urn:sha1:e9256e142f597edf90c68cec22db4c4aebaa27de</id>
<content type='text'>
If the optional power-off-delay-us property is found, insert the
corresponding delay after asserting the GPIO during power off. This enables
a graceful shutdown sequence for some devices.

Cc: linux-mmc@vger.kernel.org
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>mmc: pwrseq-simple: Add an optional post-power-on-delay</title>
<updated>2016-09-26T19:31:07Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2016-08-07T19:02:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=721e0497172f0fa661eed2d63367cddf479f35e8'/>
<id>urn:sha1:721e0497172f0fa661eed2d63367cddf479f35e8</id>
<content type='text'>
Some devices need a while to boot their firmware after providing clks /
de-asserting resets before they are ready to receive sdio commands.

This commits adds a post-power-on-delay-ms devicetree property to
mmc-pwrseq-simple for use with such devices.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: pwrseq: convert to proper platform device</title>
<updated>2016-05-02T08:33:30Z</updated>
<author>
<name>Srinivas Kandagatla</name>
<email>srinivas.kandagatla@linaro.org</email>
</author>
<published>2016-04-14T13:02:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d97a1e5d7cd2b5b0edc02a40fe6897b710c9e10f'/>
<id>urn:sha1:d97a1e5d7cd2b5b0edc02a40fe6897b710c9e10f</id>
<content type='text'>
simple-pwrseq and emmc-pwrseq drivers rely on platform_device
structure from of_find_device_by_node(), this works mostly. But, as there
is no driver associated with this devices, cases like default/init pinctrl
setup would never be performed by pwrseq. This becomes problem when the
gpios used in pwrseq require pinctrl setup.

Currently most of the common pinctrl setup is done in
drivers/base/pinctrl.c by pinctrl_bind_pins().

There are two ways to solve this issue on either convert pwrseq drivers
to a proper platform drivers or copy the exact code from
pcintrl_bind_pins(). I prefer converting pwrseq to proper drivers so that
other cases like setting up clks/parents from dt would also be possible.

Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: pwrseq_simple: add to_pwrseq_simple() macro</title>
<updated>2016-05-02T08:33:30Z</updated>
<author>
<name>Srinivas Kandagatla</name>
<email>srinivas.kandagatla@linaro.org</email>
</author>
<published>2016-04-14T13:02:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5b96fea730ab79bdf6f8071cadf8208296bf5e8d'/>
<id>urn:sha1:5b96fea730ab79bdf6f8071cadf8208296bf5e8d</id>
<content type='text'>
This patch adds to_pwrseq_simple() macro to make the code more readable.

Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
</feed>
