[PATCH 2/2] gpiolib: import gpio_request_array() from linux 3.7
Sebastian Hesselbarth
sebastian.hesselbarth at gmail.com
Fri Nov 22 02:57:15 EST 2013
On 11/22/2013 08:49 AM, Antony N. Pavlov wrote:
> On Fri, 22 Nov 2013 08:20:08 +0100
> Sascha Hauer <s.hauer at pengutronix.de> wrote:
>
>> Hi Antony,
>>
>> On Fri, Nov 22, 2013 at 12:11:24AM +0400, Antony Pavlov wrote:
>>> Also import related functions gpio_request_one() and
>>> gpio_free_array().
>>>
>>> This commit imports code from linux 3.7 as
>>> the more recent linux kernel versions use gpiolib descriptors,
>>> see this commit for details:
>>>
>>> commit 372e722ea4dd4ca11c3d04845e11cbc15f32144c
>>> Author: Alexandre Courbot <acourbot at nvidia.com>
>>> Date: Sun Feb 3 01:29:29 2013 +0900
>>>
>>> gpiolib: use descriptors internally
>>>
>>> Make sure gpiolib works internally with descriptors and (chip, offset)
>>> pairs instead of using the global integer namespace. This prepares the
>>> ground for the removal of the global gpio_desc[] array and the
>>> introduction of the descriptor-based GPIO API.
>>>
>>> Signed-off-by: Antony Pavlov <antonynpavlov at gmail.com>
>>
>> What a pitty, we duplicated some work. I created exactly the same patch
>> recently but haven't posted it yet, shame on me.
>
> I must say "Thanks!" to Sebastian Hesselbarth. It's him who introduced
> get_direction callback. His patch conflicted with patch in my local repo.
> So I made the decision to post my patch as soon as possible.
I added that callback because I needed it for working on Marvell Berlin
support. Don't expect too fancy stuff, but as soon as I find some time
to work out the Chipidea USB device driver, I'll be posting patches for
Chromecast.
The get_direction callback gives valuable information for unknown HW :P
Sebastian
More information about the barebox
mailing list