RE: [PATCH] Add DCD line support to CP210x driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Konstantin Shkolnyy
> Sent: Wednesday, March 23, 2016 11:26
> To: 'Valentin Yakovenkov'; linux-usb@xxxxxxxxxxxxxxx
> Subject: RE: [PATCH] Add DCD line support to CP210x driver
> 
> > -----Original Message-----
> > From: linux-usb-owner@xxxxxxxxxxxxxxx [mailto:linux-usb-
> > owner@xxxxxxxxxxxxxxx] On Behalf Of Valentin Yakovenkov
> > Sent: Tuesday, March 22, 2016 11:12
> > To: linux-usb@xxxxxxxxxxxxxxx
> > Subject: [PATCH] Add DCD line support to CP210x driver
> [...]
> 
> >  static struct usb_serial_driver * const serial_drivers[] = {
> > @@ -460,6 +471,11 @@ static int cp210x_open(struct tty_struct *tty, struct
> > usb_serial_port *port)
> >  {
> >  	int result;
> >
> > +	struct usb_serial *serial = port->serial;
> > +	struct cp210x_serial_private *spriv = usb_get_serial_data(serial);
> > +
> > +	spriv->cp210x_tstate = CP210X_STATE_IDLE;
> > +
> >  	result = cp210x_set_config_single(port, CP210X_IFC_ENABLE,
> >
> > 	UART_ENABLE);
> >  	if (result) {
> > @@ -474,6 +490,15 @@ static int cp210x_open(struct tty_struct *tty, struct
> > usb_serial_port *port)
> >  	if (tty)
> >  		cp210x_change_speed(tty, port, NULL);
> >
> > +	/* Enable events embedding to data stream */
> > +	result = cp210x_set_config_single(port, CP210X_EMBED_EVENTS,
> > +
> > 	CP210X_ESCCHAR);
> > +	if (result) {
> > +		dev_err(&port->dev, "%s - Unable to enable event
> > embedding on UART\n",
> > +				__func__);
> > +		return result;
> > +	}
> > +
> 
> This unconditionally enables the behavior every time the device is opened.
> Instead it needs to be enabled by the application explicitly, otherwise it'll
> hurt people who don't except it.
> 

I can see now that I'm wrong here. Sorry, never mind.
��.n��������+%������w��{.n�����{���)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux