Thread (4 messages) 4 messages, 4 authors, 2018-10-15

[RFT PATCH] mmc: pwrseq_simple: Fix incorrect handling of GPIO bitmap

From: Linus Walleij <hidden>
Date: 2018-10-15 14:27:26
Also in: linux-amlogic, linux-gpio, linux-mmc, linux-omap, linux-rockchip, linux-samsung-soc, lkml

On Fri, Oct 12, 2018 at 9:07 PM Janusz Krzysztofik [off-list ref] wrote:
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 <jmkrzyszt@gmail.com>
Patch applied with Ulf's and Marek's tags!

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help