[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAVeFuKUESAXqnMpMY02_1Vg+p1FcPBpFp6_APc3=vkQDaktqw@mail.gmail.com>
Date: Thu, 6 Mar 2014 11:16:28 +0900
From: Alexandre Courbot <gnurou@...il.com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Mika Westerberg <mika.westerberg@...ux.intel.com>,
Alexandre Courbot <acourbot@...dia.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Lan Tianyu <tianyu.lan@...el.com>,
Lv Zheng <lv.zheng@...el.com>, Alan Cox <alan.cox@...el.com>,
Mathias Nyman <mathias.nyman@...ux.intel.com>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/6] gpiolib: Allow GPIO chips to request their own GPIOs
On Wed, Mar 5, 2014 at 11:49 AM, Linus Walleij <linus.walleij@...aro.org> wrote:
> On Tue, Feb 25, 2014 at 12:00 AM, Mika Westerberg
> <mika.westerberg@...ux.intel.com> wrote:
>
>> Sometimes it is useful to allow GPIO chips themselves to request GPIOs they
>> own through gpiolib API. One usecase is ACPI ASL code that should be able
>> to toggle GPIOs through GPIO operation regions.
>>
>> We can't really use gpio_request() and its counterparts because it will pin
>> the module to the kernel forever (as it calls module_get()). Instead we
>> provide a gpiolib internal functions gpiochip_request/free_own_desc() that
>> work the same as gpio_request() but don't manipulate module refrence count.
>>
>> Since it's the GPIO chip driver who requests the GPIOs in the first place
>> we can be sure that it cannot be unloaded without the driver knowing about
>> that. Furthermore we only limit this functionality to be available only
>> inside gpiolib.
>>
>> Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
>
> I fully trust you in doing the ACPI stuff in patches 2-n but on this patch
> in particular I want Alexandre's review tag as well, as he's working
> actively with the descriptor API and I don't want to add too many quirks
> without his consent.
>
> So Alexandre, what do you say about this?
I will wait for v2 to give it a real review, but since the new
functions are not exposed outside of gpiolib and the patch seems to
serve a real purpose I have no objection to it. Especially if Rafael's
suggestions can be applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists