<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックPrevent kernel disabling regulator at boot</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Prevent-kernel-disabling-regulator-at-boot/m-p/870049#M132313</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Kernel:&lt;/STRONG&gt; 4.9.11&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CPU:&lt;/STRONG&gt; iMX7D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Backgound:&amp;nbsp;&lt;/STRONG&gt;I have a gpio pin controlling the enable pin for a regulator IC. In my device tree I have this declared using the [compatible = "regulator-fixed"] framework. I am also exporting this regulator to user-space (so have a consumer) using the [compatible = "reg-userspace-consumer"] framework, with its default state as enabled (regulator-boot-on). I have initialized this gpio in uBoot to enable the regulator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem:&amp;nbsp;&lt;/STRONG&gt;When the kernel boots it probes the "regulator-fixed" driver. Because, at this stage, there is no 'consumer' the kernel's default state is to disable the regulator. A little time later, the kernel probes the "reg-userspace-consumer" driver which attaches to the regulator and correctly configures its state as enabled. The result is that the my regulator IC is 'blipped off' for a very short time during boot. I could set 'regulator-always-on' in my device-tree which avoids the issue by keeping the regulator enabled, BUT, I no longer have user-space control of the enable line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question:&amp;nbsp;&lt;/STRONG&gt;How can I prevent the kernel from 'disabling' a regulator at boot, and still maintain user-space control?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Feb 2019 10:00:32 GMT</pubDate>
    <dc:creator>dh29</dc:creator>
    <dc:date>2019-02-18T10:00:32Z</dc:date>
    <item>
      <title>Prevent kernel disabling regulator at boot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Prevent-kernel-disabling-regulator-at-boot/m-p/870049#M132313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Kernel:&lt;/STRONG&gt; 4.9.11&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CPU:&lt;/STRONG&gt; iMX7D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Backgound:&amp;nbsp;&lt;/STRONG&gt;I have a gpio pin controlling the enable pin for a regulator IC. In my device tree I have this declared using the [compatible = "regulator-fixed"] framework. I am also exporting this regulator to user-space (so have a consumer) using the [compatible = "reg-userspace-consumer"] framework, with its default state as enabled (regulator-boot-on). I have initialized this gpio in uBoot to enable the regulator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem:&amp;nbsp;&lt;/STRONG&gt;When the kernel boots it probes the "regulator-fixed" driver. Because, at this stage, there is no 'consumer' the kernel's default state is to disable the regulator. A little time later, the kernel probes the "reg-userspace-consumer" driver which attaches to the regulator and correctly configures its state as enabled. The result is that the my regulator IC is 'blipped off' for a very short time during boot. I could set 'regulator-always-on' in my device-tree which avoids the issue by keeping the regulator enabled, BUT, I no longer have user-space control of the enable line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question:&amp;nbsp;&lt;/STRONG&gt;How can I prevent the kernel from 'disabling' a regulator at boot, and still maintain user-space control?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2019 10:00:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Prevent-kernel-disabling-regulator-at-boot/m-p/870049#M132313</guid>
      <dc:creator>dh29</dc:creator>
      <dc:date>2019-02-18T10:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Prevent kernel disabling regulator at boot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Prevent-kernel-disabling-regulator-at-boot/m-p/870050#M132314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A _jive_internal="true" data-content-finding="Community" data-userid="278874" data-username="dh29" href="https://community.nxp.com/people/dh29"&gt;dh29&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; See my suggestions for you, please!&lt;/P&gt;&lt;P&gt;----------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Now that you have configured this GPIO output in u-boot, don't reconfigure it in Linux again, but keep it's state in the u-boot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; According to your descriptions, it's state change will happen during loading probe function in "userspace-consumer.c", so you can find a way to avoid running "enable" in probe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;----------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try it , please!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice day!&lt;/P&gt;&lt;P&gt;NXP TIC Weidong Sun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2019 03:06:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Prevent-kernel-disabling-regulator-at-boot/m-p/870050#M132314</guid>
      <dc:creator>weidong_sun</dc:creator>
      <dc:date>2019-02-19T03:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Prevent kernel disabling regulator at boot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Prevent-kernel-disabling-regulator-at-boot/m-p/870051#M132315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/weidong.sun"&gt;weidong.sun&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My original question was to find out if I was missing something (maybe a patch) within the 'fixed-regulator' / 'regulator' framework that would direct the kernel to set-up the regulator, but not configure it during boot. This requirement seems like a common feature for a lot of h/w designs. However, It seems that this is not possible within the regulator framework.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your suggestion will provide a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, dh29&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2019 08:31:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Prevent-kernel-disabling-regulator-at-boot/m-p/870051#M132315</guid>
      <dc:creator>dh29</dc:creator>
      <dc:date>2019-02-20T08:31:47Z</dc:date>
    </item>
  </channel>
</rss>

