Re: [PATCH v4 3/4] serial: mctrl_gpio: enable API usage only for initialized mctrl_gpios struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Yegor,

On Mon, May 23, 2016 at 11:40:44AM +0200, Yegor Yefremov wrote:
> > With the same reasoning that gpiod_get_optional returns -ENOSYS without
> > GPIOLIB, this also should return -ENOSYS.
> 
> OK. What do think about such workaround in
> drivers/tty/serial/8250/8250_core.c for not breaking the UART
> initialization, when GPIOLIB is disabled?
> 
> if (IS_ERR(uart->gpios) && IS_ENABLED(CONFIG_GPIOLIB))
>         return real error;

If your 8250 has a rts gpio specified in the device tree, what do you
expect from a kernel without GPIOLIB support?

If it's important that RTS is setup correctly, you should return
failure above. If it's not important that RTS is handled correctly, then
think again what this implies for a GPIOLIB=y .config. Can you just drop
RTS handling then?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux