how to implement mmap for sysfs device driver

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

 



Hi all,
I want to implement a device driver with mmap operations. However, I am not using ioctl call.
My approach:
i. I have created a sysfs bin files (because it support mmap)
ii. Now, I have implemented my mmap in my driver and assign this attribute to the sysfs file I have created.
However, I am facing the problem. The mmap is being called properly, however mmap_fault my implementation is not being called as a result of which the memory is not mapped. So, when I try to access this file I get segmentation fault.
 
Can you please suggest what I should modify or is there anyother way to do it other than this ??
Thanking you in advance.
 
Thanks and Regards,
Niroj Pokhrel 
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux