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>] [day] [month] [year] [list]
Message-ID: <c5e9118cf36735602cfd01a64076b98ab0ad3802.camel@alliedtelesis.co.nz>
Date:   Mon, 13 Jan 2020 00:08:19 +0000
From:   Chris Packham <Chris.Packham@...iedtelesis.co.nz>
To:     "linux@...ck-us.net" <linux@...ck-us.net>,
        Logan Shaw <Logan.Shaw@...iedtelesis.co.nz>,
        "jdelvare@...e.com" <jdelvare@...e.com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>
CC:     Joshua Scott <Joshua.Scott@...iedtelesis.co.nz>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH v2 2/2] hwmon: (adt7475) Added attenuator bypass support

(CC Rob and devicetree)

On Wed, 2019-12-18 at 19:53 -0800, Guenter Roeck wrote:
> On 12/18/19 7:32 PM, Logan Shaw wrote:
> > Added a new file documenting the adt7475 devicetree and added the five
> > new properties to it.
> > 
> > Signed-off-by: Logan Shaw <logan.shaw@...iedtelesis.co.nz>
> > ---
> > ---
> >   .../devicetree/bindings/hwmon/adt7475.txt     | 35 +++++++++++++++++++
> >   1 file changed, 35 insertions(+)
> >   create mode 100644 Documentation/devicetree/bindings/hwmon/adt7475.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/hwmon/adt7475.txt b/Documentation/devicetree/bindings/hwmon/adt7475.txt
> > new file mode 100644
> > index 000000000000..388dd718a246
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/hwmon/adt7475.txt

There's an effort underway to convert the device tree bindings to yaml
so it'd be better for new bindings to start off that way. It should be
relatively straight forward, there are a couple of existing examples
in  Documentation/devicetree/bindings/hwmon/ to follow.

Also there is an existing entry in
Documentation/devicetree/bindings/trivial-devices.yaml for the adt7475
and friends that should be removed as part of the patch that adds the
new binding.

> > @@ -0,0 +1,35 @@
> > +*ADT7475 hwmon sensor.
> > +
> > +Required properties:
> > +- compatible: One of
> > +	"adi,adt7473"
> > +	"adi,adt7475"
> > +	"adi,adt7476"
> > +	"adi,adt7490"
> > +
> > +- reg: I2C address
> > +
> > +optional properties:
> > +
> > +- bypass-attenuator-all: Configures bypassing all voltage input attenuators.
> > +	This is only supported on the ADT7476 and ADT7490, this property does
> > +	nothing on other chips.

I don't know that there's any point in supporting bypass-attenuator-all 
even though the adt7475 can support it configuring per VIN seems more
useful.

> 
> Both adt7473 and adt7475 do support configuring an attenuator on VCCP
> 
> > +		property present: Bit set to bypass all voltage input attenuators.
> > +		property absent: Registers left unchanged.
> > +
> > +- bypass-attenuator-inx: Configures bypassing individual voltage input
> > +	attenuators, where x is an integer from the set {0, 1, 3, 4}. This
> > +	is only supported on the ADT7476 and ADT7490, this property does nothing
> > +	on other chips.
> > +		property present: Bit set to bypass specific voltage input attenuator
> > +			for voltage input x.
> > +		property absent: Registers left unchanged.
> > +
> 
> This is interesting. It essentially means "retain configuration from ROM
> Monitor", but leaves no means to _disable_ the bypass.
> 

For our systems Linux is generally the ROM monitor, at least as far as
the hwmon devices are concerned. Overriding the HW default makes sense
for that case.

Do we want the ability to override the configuration from the ROM? It
should be easily doable by using an integer property instead of a
boolean.

> > +Example:
> > +
> > +hwmon@2e {
> > +	compatible = "adi,adt7475";
> > +	reg = <0x2e>;
> > +	bypass-attenuator-all;
> > +	bypass-attenuator-in1;
> 
> What would be the purpose of specifying both all and in1 ?
> 
> > +};
> > \ No newline at end of file
> > 
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ