[RFC PATCH v2 1/4] tty: serial_mctrl_gpio: Add irqs helpers for input lines

Richard Genoud richard.genoud at gmail.com
Tue Jan 13 06:30:06 PST 2015


2015-01-13 14:52 GMT+01:00 Janusz Użycki <j.uzycki at elproma.com.pl>:
>
> W dniu 2015-01-13 o 14:04, Richard Genoud pisze:
>
>> 2015-01-10 15:32 GMT+01:00 Janusz Uzycki <j.uzycki at elproma.com.pl>:

>>> diff --git a/drivers/tty/serial/serial_mctrl_gpio.h
>>> b/drivers/tty/serial/serial_mctrl_gpio.h
>>> index 400ba04..13ba3f4 100644
>>> --- a/drivers/tty/serial/serial_mctrl_gpio.h
>>> +++ b/drivers/tty/serial/serial_mctrl_gpio.h
>>> @@ -21,6 +21,7 @@
>>>   #include <linux/err.h>
>>>   #include <linux/device.h>
>>>   #include <linux/gpio/consumer.h>
>>> +#include <linux/serial_core.h>
>>>
>>>   enum mctrl_gpio_idx {
>>>          UART_GPIO_CTS,
>>> @@ -40,6 +41,13 @@ enum mctrl_gpio_idx {
>>>    */
>>>   struct mctrl_gpios;
>>>
>>> +/*
>>> + * Return true if gidx is GPIO line, otherwise false.
>>> + * It assumes that gpios is allocated and not NULL.
>>> + */
>>> +inline
>>> +bool mctrl_gpio_is_gpio(struct mctrl_gpios *gpios, enum mctrl_gpio_idx
>>> gidx);
>>> +
>>
>> This leads to a compile error :
>>    CC      drivers/tty/serial/atmel_serial.o
>> In file included from drivers/tty/serial/atmel_serial.c:64:0:
>> drivers/tty/serial/atmel_serial.c: In function 'atmel_disable_ms.part.22':
>> drivers/tty/serial/serial_mctrl_gpio.h:49:6: error: inlining failed in
>> call to always_inline 'mctrl_gpio_is_gpio': function body not
>> available
>> drivers/tty/serial/atmel_serial.c:536:25: error: called from here
>> In file included from drivers/tty/serial/atmel_serial.c:64:0:
>> drivers/tty/serial/serial_mctrl_gpio.h:49:6: error: inlining failed in
>> call to always_inline 'mctrl_gpio_is_gpio': function body not
>> available
>> drivers/tty/serial/atmel_serial.c:539:25: error: called from here
>> In file included from drivers/tty/serial/atmel_serial.c:64:0:
>> drivers/tty/serial/serial_mctrl_gpio.h:49:6: error: inlining failed in
>> call to always_inline 'mctrl_gpio_is_gpio': function body not
>> available
>> drivers/tty/serial/atmel_serial.c:542:25: error: called from here
>> In file included from drivers/tty/serial/atmel_serial.c:64:0:
>> drivers/tty/serial/serial_mctrl_gpio.h:49:6: error: inlining failed in
>> call to always_inline 'mctrl_gpio_is_gpio': function body not
>> available
>> drivers/tty/serial/atmel_serial.c:545:25: error: called from here
>> In file included from drivers/tty/serial/atmel_serial.c:64:0:
>> drivers/tty/serial/atmel_serial.c: In function 'atmel_enable_ms':
>> drivers/tty/serial/serial_mctrl_gpio.h:49:6: error: inlining failed in
>> call to always_inline 'mctrl_gpio_is_gpio': function body not
>> available
>> drivers/tty/serial/atmel_serial.c:503:25: error: called from here
>> In file included from drivers/tty/serial/atmel_serial.c:64:0:
>> drivers/tty/serial/serial_mctrl_gpio.h:49:6: error: inlining failed in
>> call to always_inline 'mctrl_gpio_is_gpio': function body not
>> available
>> drivers/tty/serial/atmel_serial.c:506:25: error: called from here
>> In file included from drivers/tty/serial/atmel_serial.c:64:0:
>> drivers/tty/serial/serial_mctrl_gpio.h:49:6: error: inlining failed in
>> call to always_inline 'mctrl_gpio_is_gpio': function body not
>> available
>> drivers/tty/serial/atmel_serial.c:509:25: error: called from here
>> In file included from drivers/tty/serial/atmel_serial.c:64:0:
>> drivers/tty/serial/serial_mctrl_gpio.h:49:6: error: inlining failed in
>> call to always_inline 'mctrl_gpio_is_gpio': function body not
>> available
>> drivers/tty/serial/atmel_serial.c:512:25: error: called from here
>> make[3]: *** [drivers/tty/serial/atmel_serial.o] Error 1
>> make[2]: *** [drivers/tty/serial] Error 2
>> make[1]: *** [drivers/tty] Error 2
>> make: *** [drivers] Error 2
>
>
> Do you compile atmel_serial as module? I compiled built-in and it was fine
> for me.
> So the function should be exported like mctrl_gpio_to_gpiod() I guess.
> An other reason can be you have CONFIG_GPIOLIB=n ?
> In fact, mctrl_gpio_is_gpio() should depend on CONFIG_GPIOLIB for empty
> body.
>
well, I'm also compiling it built-in (I even have config_module=N)
kernel is 3.19-rc3 with your patches ontop.
I attached my .config (saved as a defconfig)

arm-linux-gcc (GCC) 4.7.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: defconfig
Type: application/octet-stream
Size: 4486 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150113/32e3eca8/attachment-0001.obj>


More information about the linux-arm-kernel mailing list