LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-19-2012, 07:31 AM   #1
Nive
LQ Newbie
 
Registered: Jan 2012
Posts: 1

Rep: Reputation: Disabled
Locating sysfs file path


Hi,

We are using sysfs for kernel - userspace interaction.
A sysfs file has been created for a platform device.

We need to know the path in order to open that file for writing/reading from user space.

How could that path of the file can be located for a particular platform device??

Please provide your suggestion.

Thank you.

Last edited by Nive; 01-24-2012 at 04:55 AM.
 
Old 01-19-2012, 03:31 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,633

Rep: Reputation: 140Reputation: 140
If you know path meaning, maybe your application can handle it.
/sys/devices/platform/s3c2440-i2c.0/i2c-0/0-0033/reg_write

s3c2440 -- platform name or CPU name
i2c-0 -- I2C bus #0
 
Old 01-20-2012, 10:34 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171
sysfs "files" and "directories" are created by the kernel subroutines that generate the output that you see. Physically speaking, they do not actually exist. But you can search for files and open and read files just as if they did.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Having trouble locating file. Used FIND (file) ... should be simple Hevithan Linux - Newbie 31 05-21-2011 02:43 AM
sysfs bin file lseek problem gtopmiller Linux - General 1 04-10-2007 05:35 PM
lm_sensors Can't access procfs/sysfs file humbletech99 Linux - Hardware 0 08-31-2006 07:40 AM
libbridge_private.h:36:28: sysfs/libsysfs.h: No such file or directory cellist Linux - Software 1 12-07-2004 11:10 AM
Problem locating Network script's path f00lday Linux - Networking 3 06-05-2003 05:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 10:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration