All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodolfo Giometti <giometti@enneenne.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	David Woodhouse <dwmw2@infradead.org>,
	Dave Jones <davej@redhat.com>, Sam Ravnborg <sam@ravnborg.org>,
	Greg KH <greg@kroah.com>, Randy Dunlap <randy.dunlap@oracle.com>,
	Kay Sievers <kay.sievers@vrfy.org>
Subject: Re: [PATCH 05/10] ldisc: new dcd_change() method for line disciplines.
Date: Wed, 20 Aug 2008 01:05:23 +0200	[thread overview]
Message-ID: <20080819230523.GJ21330@tekkaman> (raw)
In-Reply-To: <20080819233857.41b756cc@lxorguk.ukuu.org.uk>

On Tue, Aug 19, 2008 at 11:38:57PM +0100, Alan Cox wrote:
> On Wed, 20 Aug 2008 00:49:31 +0200
> Rodolfo Giometti <giometti@enneenne.com> wrote:
> 
> > On Tue, Aug 19, 2008 at 10:53:22PM +0100, Alan Cox wrote:
> > > > + * void (*dcd_change)(struct uart_port *port, unsigned int status,
> > > > + * 			struct timespec *ts)
> > > > + *
> > > > + *	Tells the discipline that the DCD pin has changed its status and
> > > > + *	the relative timestamp. Pointer ts can be NULL.
> > > >   */
> > > 
> > > uart_port is a specific property of a few random types of interface, pass
> > > a tty struct up. Otherwise looks fine. Might one day expand it to a more
> > > generic change type and pass info on what changed but thats a future
> > > mystery.
> > 
> > How can I get the struct uart_port pointer starting from struct
> > tty_struct one?
> 
> A tty may not even have a uart structure. Why do you need to know the
> interrupt (if such a concept even exists for the given tty) ?

If you look at patch 9
(0009-PPS-low-level-IRQ-timestamps-recording.patch) you can see that
we add a (dirty?) trick to improve PPS precision a lot: we record all
IRQ timestamps into static array and then we return those values
instead of ones passed by dcd_change()...

Maybe I can solve the problem defining dcd_change() as follow:

   void (*dcd_change)(struct tty_struct *tty, unsigned int status,
                        void *data)

and then passing the timestamp or struct uart_port pointer?

Thanks,

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

  reply	other threads:[~2008-08-19 23:05 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-19 21:50 LinuxPPS (RESUBMIT 6): the PPS Linux implementation Rodolfo Giometti
2008-08-19 21:50 ` [PATCH 01/10] LinuxPPS core support Rodolfo Giometti
2008-08-19 21:50   ` [PATCH 02/10] PPS: userland header file for PPS API Rodolfo Giometti
2008-08-19 21:50     ` [PATCH 03/10] PPS: documentation programs and examples Rodolfo Giometti
2008-08-19 21:50       ` [PATCH 04/10] PPS: LinuxPPS clients support Rodolfo Giometti
2008-08-19 21:50         ` [PATCH 05/10] ldisc: new dcd_change() method for line disciplines Rodolfo Giometti
2008-08-19 21:50           ` [PATCH 06/10] ldisc n_tty: export all N_TTY ldisc methods Rodolfo Giometti
2008-08-19 21:50             ` [PATCH 07/10] tty: new PPS line discipline Rodolfo Giometti
2008-08-19 21:50               ` [PATCH 08/10] PPS: serial clients support Rodolfo Giometti
2008-08-19 21:50                 ` [PATCH 09/10] PPS: low level IRQ timestamps recording Rodolfo Giometti
2008-08-19 21:50                   ` [PATCH 10/10] PPS: parallel port clients support Rodolfo Giometti
2008-08-20 10:31                   ` [PATCH 09/10] PPS: low level IRQ timestamps recording Ingo Molnar
2008-08-19 21:56                 ` [PATCH 08/10] PPS: serial clients support Alan Cox
2008-08-19 21:54               ` [PATCH 07/10] tty: new PPS line discipline Alan Cox
2008-08-19 21:58             ` [PATCH 06/10] ldisc n_tty: export all N_TTY ldisc methods Alan Cox
2008-08-19 21:53           ` [PATCH 05/10] ldisc: new dcd_change() method for line disciplines Alan Cox
2008-08-19 22:49             ` Rodolfo Giometti
2008-08-19 22:38               ` Alan Cox
2008-08-19 23:05                 ` Rodolfo Giometti [this message]
2008-08-20  8:53                   ` Rodolfo Giometti
2008-08-20 10:11                     ` Alan Cox
2008-08-20 13:01                       ` Rodolfo Giometti
2008-08-20 13:48                         ` Ingo Molnar
2008-08-20 14:05                           ` Rodolfo Giometti
2008-08-19 23:22   ` [PATCH 01/10] LinuxPPS core support H. Peter Anvin
2008-08-20  9:13     ` Rodolfo Giometti
  -- strict thread matches above, loose matches on Subject: below --
2008-08-20 13:16 LinuxPPS (RESUBMIT 7): the PPS Linux implementation Rodolfo Giometti
2008-08-20 13:16 ` [PATCH 01/10] LinuxPPS core support Rodolfo Giometti
2008-08-20 13:16   ` [PATCH 02/10] PPS: userland header file for PPS API Rodolfo Giometti
2008-08-20 13:16     ` [PATCH 03/10] PPS: documentation programs and examples Rodolfo Giometti
2008-08-20 13:16       ` [PATCH 04/10] PPS: LinuxPPS clients support Rodolfo Giometti
2008-08-20 13:16         ` [PATCH 05/10] ldisc: new dcd_change() method for line disciplines Rodolfo Giometti
2008-09-10  7:52 LinuxPPS (RESUBMIT 7): the PPS Linux implementation Rodolfo Giometti
2008-09-10  7:52 ` [PATCH 01/10] LinuxPPS core support Rodolfo Giometti
2008-09-10  7:52   ` [PATCH 02/10] PPS: userland header file for PPS API Rodolfo Giometti
2008-09-10  7:52     ` [PATCH 03/10] PPS: documentation programs and examples Rodolfo Giometti
2008-09-10  7:52       ` [PATCH 04/10] PPS: LinuxPPS clients support Rodolfo Giometti
2008-09-10  7:52         ` [PATCH 05/10] ldisc: new dcd_change() method for line disciplines Rodolfo Giometti
2008-10-02  7:41 LinuxPPS (RESUBMIT 7): the PPS Linux implementation Rodolfo Giometti
2008-10-02  7:41 ` [PATCH 01/10] LinuxPPS core support Rodolfo Giometti
2008-10-02  7:41   ` [PATCH 02/10] PPS: userland header file for PPS API Rodolfo Giometti
2008-10-02  7:41     ` [PATCH 03/10] PPS: documentation programs and examples Rodolfo Giometti
2008-10-02  7:41       ` [PATCH 04/10] PPS: LinuxPPS clients support Rodolfo Giometti
2008-10-02  7:41         ` [PATCH 05/10] ldisc: new dcd_change() method for line disciplines Rodolfo Giometti
2008-10-02 15:25           ` H. Peter Anvin
2008-10-02 15:58             ` Alan Cox

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=20080819230523.GJ21330@tekkaman \
    --to=giometti@enneenne.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=davej@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=greg@kroah.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    --cc=sam@ravnborg.org \
    /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.