driver: uart: ns16550: store active configuration in dev data

Update device data with the activated configuration, so that it
will be remembered for follow up configuration get requests.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
This commit is contained in:
Timo Teräs 2020-03-11 16:13:05 +02:00 committed by Andrew Boie
commit 1c3b46daff

View file

@ -397,6 +397,8 @@ static int uart_ns16550_configure(struct device *dev,
return -ENOTSUP;
}
dev_data->uart_config = *cfg;
/* data bits, stop bits, parity, clear DLAB */
OUTBYTE(LCR(dev),
uart_cfg.data_bits | uart_cfg.stop_bits | uart_cfg.parity);