<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:526018640;
        mso-list-type:hybrid;
        mso-list-template-ids:110105590 144482344 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        color:#00B050;
        mso-style-textfill-fill-color:#00B050;
        mso-style-textfill-fill-alpha:100.0%;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Dear All,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have introduced a new file in the linux-3.10.49/drivers/leds directory for SATA LED toggling.<o:p></o:p></p>
<p class="MsoNormal">I however find that the callback registered for LED activity is not getting called.<o:p></o:p></p>
<p class="MsoNormal">Underneath is the snippet of code and the function in RED is the one that I am talking about.<o:p></o:p></p>
<p class="MsoNormal">I do see the print in the function satadev_trig_init onces the ledtrig-satadev.ko function is inmod.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">static struct led_trigger satadev_led_trigger = {<o:p></o:p></p>
<p class="MsoNormal">                .name                   = "satadev-led",<o:p></o:p></p>
<p class="MsoNormal">                .activate               = <span style="color:red">
satadev_trig_activate</span>,<o:p></o:p></p>
<p class="MsoNormal">                .deactivate         = satadev_trig_deactivate,<o:p></o:p></p>
<p class="MsoNormal">};<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">static int __init satadev_trig_init(void)<o:p></o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal">                printk("SATA_LED %s\n", __func__);<o:p></o:p></p>
<p class="MsoNormal">                return led_trigger_register(&satadev_led_trigger);<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have also made the following changes in the following files<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="color:#00B050"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span style="color:#00B050">Makefile<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in">obj-$(CONFIG_LEDS_FUSIV_SATADEV)       += ledtrig-satadev.o<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="color:#00B050"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span style="color:#00B050">Kconfig</span><o:p></o:p></p>
<p class="MsoListParagraph">config LEDS_FUSIV_SATADEV<o:p></o:p></p>
<p class="MsoListParagraph">        tristate "LED Support for FUSIV platforms"<o:p></o:p></p>
<p class="MsoListParagraph">        help<o:p></o:p></p>
<p class="MsoListParagraph">          This file enables lED toggling for SATA on Fusiv platforms<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="color:#00B050"><span style="mso-list:Ignore">3.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span style="color:#00B050">openwrt/package/kernel/linux/modules/leds.mk<o:p></o:p></span></p>
<p class="MsoListParagraph">define KernelPackage/ledtrig-satadev<o:p></o:p></p>
<p class="MsoListParagraph">  SUBMENU:=$(LEDS_MENU)<o:p></o:p></p>
<p class="MsoListParagraph">  TITLE:=Catshark SATA LED<o:p></o:p></p>
<p class="MsoListParagraph">  KCONFIG:=CONFIG_LEDS_FUSIV_SATADEV<o:p></o:p></p>
<p class="MsoListParagraph">  FILES:=$(LINUX_DIR)/drivers/leds/ledtrig-satadev.ko<o:p></o:p></p>
<p class="MsoListParagraph">  DEPENDS:=+kmod-ata-ahci<o:p></o:p></p>
<p class="MsoListParagraph">  AUTOLOAD:=$(call AutoLoad,81,satadev-led,0)<o:p></o:p></p>
<p class="MsoListParagraph">endef<o:p></o:p></p>
<p class="MsoListParagraph"><o:p> </o:p></p>
<p class="MsoListParagraph">define KernelPackage/KernelPackage/ledtrig-satadev/description<o:p></o:p></p>
<p class="MsoListParagraph">Support for Catshark SATA LED<o:p></o:p></p>
<p class="MsoListParagraph">endef<o:p></o:p></p>
<p class="MsoListParagraph"><o:p> </o:p></p>
<p class="MsoListParagraph">$(eval $(call KernelPackage,ledtrig-satadev))<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="color:#00B050"><span style="mso-list:Ignore">4.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span style="color:#00B050">.config</span><o:p></o:p></p>
<p class="MsoListParagraph">The following LED macros are enabled in the config file<o:p></o:p></p>
<p class="MsoListParagraph">CONFIG_LEDS_GPIO_REGISTER=y<o:p></o:p></p>
<p class="MsoListParagraph">CONFIG_NEW_LEDS=y<o:p></o:p></p>
<p class="MsoListParagraph">CONFIG_LEDS_CLASS=y<o:p></o:p></p>
<p class="MsoListParagraph">#<o:p></o:p></p>
<p class="MsoListParagraph"># LED drivers<o:p></o:p></p>
<p class="MsoListParagraph">#<o:p></o:p></p>
<p class="MsoListParagraph">CONFIG_LEDS_GPIO=y<o:p></o:p></p>
<p class="MsoListParagraph">#<o:p></o:p></p>
<p class="MsoListParagraph"># LED Triggers<o:p></o:p></p>
<p class="MsoListParagraph">#<o:p></o:p></p>
<p class="MsoListParagraph">CONFIG_LEDS_TRIGGERS=y<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Please let me know what else I need to do(/what I am missing) for the callback function
<span style="color:red">satadev_trig_activate </span>to get called.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Deepanjan<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>