static void gser_connect(struct gserial *port) { struct f_gser *gser = port_to_gser(port); gser->serial_state |= ACM_CTRL_DSR | ACM_CTRL_DCD; gser_notify_serial_state(gser); }
static int gser_send_modem_ctrl_bits(struct gserial *port, int ctrl_bits) { struct f_gser *gser = port_to_gser(port); gser->serial_state = ctrl_bits; return gser_notify_serial_state(gser); }
unsigned int gser_get_rts(struct gserial *port) { struct f_gser *gser = port_to_gser(port); if (gser->port_handshake_bits & ACM_CTRL_RTS) return 1; else return 0; }
static int gser_send_break(struct gserial *port, int duration) { struct f_gser *gser = port_to_gser(port); u16 state; state = gser->serial_state; state &= ~ACM_CTRL_BRK; if (duration) state |= ACM_CTRL_BRK; gser->serial_state = state; return gser_notify_serial_state(gser); }
unsigned int gser_send_ring_indicator(struct gserial *port, unsigned int yes) { struct f_gser *gser = port_to_gser(port); u16 state; state = gser->serial_state; state &= ~ACM_CTRL_RI; if (yes) state |= ACM_CTRL_RI; gser->serial_state = state; return gser_notify_serial_state(gser); }
unsigned int gser_send_carrier_detect(struct gserial *port, unsigned int yes) { struct f_gser *gser = port_to_gser(port); u16 state; state = gser->serial_state; state &= ~ACM_CTRL_DCD; if (yes) state |= ACM_CTRL_DCD; gser->serial_state = state; return gser_notify_serial_state(gser); }