[PATCH 3/4] gpio: make handler_data configurable while using gpiolib_irqchip

Barry Song 21cnbao at gmail.com
Wed Apr 23 15:55:49 PDT 2014


2014-04-24 4:13 GMT+08:00 Linus Walleij <linus.walleij at linaro.org>:
> On Tue, Apr 15, 2014 at 8:43 AM, Barry Song <21cnbao at gmail.com> wrote:
>
>> From: Barry Song <Baohua.Song at csr.com>
>>
>> since it is called handler_data, drivers should have the ability to
>> set handler_data based on real hardware.
>> GPIOLIB_IRQCHIP doesn't use handler_data by itself, so it will not
>> break GPIO core.
>>
>> Signed-off-by: Barry Song <Baohua.Song at csr.com>
>
> NAK, the whole idea with the function gpiochip_set_chained_irqchip()
> is that its sets things up so that the gpiochip is passed as handler
> data on the parent IRQ, akin to how the gpiochip is passed as
> chip data on the cascaded IRQs.

i think it is a really bad idea as the parent handler might not want
the whole chip if the chip has several parents and each parent want a
separate handler_data.
this patch doesn't break your way as the parameter is void *, drivers
which use your way don't need any change. but for drivers which want
more special handler_data, it supports better.

>
> Yours,
> Linus Walleij
-barry



More information about the linux-arm-kernel mailing list