Some kernel library function questions

Sir,

        I am trying to learn how to write a device driver for an input device. As a start I tried to understand the actual device driver code written for linux 2.6.9 kernel. It is always good to follow masters in programming . I understood some parts of the code . But I got stuck with some library functions and macros . Hope you masters can shed some light in to my doubts.  
  1. What is time_after() function ? It is used in the actual serial mouse driver for kernel 2.6.9. Below given is the line where it is used

if (time_after(jiffies, my_mouse->last + HZ/10))
my_mouse->count = 0;

I tried to get the logic behind the line but I failed to do so . I read that jiffies is a global variable that increase with every time tick starting from system log on. Can anybody help me to understand the logic behind this line.

  1. There is a mouse connect function which is called whenever we connect a serial mouse to the serial port. The function takes two arguments, a pointer to struct serio and struct serio_drv. This struct serio pointer is used throughout the connect function but we are not initializing it anywhere. So What I understand is that when we connect the serial mouse the input sub system automatically initializes this structure with the details of the mouse we connected so that the driver program can use these details to select the protocol and type of mouse. I just want a conformation from you that what I understand is right (I hope so) .

  2. in serio.h headerfile there are some macros defined. like

      \#define SERIO_TYPE      0xff000000UL
      \#define SERIO_PROTO     0xFFUL
      
         In the both definition the label UL is used which  I believe\(?\) stands for unsigned long. What my doubt is that why ff \(small letter\) and FF\(capital letter \) is used . What is the difference between these two . 
    
         Sorry if the way I asked my questine is not right. My english is not that great. Can anyone help me to understand these points. Thanking you...

Note: my responses might not be accurate:

Jiffies, as you noted, is the global clock tick in Linux. So this says, if it's now later that the last state-change of the mouse (within one-tenth of HZ), reset the mouse's "count", whatever that is. You could user > or < than or whatever here, except for the fact that sometimes, the jiffies parameter will wrap around -- it can do this on 32-bit machines if running longer than, say, a [strike]year[/strike] day. This function supposedly handles that case. See this thread: 'jiffies rollover, uptime etc.' - MARC

I don't know. Sorry.

Correct.

None. Absolutely none.

All hex digits are the numbers 0 through 9 and A through F. In C, and in most programming languages, it doesn't matter if the letter if upper or lowercase.

Thanks otheus...... You are brilliant....... Please help me little bit more.......
So you are saying ff is same and FF......so
0xFFUL is 0x000000FF
and
0xff000000 is 0xFF000000
Am I correct? thanks again...

Correct.