All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Raju Rameshwar Uprade" <rajsingh@ncra.tifr.res.in>
To: Greg KH <gregkh@suse.de>, Oliver Neukum <oneukum@suse.de>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Regarding USB-Serial Device driver
Date: Fri, 20 Aug 2010 12:26:22 +0530	[thread overview]
Message-ID: <20100820064731.M31524@admin-gateway.ncra.tifr.res.in> (raw)
In-Reply-To: <20100820035632.GA7349@suse.de>

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)
> {
> 	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
>        //  Tried writing a for loop here to loop the RTS line enable/disable , but
that also didn't work...
>   
>                   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 
>        
> 	//  Following code is included so that We can disable the RTS line to low after data
transmission..
>          // 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...
>            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.....
> }


Thanks,
 Raju

  reply	other threads:[~2010-08-20  6:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100819055329.M29689@admin-gateway.ncra.tifr.res.in>
     [not found] ` <20100819061525.M24093@admin-gateway.ncra.tifr.res.in>
2010-08-19  7:38   ` Regarding USB-Serial Device driver Marek Vasut
2010-08-19 14:18     ` Greg KH
2010-08-20  3:42       ` Raju Rameshwar Uprade
2010-08-20  3:56         ` Greg KH
2010-08-20  6:56           ` Raju Rameshwar Uprade [this message]
2010-08-20 15:39             ` Greg KH
     [not found]               ` <AANLkTin8AiOj4CST5Dr_icnY4MugG1mhgP7=c1jgcJcA@mail.gmail.com>
2010-08-31  4:05                 ` Greg KH
2010-09-07  6:14 Regarding USB-serial device driver Raju Rameshwar Uprade
2010-09-07  6:59 ` Greg KH
     [not found]   ` <20100907114913.M69542@admin-gateway.ncra.tifr.res.in>
2010-09-08  3:41     ` Raju Rameshwar Uprade
2010-09-08  6:17       ` Greg KH
2010-09-08  8:51         ` Raju Rameshwar Uprade
  -- strict thread matches above, loose matches on Subject: below --
2010-08-19  6:28 Regarding USB-Serial Device driver Raju Rameshwar Uprade
2010-08-19 13:09 ` Oliver Neukum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100820064731.M31524@admin-gateway.ncra.tifr.res.in \
    --to=rajsingh@ncra.tifr.res.in \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.