From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Genoud Subject: Re: [RFC PATCH v2 1/4] tty: serial_mctrl_gpio: Add irqs helpers for input lines Date: Tue, 13 Jan 2015 15:41:31 +0100 Message-ID: References: <1420900366-9169-1-git-send-email-j.uzycki@elproma.com.pl> <54B52304.1030008@elproma.com.pl> <54B52CCB.3030100@elproma.com.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-la0-f51.google.com ([209.85.215.51]:33635 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751052AbbAMOlx convert rfc822-to-8bit (ORCPT ); Tue, 13 Jan 2015 09:41:53 -0500 In-Reply-To: <54B52CCB.3030100@elproma.com.pl> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: =?UTF-8?Q?Janusz_U=C5=BCycki?= Cc: Greg Kroah-Hartman , Linus Walleij , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Alexander Shiyan , fabio.estevam@freescale.com, Fabio Estevam , "linux-serial@vger.kernel.org" , "linux-gpio@vger.kernel.org" , Alexandre Courbot , "linux-arm-kernel@lists.infradead.org" 2015-01-13 15:33 GMT+01:00 Janusz U=C5=BCycki = : > > W dniu 2015-01-13 o 15:30, Richard Genoud pisze: > >> 2015-01-13 14:52 GMT+01:00 Janusz U=C5=BCycki : >>> >>> W dniu 2015-01-13 o 14:04, Richard Genoud pisze: >>> >>>> 2015-01-10 15:32 GMT+01:00 Janusz Uzycki = : >>>>> >>>>> 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 >>>>> #include >>>>> #include >>>>> +#include >>>>> >>>>> 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_gp= io_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 faile= d 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 faile= d 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 faile= d 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 faile= d 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 faile= d 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 faile= d 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 faile= d 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 faile= d 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 w= as >>> fine >>> for me. >>> So the function should be exported like mctrl_gpio_to_gpiod() I gue= ss. >>> An other reason can be you have CONFIG_GPIOLIB=3Dn ? >>> In fact, mctrl_gpio_is_gpio() should depend on CONFIG_GPIOLIB for e= mpty >>> body. >>> >> well, I'm also compiling it built-in (I even have config_module=3DN) > > > You have no CONFIG_GPIOLIB enabled and it is the bug in the patchset. > Thanks. > Janusz Actually, I have CONFIG_GPIOLIB=3Dy, only it doesn't appears in the def= config. I did: # cp defconfig arch/arm/configs/toto_defconfig # ARCH=3Darm make toto_defconfig # grep CONFIG_GPIOLIB .config CONFIG_GPIOLIB=3Dy CONFIG_GPIOLIB_IRQCHIP=3Dy # LANG=3DC ARCH=3Darm CROSS_COMPILE=3D~/dev/LNS/buildroot-VIP/output/host/usr/bin/arm-linux- make -j12 uImage [...] 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: -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html