Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    how drivers store device informaiton

    Hi all,
    I will explain my problem clearly. I have one device which acts in both mouse and joystick modes according to bits set in the status register of the device. I wanted my driver to store that device mode information i.e whether it is in joy stick or mousmode and my bus mode information and whenever my user application wants the device information it calls the corresponding ioctls and the driver has to pass the information.
    With your advice i have gone through sysfs but when i rebooted the information is lost so what i want is even if i rebooted my information want to be persistent. So explain me how can i proceed with this and also explain any tutorial about programming sysfs.

  2. #2
    Linux User fernape's Avatar
    Join Date
    Dec 2005
    If the status register is not persistent between boots so you need a userland application that runs when your system is going to reboot or is going to shutdown. This application should store the current status in a file in persisten storage.

    Then you will need an application that runs when your system boots. This application should stablish the state of the device through sysfs.

    Quote Originally Posted by raju82
    also explain any tutorial about programming sysfs
    It's painful to say but I don't know any tutorial or information source but the kernel code itself. Anyway you can see the "Procfs Guide" cause most concepts are similar. The same can be applied to debugfs.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts