2007-10-19 17:38:57

by Rodolfo Giometti

[permalink] [raw]
Subject: [RFC] LinuxPPS (pre)patch

Hello,

here my last patch of LinuxPPS.

Main differences from old versions is that now (finally) each PPS
source is a dedicated char device!

This thanks to an agreement with NTP people who suggested to me how to
interpret RFC 2783 in such a way even a dedicated char device is now
RFC complain.

Please, take a look at the code and report all suggestions and/or
needed modifications for kernel inclusion so I can provide a final
patch.

Ciao,

Rodolfo

--

GNU/Linux Solutions e-mail: [email protected]
Linux Device Driver [email protected]
Embedded Systems [email protected]
UNIX programming phone: +39 349 2432127


2007-10-19 17:51:26

by Rodolfo Giometti

[permalink] [raw]
Subject: Oops: [RFC] LinuxPPS (pre)patch

On Fri, Oct 19, 2007 at 07:41:13PM +0200, Rodolfo Giometti wrote:
> Hello,
>
> here my last patch of LinuxPPS.

Sorry... attached. :)

Ciao,

Rodolfo

--

GNU/Linux Solutions e-mail: [email protected]
Linux Device Driver [email protected]
Embedded Systems [email protected]
UNIX programming phone: +39 349 2432127


Attachments:
(No filename) (415.00 B)
ntp-pps-2.6.23.diff (58.80 kB)
Download all attachments

2007-10-21 04:07:00

by Greg KH

[permalink] [raw]
Subject: Re: Oops: [RFC] LinuxPPS (pre)patch

On Fri, Oct 19, 2007 at 07:53:24PM +0200, Rodolfo Giometti wrote:
> +/* The main struct */
> +struct pps_device {
> + struct pps_source_info info; /* PSS source info */
> +
> + struct pps_kparams params; /* PPS's current params */
> +
> + __u32 assert_sequence; /* PPS' assert event seq # */
> + __u32 clear_sequence; /* PPS' clear event seq # */
> + struct pps_ktime assert_tu;
> + struct pps_ktime clear_tu;
> + int current_mode; /* PPS mode at event time */
> +
> + int go; /* PPS event is arrived? */
> + wait_queue_head_t queue; /* PPS event queue */
> +
> + unsigned int id; /* PPS source unique ID */
> + struct cdev cdev;
> + struct device *dev;
> + int devno;
> + struct fasync_struct *async_queue; /* fasync method */
> + spinlock_t lock;
> +
> + atomic_t usage; /* usage count */
> + wait_queue_head_t usage_queue;
> +
> + struct class_device class_dev;
> +};

Please use a 'struct class' instead of a 'struct class_device'. We have
almost rid the kernel of all usages of 'struct class_device' and want to
remove that structure entirely soon. I'm aiming for 2.6.25 and it's
looking good.

So please don't add new instances of it, you can do all the same things
with a 'struct device' and it should be a very trivial change.

thanks,

greg k-h

2007-10-22 19:45:32

by Rodolfo Giometti

[permalink] [raw]
Subject: Re: Oops: [RFC] LinuxPPS (pre)patch

On Sat, Oct 20, 2007 at 09:06:41PM -0700, Greg KH wrote:
>
> Please use a 'struct class' instead of a 'struct class_device'. We have

Ok, fixed. I'll repost my patch ASAP.

Ciao,

Rodolfo

--

GNU/Linux Solutions e-mail: [email protected]
Linux Device Driver [email protected]
Embedded Systems [email protected]
UNIX programming phone: +39 349 2432127