lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 21 Sep 2017 11:26:04 -0500
From:   Rob Herring <robh@...nel.org>
To:     Serge Semin <fancer.lancer@...il.com>
Cc:     Richard Leitner <richard.leitner@...data.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Mark Rutland <mark.rutland@....com>,
        Sergey.Semin@...latforms.ru,
        Linux USB List <linux-usb@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 8/9 v2] usb: usb251xb: Add max power/current dts property support

On Wed, Sep 20, 2017 at 4:27 PM, Serge Semin <fancer.lancer@...il.com> wrote:
> On Wed, Sep 20, 2017 at 03:52:55PM -0500, Rob Herring <robh@...nel.org> wrote:
>> On Sat, Sep 16, 2017 at 01:42:19PM +0300, Serge Semin wrote:
>> > This parameters may be varied in accordance with hardware specifics.
>> > So lets add the corresponding settings to the usb251x driver dts
>> > specification.
>> >
>> > Signed-off-by: Serge Semin <fancer.lancer@...il.com>
>> > ---
>> >  Documentation/devicetree/bindings/usb/usb251xb.txt   |  6 ++++++
>> >  drivers/usb/misc/usb251xb.c                          | 20 ++++++++++++++++----
>> >  2 files changed, 22 insertions(+), 4 deletions(-)
>> >
>> > diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
>> > index 3d84626d3..dd59a32e7 100644
>> > --- a/Documentation/devicetree/bindings/usb/usb251xb.txt
>> > +++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
>> > @@ -44,6 +44,12 @@ Optional properties :
>> >     device connected.
>> >   - sp-disabled-ports : Specifies the ports which will be self-power disabled
>> >   - bp-disabled-ports : Specifies the ports which will be bus-power disabled
>> > + - sp-max-{power,current} : Indicates the power/current consumed by hub from
>> > +   an upstream port (VBUS) when operation as a self-powered hub. The value
>> > +   is given in mA in a 0 - 100 range (default is 1mA).
>> > + - bp-max-{power,current} : Indicates the power/current consumed by hub from
>> > +   an upstream port (VBUS) when operation as a bus-powered hub. The value
>> > +   is given in mA in a 0 - 510 range (default is 100mA).
>>
>> These need units as defined in property-units.txt.
>>
>
> Ok.
>
>> Why do you need power and current? Can't you calculate power?
>>
>
> These are different parameters of the device. They got different configuration
> registers and descriptions:
> max_power* - ... This value also includes the power consumption of a
> permanently attached peripheral if the hub is configured as a compound
> device, and the embedded peripheral reports 0mA in its descriptors.
> max_current* - ... This value does NOT include the power consumption of a
> permanently attached peripheral if the hub is configured as a compound
> device.

Then the names here should somehow reflect the above. Perhaps
"composite-current" and "hub-current" or something like that.

>
> Additionally as you can see, they both are measured in "mA", so it isn't
> a real physical power.

Well, I can't because there's no units.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ