title: Linux Kernel - stoping a running kernel timer from user space
body: <p>I am trying to blink an LED in my embedded device while Linux is booting. Basically the LED blink shows that Linux is in the process of booting.
  To blinks the LED, I am doing the following things</p>
  
  <ol>
  <li><p>Created a global timer (LED blink timer) in init/main.c 
  static struct timer_list pwr_led_timer;</p></li>
  <li><p>Started the timer as soon as init_timers() function is finished in start_kernel()
  setup_timer and mod_timer functions used.</p></li>
  <li><p>When timer fires, in the timer handler, LED is toggled. And timer restarted.</p></li>
  <li><p>When kernel finishes the whole boot process, I am switching off the LED and deleting the timer. 
   del_timer_sync(&amp;pwr_led_timer);</p></li>
  </ol>
  
  <p>Question:
  I would like to stop the timer and switch of the LED from user space from my application instead of stopping at the kernel (that is point number 4). Is there a standard way to stop the kernel running timer from user space ?</p>
  
  <p>since pwr_led_timer is global struct, can any IOCTL call be used to stop the timer from user space ? My Idea is do some IOCTL and get access to kernel. Since the pwr_led_timer is global, in IOCTL I can call the del_timer_sync() with pwr_led_timer. But not sure which device I should open to IOCTL (?)</p>
  
  <p>Sorry, I am new to kernel/driver programming. I tried to search the net but could not get any clue.  </p>
  
  <p>Kindly let me know if anyone has any inputs. Thanks in advance.</p>
  
  <p>Regards,
  Emerson</p>