Greg,
Sorry for including quotations in my email.
Oliver,
I see the superfluous data with usbmon also.
I have changed the pl2303_write(), according to my need.I enabled the RTS line before
the data transmission and after a delay of 5ms ,disabled the RTS lines for my MCM device
to respond.
static int pl2303_write(struct usb_serial_port *port, const unsigned char *buf,int count)
quoted text > {
> struct pl2303_private *priv = usb_get_serial_port_data(port);
> unsigned long flags;
> u8 control;
> dbg("%s - port %d, %d bytes", __func__, port->number, count);
>
> if (!count)
> return count;
>
> // Following code is included so that We can enable the RTS line to high before
data transmission
quoted text > // Tried writing a for loop here to loop the RTS line enable/disable , but
that also didn't work...
quoted text >
> spin_lock_irqsave(&priv->lock, flags);
> priv->line_control |= (CONTROL_DTR | CONTROL_RTS);
> control = priv->line_control;
> spin_unlock_irqrestore(&priv->lock, flags);
> set_control_lines(port->serial->dev, control);
>
> spin_lock_irqsave(&priv->lock, flags);
> count = pl2303_buf_put(priv->buf, buf, count);
> spin_unlock_irqrestore(&priv->lock, flags);
>
> pl2303_send(port); // If I comment this , driver
dosen't work
quoted text >
> // Following code is included so that We can disable the RTS line to low after data
transmission..
quoted text > // mdelay plays an Important role here....
> mdelay(5);
> spin_lock_irqsave(&priv->lock, flags);
> // priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS); // this doesn't work
here...
quoted text > priv->line_control = 0; // this work here.....
> control = priv->line_control;
> spin_unlock_irqrestore(&priv->lock, flags);
> set_control_lines(port->serial->dev,control);
>
> return count; // count is also very IMP b'coz it affect the device
driver's behaviour.....
quoted text > }
Thanks,
Raju
--
unsubscribe notice To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Messages in current thread:
Re: Regarding USB-Serial Device driver , Raju Rameshwar Uprade , (Thu Aug 19, 11:56 pm)