summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dpc2/ia_css_dpc2_types.h
diff options
context:
space:
mode:
authorLukas Wunner2017-11-24 23:26:40 +0100
committerGreg Kroah-Hartman2017-11-28 16:05:20 +0100
commit01d845352a81df133234a106f34cc93937dcb7bd (patch)
treeddd7f1e26988c832c090e3f0323429c44c56eda4 /drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dpc2/ia_css_dpc2_types.h
parentserial: core: Support common rs485 binding for RTS polarity (diff)
downloadkernel-qcow2-linux-01d845352a81df133234a106f34cc93937dcb7bd.tar.gz
kernel-qcow2-linux-01d845352a81df133234a106f34cc93937dcb7bd.tar.xz
kernel-qcow2-linux-01d845352a81df133234a106f34cc93937dcb7bd.zip
serial: fsl_lpuart: Support common rs485 binding for RTS polarity
Invoke the ->rs485_config callback on probe to set UARTMODEM_TXRTSPOL appropriately based on the UART's device properties. This implicitly sets UARTMODEM_TXRTSE if rs485 was enabled in the device properties, so drop the identical code from lpuart_probe(). It also fixes a bug: If an unsupported rs485 property was specified (rs485-rx-during-tx or rs485-rts-delay), the driver returns -ENOSYS without performing any cleanup, in particular without calling uart_remove_one_port() or clk_disable_unprepare(), thus leaking the uart_port. But with the invocation of ->rs485_config, the unsupported properties are now cleared in struct serial_rs485 and thus ignored. It therefore seems sufficient to just log an error instead of bailing out. Cc: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Lukas Wunner <lukas@wunner.de> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dpc2/ia_css_dpc2_types.h')
0 files changed, 0 insertions, 0 deletions