linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Rodolfo Giometti <giometti@enneenne.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] LinuxPPS: Pulse per Second support for Linux
Date: Fri, 16 Feb 2007 20:51:35 +0000	[thread overview]
Message-ID: <20070216205134.GF2572@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20070216204336.GB4641@enneenne.com>

On Fri, Feb 16, 2007 at 09:43:36PM +0100, Rodolfo Giometti wrote:
> On Fri, Feb 16, 2007 at 07:12:08PM +0000, Russell King wrote:
> > 
> > Yuck.  Please.  No.  Doing it this way means you have to modify every
> > single serial driver out there which is a mamouth task.
> > 
> > >  			uart_handle_dcd_change(&up->port, status & UART_MSR_DCD);
> > 
> > Did you not look to see what's in this helper?  You'll find within here
> > the following code:
> > 
> > #ifdef CONFIG_HARD_PPS
> >         if ((port->flags & UPF_HARDPPS_CD) && status)
> >                 hardpps();
> > #endif
> > 
> > which should've been a big sign lit up in bright lights in Times Square
> > pointing you towards the right place to put your code.
> 
> Ok.
> 
> > Why not continue to leave it as a decision of the administrator - if
> > you want ports to default to having PPS support enabled, change all
> > the registration to set UPF_HARDPPS_CD.  But leave the admin with
> > the ability to disable it.
> 
> Ok.
> 
> > This means that PPS support is not available for any port which wasn't
> > autoprobed at device discovery time.  That seems quite restrictive.
> 
> How I can force probing for a specified uart port?

You can't because it doesn't go through the interfaces you're hooking
into.  Existing interfaces are "changed" to point at the UARTs using
setserial, which does its work via an ioctl.

> > Maybe it needs to be coupled with the setting/clearing of UPF_HARDPPS_CD ?
> 
> What do you think about? I should enable the PPS support only if the
> userland sets the UPF_HARDPPS_CD flag?

Not specifically only userland - if it happens to be set when the port
is registered then enable PPS support then as well.

So:

1. uart_configure_port - if UPF_HARDPPS_CD is set, register the port
   for PPS support.
2. uart_remove_one_port - if UPF_HARDPPS_CD is set, unregister the port
   for PPS support.
3. uart_set_info - if changing UPF_HARDPPS_CD, appropriately register or
   unregister the port for PPS support.

PS, linuxpps@ml.enneenne.com dropped from the cc: since it rejects my
postings.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

  reply	other threads:[~2007-02-16 20:51 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-16 18:52 [PATCH 1/1] LinuxPPS: Pulse per Second support for Linux Rodolfo Giometti
2007-02-16 19:12 ` Russell King
2007-02-16 20:43   ` Rodolfo Giometti
2007-02-16 20:51     ` Russell King [this message]
2007-02-16 21:03       ` Rodolfo Giometti
2007-02-16 19:56 ` Jan Dittmer
2007-02-16 20:57   ` Rodolfo Giometti
2007-02-16 21:19     ` Jan Dittmer
2007-02-18 22:43 ` LinuxPPS: fixes Rodolfo Giometti
2007-02-20  2:56 ` [PATCH 1/1] LinuxPPS: Pulse per Second support for Linux H. Peter Anvin
2007-02-21 12:04   ` Rodolfo Giometti
2007-02-21 16:14     ` H. Peter Anvin
2007-02-22  8:51       ` Rodolfo Giometti
2007-02-21 23:51     ` Roman Zippel
2007-02-22  9:00       ` Rodolfo Giometti
2007-02-21 10:16 ` Pavel Machek
2007-02-22  9:59   ` Rodolfo Giometti
2007-03-13 21:38 ` Rodolfo Giometti
2007-03-13 22:48   ` Lennart Sorensen
2007-03-14  9:31     ` Rodolfo Giometti
2007-03-14 13:19       ` Lennart Sorensen
2007-03-14 14:06         ` Rodolfo Giometti
2007-03-14 14:12           ` Lennart Sorensen
2007-03-14 14:27             ` Rodolfo Giometti
2007-03-14 14:42               ` Lennart Sorensen
2007-03-14 14:52                 ` Rodolfo Giometti
2007-03-14 15:37                   ` Lennart Sorensen
2007-03-14 15:47                     ` Rodolfo Giometti
2007-03-14 20:57                       ` Lennart Sorensen
2007-03-15 10:29                         ` Rodolfo Giometti
2007-03-15 15:18                           ` Lennart Sorensen
2007-03-15 15:37                             ` Rodolfo Giometti
  -- strict thread matches above, loose matches on Subject: below --
2007-03-21  7:41 Rodolfo Giometti
2007-03-21  8:05 ` Jon K Hellan
2007-03-21  8:08   ` Rodolfo Giometti
2007-03-21 15:34   ` Lennart Sorensen
2007-05-02 19:33 ` Rodolfo Giometti
2007-05-02 21:06   ` john stultz
2007-05-03 10:03     ` Rodolfo Giometti
2007-05-10  7:27   ` Andrew Morton
2007-05-10  9:48     ` Andrew Morton
2007-05-10 10:58     ` Rodolfo Giometti
2007-05-10 11:01       ` David Miller
2007-05-10 11:45         ` Rodolfo Giometti
2007-05-10 11:51           ` David Miller
2007-05-10 11:54             ` David Miller
2007-05-12  5:59     ` Rodolfo Giometti
2007-05-12  6:17       ` Andrew Morton
2007-05-12  7:08         ` Greg KH

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=20070216205134.GF2572@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=giometti@enneenne.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).