Google
  Web www.spinics.net

Re: [PATCH 05/10] ldisc: new dcd_change() method for line disciplines.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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@xxxxxxxxxxxx> 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@xxxxxxxxxxxx
Linux Device Driver                          giometti@xxxxxxxx
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Site Home]     [Other Archives]     [Linux Kernel Newbies]     [Linux Kernel Testers]     [Linux SH]     [Linux Omap]     [Linux Kbuild]     [Linux Tape]     [Linux Input]     [Linux Kernel Janitors]     [Linux Doc]     [Linux Man Pages]     [Linux Standards]     [Kernel Announce]     [Memory]     [Netdev]     [Git]     [Linux PCI]     [NUMA]     [Netfilter]     [Netfilter Devel]     [SELinux]     [Bugtraq]     [Writing Drivers]     [Linux Serial]     [Linux PPP]     [Linux ISDN]     [Linux Next]     [Kernel Stable Commits]     [Kernel MM Commits]     [Linux Security Module]     [Ext4]     [Linux BTRFS]     [Linux NFS]     [Linux Cachefs]     [Reiser FS]     [Fastboot]     [Linux RT Users]     [Linux Virtualization]     [LVS Devel]     [KVM]     [KVM PPC]     [KVM ia64]     [Linux Containers]     [Util Linux NG]     [Sk Drivers]     [Wireless]     [Linux Bluetooth]     [Ethernet Bridging]     [Embedded Linux]     [Sparse]     [Linux Arch]     [Linux ACPI]     [Linux IBM ACPI]     [Linux OpenGL]     [CPU Freq]     [Linux Power Management]     [Linux DCCP]     [ALSA Devel]     [Linux USB]     [Large Format Photos]     [DVD Store]     [Tux]     [Gimp]     [Yosemite News]     [Linux PA RISC]     [MIPS Linux]     [S390 Linux]     [ARM Linux]     [ARM Kernel]     [Sparc Linux]     [Linux Security]     [Linux Sound]     [Video 4 Linux]     [Linux for the blind]     [Linux IDE]     [Linux RAID]     [Linux SCSI]     [Linux SCSI Target Infrastructure]     [Linux SMP]     [Linux AXP]     [Linux Alpha]     [Linux M68K]     [Linux ia64]     [Linux 8086]     [Linux x86_64]     [Linux Apps]     [Linux X.25]     [Linux Crypto]     [DM Crypt]     [LInux Btrace]     [Utrace Devel]     [Yosemite Photos]     [Linux Resources]     [Older Kernel Mail]

Add to Google Powered by Linux

Google PageRank Checking tool