<div dir="auto">I used a pr_debug and printk KERN_INFO ,before my original email , to verify they weren&#39;t being called.</div><div class="gmail_extra"><br><div class="gmail_quote">On Apr 17, 2017 1:43 PM,  &lt;<a href="mailto:valdis.kletnieks@vt.edu">valdis.kletnieks@vt.edu</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, 17 Apr 2017 01:17:08 -0700, Abhishek Bhardwaj said:<br>
&gt; I followed this link to add a sysfs file<br>
&gt; <a href="http://kroah.com/log/blog/2013/06/26/how-to-create-a-sysfs-file-correctly/" rel="noreferrer" target="_blank">http://kroah.com/log/blog/<wbr>2013/06/26/how-to-create-a-<wbr>sysfs-file-correctly/</a><br>
&gt; .<br>
&gt;<br>
&gt; I set the driver.groups field and declared the attribute and attribute<br>
&gt; groups required by the sysfs file. When I boot my kernel I see the<br>
&gt; file but my store and show handlers don&#39;t get called when I try to cat<br>
&gt; or echo to the file. Is there any step I&#39;m missing ?.<br>
<br>
The traditional way to start debugging this is to add a line at the beginning<br>
of your show and store routines:<br>
<br>
        printk(KERN_DEBUG &quot;Now in our special sysfs show routine\n&quot;);<br>
<br>
and see if it shows up in your dmesg or not.  If not, your routine<br>
is probably not being called.  If it is, the problem is in the routine.<br>
<br>
(You&#39;d be surprised how often people say their routine isn&#39;t getting called,<br>
when it in fact is, or vice versa..)<br>
</blockquote></div></div>