Thread (23 messages) 23 messages, 5 authors, 2018-03-27

Re: [PATCH v3 2/3] gpiolib: Support 'gpio-reserved-ranges' property

From: Stephen Boyd <hidden>
Date: 2018-03-21 19:59:09
Also in: linux-arm-kernel, linux-arm-msm, linux-devicetree, lkml

Quoting Andy Shevchenko (2018-03-21 10:59:10)
On Wed, 2018-03-21 at 09:58 -0700, Stephen Boyd wrote:
quoted
From: Stephen Boyd <redacted>

Some qcom platforms make some GPIOs or pins unavailable for use by
non-secure operating systems, and thus reading or writing the
registers
for those pins will cause access control issues. Add support for a DT
property to describe the set of GPIOs that are available for use so
that
higher level OSes are able to know what pins to avoid reading/writing.
Non-DT platforms can add support by directly updating the
chip->valid_mask.
quoted
Signed-off-by: Stephen Boyd <redacted>
Signed-off-by: Stephen Boyd <redacted>
Hmm...
Don't look closely! :P
quoted
+     gpiochip->valid_mask = kcalloc(BITS_TO_LONGS(gpiochip-
quoted
ngpio),
+                                    sizeof(long), GFP_KERNEL);
Just noticed that kcalloc is superfluous here.
kmalloc_array() would be enough.
Ok. I was copying the irqchip style. Should I fold them together into a
helper function and also update to kmalloc_array?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help