提交 eae4764f 编写于 作者: P Patrick Delaunay 提交者: Tom Rini

dm: serial: Add setparity

Implements serial setparity ops to allow uart parity change.
It allows to select ODD, EVEN or NONE parity.
Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: NPatrice Chotard <patrice.chotard@st.com>
上级 be1a6f77
......@@ -67,6 +67,12 @@ extern int usbtty_tstc(void);
struct udevice;
enum serial_par {
SERIAL_PAR_NONE,
SERIAL_PAR_ODD,
SERIAL_PAR_EVEN
};
/**
* struct struct dm_serial_ops - Driver model serial operations
*
......@@ -143,6 +149,16 @@ struct dm_serial_ops {
*/
int (*loop)(struct udevice *dev, int on);
#endif
/**
* setparity() - Set up the parity
*
* Set up a new parity for this device.
*
* @dev: Device pointer
* @parity: parity to use
* @return 0 if OK, -ve on error
*/
int (*setparity)(struct udevice *dev, enum serial_par parity);
};
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册