[lkml]   [2018]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 8/8] Input: olpc_apsp: allocate the GPIOs used
Hi Lubomir,

thanks for your patch!

On Wed, Oct 10, 2018 at 4:26 PM Lubomir Rintel <> wrote:

> Take the GPIO lines are used by the SP. The driver doesn't touch the
> lines -- this is done to disallow anything else from fiddling with
> them because that would confuse the SP firmware.
> Also, the lines are now nicely visible in /sys/kernel/debug/gpio.
> Signed-off-by: Lubomir Rintel <>

Sadly I do not think this is the right way to do this these days.
In the past I would have agreed.

A few months back, Qualcomm engineers working on ACPI
support ran into similar issues: there were GPIO lines that
could not be touched by the kernel because they were used
by firmware (BIOS).

The solution we devised can be seen in
commit 726cb3ba49692bdae6caff457755e7cdb432efa4
"gpiolib: Support 'gpio-reserved-ranges' property"
which adds a "valid mask" to struct gpio_chip.

It is further refined in the lates working kernel code to make
it easy for users to set up a custom valid_mask.

So what you should do is modify the platform set-up for
the OLPC to mask off these GPIO lines as invalid since
they are used by the firmware and Linux should not touch

Sadly I don't know which GPIO driver the XO1 is using,
but if you tell us I bet me or Andy will be able to help you
out in finding the right spot to patch.

Linus Walleij

 \ /
  Last update: 2018-10-11 10:39    [W:0.159 / U:18.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site