<br><br><div class="gmail_quote">On Wed, Aug 10, 2011 at 10:43 PM, Vaibhav Jain <span dir="ltr">&lt;<a href="mailto:vjoss197@gmail.com">vjoss197@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div></div><div class="h5"><br><br>
<div class="gmail_quote">On Wed, Aug 10, 2011 at 2:14 PM, Jeff Haran <span dir="ltr">&lt;<a href="mailto:jharan@bytemobile.com" target="_blank">jharan@bytemobile.com</a>&gt;</span> wrote:<br>
<blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote">
<div vlink="purple" link="blue" lang="EN-US">
<div>
<div style="border-bottom:medium none;border-left:blue 1.5pt solid;padding-bottom:0in;padding-left:4pt;padding-right:0in;border-top:medium none;border-right:medium none;padding-top:0in">
<div>
<div style="border-bottom:medium none;border-left:medium none;padding-bottom:0in;padding-left:0in;padding-right:0in;border-top:#b5c4df 1pt solid;border-right:medium none;padding-top:3pt">
<p class="MsoNormal"><b><span style="font-size:10pt">From:</span></b><span style="font-size:10pt"> <a href="mailto:kernelnewbies-bounces@kernelnewbies.org" target="_blank">kernelnewbies-bounces@kernelnewbies.org</a> [mailto:<a href="mailto:kernelnewbies-bounces@kernelnewbies.org" target="_blank">kernelnewbies-bounces@kernelnewbies.org</a>] <b>On Behalf Of </b>Vaibhav Jain<br>


<b>Sent:</b> Wednesday, August 10, 2011 12:09 PM<br><b>To:</b> <a href="mailto:kernelnewbies@kernelnewbies.org" target="_blank">kernelnewbies@kernelnewbies.org</a><br><b>Subject:</b> Need help in understanding sysfs<u></u><u></u></span></p>


</div></div>
<div>
<div></div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p></div>
<div>
<p class="MsoNormal">I need to undestand sysfs and make changes to it.<u></u><u></u></p></div>
<div>
<p class="MsoNormal">Please provide me with some good references.<u></u><u></u></p></div>
<div>
<p class="MsoNormal"> <u></u><u></u></p></div>
<div>
<p class="MsoNormal">Thanks<u></u><u></u></p></div>
<div>
<p class="MsoNormal">Vaibhav Jain<u></u><u></u></p></div></div></div>
<div>
<p class="MsoNormal"> <span style="color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d;font-size:11pt">First thing to try would be your favorite search engine. If you do a search for “lwn &lt;topic&gt;” you’ll often be taken to a LWN article that is on topic though perhaps a bit dated. For instance, a search for “lwn sysfs” takes you to here:<u></u><u></u></span></p>



<p class="MsoNormal"><span style="color:#1f497d;font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><a href="http://lwn.net/Articles/54651/" target="_blank">http://lwn.net/Articles/54651/</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Probably a good place to start. Linux is mostly good code, but the documentation that comes with the kernel sources mostly sucks, so the web is your friend in this regard.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p></div></div></div><font face="monospace"></font></div></blockquote></div>
<div><br> </div>
</div></div><div> Hi,</div>
<div> </div>
<div>Sorry for the vague question. I would clarify. There are two things I need :</div>
<div> </div>
<div>1-  I need to know how information is organized in the sysfs and  understand the concepts of kobjects , attributes etc.</div>
<div> </div>
<div>2.- I need to understand how to create a file entry in the sysfs. Particulary i need to create an entry inside the directory /sys/devices/system/cpu/ . I will be required</div>
<div>to write some driver in the future which will accept inputs from this file but I am not very clear about that right now. So I was thinking of just trying to create an entry for now.</div>
<div> </div>
<div>I tried searching the web but there are not many articles that explain the above two in detail unlike procfs for which there are a lot of articles with samples.</div>
<div>The ones I found were not very interesting to read.</div>
<div> </div>
<div>Thanks</div>
<div>Vaibhav Jain</div><font color="#888888">
<div> </div>
<div> </div>
<div> </div></font></blockquote><div>Have you used google? <br>The third link in the google is a classic paper by patrick Mochel, it pretty much covers all the basics.<br><br>There is a lot of information on sysfs in Robert love&#39;s LKD and <br>

There is an entire chapter on sysfs in LDD, which tells all the details about creating entry and other basics. <br><br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<font color="#888888">
<div> </div>
</font><br>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div><br>