lkml.org 
[lkml]   [2008]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/7] PPS: serial clients support.
On Fri, May 02, 2008 at 11:18:37AM +0100, Alan Cox wrote:
> > I see. So what do you suggest to do? Should I add an ldisc to
> > register/unregister serial PPS sources and adding function
> > tty->ldisc.dcd_change() to manage the events?
>
> I think so. To me that sounds the ideal solution.

So I should rewrite the uart_handle_dcd_change() as follow?

static inline void
uart_handle_dcd_change(struct uart_port *port, unsigned int status)
{
struct uart_info *info = port->info;
struct tty_struct *tty = info->tty;
struct tty_ldisc *ld;

ld = tty_ldisc_ref(tty);
if (ld != NULL) {
if (ld->dcd_change)
(ld->dcd_change)(tty, port, status);
tty_ldisc_deref(ld);
}

port->icount.dcd++;

#ifdef CONFIG_HARD_PPS
if ((port->flags & UPF_HARDPPS_CD) && status)
hardpps();
#endif

if (info->flags & UIF_CHECK_CD) {
if (status)
wake_up_interruptible(&info->open_wait);
else if (tty)
tty_hangup(tty);
}
}

Is that right?

Thanks a lot,

Rodolfo

--

GNU/Linux Solutions e-mail: giometti@enneenne.com
Linux Device Driver giometti@linux.it
Embedded Systems phone: +39 349 2432127
UNIX programming skype: rodolfo.giometti


\
 
 \ /
  Last update: 2008-05-02 12:49    [W:0.075 / U:9.488 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site