mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
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: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
This commit is contained in:

committed by
Tom Rini

parent
be1a6f775e
commit
eae4764f1a
@ -67,6 +67,12 @@ extern int usbtty_tstc(void);
|
|||||||
|
|
||||||
struct udevice;
|
struct udevice;
|
||||||
|
|
||||||
|
enum serial_par {
|
||||||
|
SERIAL_PAR_NONE,
|
||||||
|
SERIAL_PAR_ODD,
|
||||||
|
SERIAL_PAR_EVEN
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct struct dm_serial_ops - Driver model serial operations
|
* struct struct dm_serial_ops - Driver model serial operations
|
||||||
*
|
*
|
||||||
@ -143,6 +149,16 @@ struct dm_serial_ops {
|
|||||||
*/
|
*/
|
||||||
int (*loop)(struct udevice *dev, int on);
|
int (*loop)(struct udevice *dev, int on);
|
||||||
#endif
|
#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);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user