diff mbox

[2/3] sunxi: A20-OLinuXino-LIME2: Add usb-power-supply

Message ID 1458932647-24268-2-git-send-email-haas@computerlinguist.org (mailing list archive)
State New, archived
Headers show

Commit Message

Michael Haas March 25, 2016, 7:04 p.m. UTC
The A20-OLinuXino-LIME2 uses the AXP209 PMIC. This patch adds the
corresponding usb-power-supply node to the DTS.
If CONFIG_AXP20X_POWER is set, this patch enables the /sys/class/power_supply/
diirectory.

Signed-off-by: Michael Haas <haas@computerlinguist.org>
---
 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 3 +++
 1 file changed, 3 insertions(+)

Comments

Iain Paton March 26, 2016, 12:48 a.m. UTC | #1
On 25/03/16 19:04, Michael Haas wrote:
> The A20-OLinuXino-LIME2 uses the AXP209 PMIC. This patch adds the
> corresponding usb-power-supply node to the DTS.
> If CONFIG_AXP20X_POWER is set, this patch enables the /sys/class/power_supply/
> diirectory.
> 
> Signed-off-by: Michael Haas <haas@computerlinguist.org>

Acked-by: Iain Paton <ipaton0@gmail.com>
Maxime Ripard April 2, 2016, 10:36 a.m. UTC | #2
Hi,

On Fri, Mar 25, 2016 at 08:04:06PM +0100, Michael Haas wrote:
> The A20-OLinuXino-LIME2 uses the AXP209 PMIC. This patch adds the
> corresponding usb-power-supply node to the DTS.
> If CONFIG_AXP20X_POWER is set, this patch enables the /sys/class/power_supply/
> diirectory.
> 
> Signed-off-by: Michael Haas <haas@computerlinguist.org>

Is there *any* reason to not use the AXP209 dtsi where it's already
defined?

Thanks,
Maxime
Michael Haas May 1, 2016, 6:46 a.m. UTC | #3
Hi Maxime,


On 04/02/2016 12:36 PM, Maxime Ripard wrote:
> Hi,
> 
> On Fri, Mar 25, 2016 at 08:04:06PM +0100, Michael Haas wrote:
>> The A20-OLinuXino-LIME2 uses the AXP209 PMIC. This patch adds the
>> corresponding usb-power-supply node to the DTS.
>> If CONFIG_AXP20X_POWER is set, this patch enables the /sys/class/power_supply/
>> diirectory.
>>
>> Signed-off-by: Michael Haas <haas@computerlinguist.org>
> 
> Is there *any* reason to not use the AXP209 dtsi where it's already
> defined?
> 

do you have any preference for this being in the AXP209 dtsi? I've been
thinking about it and it makes sense to enable the power supply nodes
for all devices using the AXP209. They will just report themselves as
offline if the PMIC indicates nothing is connected.

Best,

Michael
Maxime Ripard May 2, 2016, 11:07 a.m. UTC | #4
On Sun, May 01, 2016 at 08:46:28AM +0200, Michael Haas wrote:
> Hi Maxime,
> 
> 
> On 04/02/2016 12:36 PM, Maxime Ripard wrote:
> > Hi,
> > 
> > On Fri, Mar 25, 2016 at 08:04:06PM +0100, Michael Haas wrote:
> >> The A20-OLinuXino-LIME2 uses the AXP209 PMIC. This patch adds the
> >> corresponding usb-power-supply node to the DTS.
> >> If CONFIG_AXP20X_POWER is set, this patch enables the /sys/class/power_supply/
> >> diirectory.
> >>
> >> Signed-off-by: Michael Haas <haas@computerlinguist.org>
> > 
> > Is there *any* reason to not use the AXP209 dtsi where it's already
> > defined?
> > 
> 
> do you have any preference for this being in the AXP209 dtsi? I've been
> thinking about it and it makes sense to enable the power supply nodes
> for all devices using the AXP209. They will just report themselves as
> offline if the PMIC indicates nothing is connected.

Yes, I'd prefer that a lot :)

It avoids enabling it on all the boards.

Thanks,
Maxime
diff mbox

Patch

diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
index d5ff2e9..d370166 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
@@ -161,6 +161,9 @@ 
 				regulator-always-on;
 			};
 		};
+		usb_power_supply: usb_power_supply {
+			compatible = "x-powers,axp202-usb-power-supply";
+		};
 	};
 };