Lines Matching refs:rs485
241 struct serial_rs485 rs485; member
651 rs485_enabled = !!(data->rs485.flags & SER_RS485_ENABLED); in xr_set_flow_mode()
655 if (data->rs485.flags & SER_RS485_RTS_ON_SEND) in xr_set_flow_mode()
825 static void xr_sanitize_serial_rs485(struct serial_rs485 *rs485) in xr_sanitize_serial_rs485() argument
827 if (!(rs485->flags & SER_RS485_ENABLED)) { in xr_sanitize_serial_rs485()
828 memset(rs485, 0, sizeof(*rs485)); in xr_sanitize_serial_rs485()
833 if (rs485->flags & SER_RS485_RTS_ON_SEND) in xr_sanitize_serial_rs485()
834 rs485->flags &= ~SER_RS485_RTS_AFTER_SEND; in xr_sanitize_serial_rs485()
836 rs485->flags |= SER_RS485_RTS_AFTER_SEND; in xr_sanitize_serial_rs485()
839 rs485->flags &= SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | in xr_sanitize_serial_rs485()
841 rs485->delay_rts_before_send = 0; in xr_sanitize_serial_rs485()
842 rs485->delay_rts_after_send = 0; in xr_sanitize_serial_rs485()
843 memset(rs485->padding, 0, sizeof(rs485->padding)); in xr_sanitize_serial_rs485()
853 if (copy_to_user(argp, &data->rs485, sizeof(data->rs485))) { in xr_get_rs485_config()
867 struct serial_rs485 rs485; in xr_set_rs485_config() local
869 if (copy_from_user(&rs485, argp, sizeof(rs485))) in xr_set_rs485_config()
871 xr_sanitize_serial_rs485(&rs485); in xr_set_rs485_config()
874 data->rs485 = rs485; in xr_set_rs485_config()
878 if (copy_to_user(argp, &rs485, sizeof(rs485))) in xr_set_rs485_config()