From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Goede Subject: Re: [linux-sunxi] [PATCH 6/8] ARM: dts: axp209: Add usb_power_supply child node to the ax209 node Date: Fri, 31 Jul 2015 10:31:30 +0200 Message-ID: <55BB3262.5000403@redhat.com> References: <1433885881-19809-1-git-send-email-hdegoede@redhat.com> <1433885881-19809-7-git-send-email-hdegoede@redhat.com> <20150731075104.48c467e6@pluto.restena.lu> <20150731083541.5f2c683a@pluto.restena.lu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20150731083541.5f2c683a-I2t2yFIzmohO7ya8xxV06g@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: =?UTF-8?Q?Bruno_Pr=c3=a9mont?= , Chen-Yu Tsai Cc: Lee Jones , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Kishon Vijay Abraham I , Felipe Balbi , Maxime Ripard , linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel , devicetree , linux-sunxi List-Id: devicetree@vger.kernel.org Hi, On 31-07-15 08:35, Bruno Pr=C3=A9mont wrote: > On Fri, 31 Jul 2015 14:14:28 +0800 Chen-Yu Tsai wrote: >> On Fri, Jul 31, 2015 at 1:51 PM, Bruno Pr=C3=A9mont wrote: >>> Hi ChenYu, >>> >>> On Fri, 31 Jul 2015 13:31:53 +0800 Chen-Yu Tsai wrote: >>>> Hi Hans, >>>> >>>> On Wed, Jun 10, 2015 at 5:37 AM, Hans de Goede wrote: >>>>> Add a node representing the usb power supply part of the axp209 p= mic, note >>>>> that the usb power supply and the (to be added later) ac power su= pply will >>>>> each have their own child-node, so that they can be separately sp= ecified >>>>> as power-supply for other nodes using a power-supply property wit= h a >>>>> phandle pointing to the right axp209 child-node. >>>>> >>>>> Signed-off-by: Hans de Goede >>>>> --- >>>>> arch/arm/boot/dts/axp209.dtsi | 5 +++++ >>>>> 1 file changed, 5 insertions(+) >>>>> >>>>> diff --git a/arch/arm/boot/dts/axp209.dtsi b/arch/arm/boot/dts/ax= p209.dtsi >>>>> index 24c935c..051ab3b 100644 >>>>> --- a/arch/arm/boot/dts/axp209.dtsi >>>>> +++ b/arch/arm/boot/dts/axp209.dtsi >>>>> @@ -89,4 +89,9 @@ >>>>> regulator-name =3D "ldo5"; >>>>> }; >>>>> }; >>>>> + >>>>> + usb_power_supply: usb_power_supply { >>>>> + compatible =3D "x-powers,axp202-usb-power-supply"= ; >>>>> + status =3D "disabled"; >>>> >>>> Is there any reason to have this disabled by default? >>>> AFAIK this is not something configurable in hardware, >>>> and the driver just gives readouts and status updates. >>> >>> There are some devices that only have 'AC-IN' instead of usb/otg po= wer >>> (set-top boxes) so having the devices tell what power sources they >>> have makes sense (otherwise those that have ac-in instead of otg wo= uld >>> have to disable usb_power_supply) and avoids confusion by explicitl= y >>> stating presence in device dts. >> >> That's true. But this is a bit of hardware inside the AXP. >> If it's power isn't routed, it should report it, shouldn't it? > > If the device does not use the input there are two cases: > - ac-in and usb/otg in short-circuited (there is a bit in AXP registe= rs > to provide this indication) > - the unused one is just not connected/connectable > > In either case the voltage of the unused/unusable branch is not reall= y > useful, nor is it useful to have it show up in sysfs. Exactly my thinking on this, +1 . >> And normal users would probably expect to read the input >> voltage/current/status through sysfs (or maybe hwmon?), >> instead of not finding the device and having to look through >> the DTS. > > Only those supplies effectively present (in-use or with connectors > to eventually use them) should be visible in sysfs. > Having more of them will just confuse the users, they would be search= ing > how they can connect the supply while there is no means to do so > except soldering to the tiny AXP pins. +1 Regards, Hans -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html