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:   Fri, 3 Mar 2017 00:21:31 -0600
From:   Rob Herring <robh@...nel.org>
To:     Rick Altherr <raltherr@...gle.com>
Cc:     mark.rutland@....com, devicetree@...r.kernel.org,
        jdelvare@...e.com, linux@...ck-us.net, joel@....id.au,
        linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] Documentation: dt-bindings: Document bindings for
 Aspeed AST2400/AST2500 ADC

 On Tue, Feb 28, 2017 at 12:14:03PM -0800, Rick Altherr wrote:
> Signed-off-by: Rick Altherr <raltherr@...gle.com>
> ---
>  .../devicetree/bindings/hwmon/aspeed_adc.txt       | 48 ++++++++++++++++++++++

ADCs should really be documented in one place regardless of whether 
hwmon or IIO is used. Don't need to move it now, but certainly the 
bindings need to be compatible.

>  1 file changed, 48 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/aspeed_adc.txt
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/aspeed_adc.txt b/Documentation/devicetree/bindings/hwmon/aspeed_adc.txt
> new file mode 100644
> index 000000000000..9e481668c4d3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/aspeed_adc.txt
> @@ -0,0 +1,48 @@
> +Aspeed AST2400/2500 ADC
> +
> +This device is a 10-bit converter for 16 voltage channels.  All inputs are
> +single ended.  Each channel can be individually enabled to allow for use of
> +alternate pin functions.
> +
> +1) adc node
> +
> +  Required properties:
> +  - compatible : Should be one of
> +	"aspeed,ast2400-adc"
> +	"aspeed,ast2500-adc"
> +  - reg : memory window mapping address and length
> +  - #address-cells : must be <1> corresponding to the channel child binding
> +  - #size-cells : must be <0> corresponding to the channel child binding
> +  - clocks : Input clock used to derive the sample clock. Expected to be the
> +    SoC's APB clock.
> +  - update-interval-ms : initial time between updates on a channel

This is like sampling rate? I think we have a standard ADC property for 
that.

> +
> +  The node contains child nodes for each channel that the platform uses.
> +
> +  Example adc node:
> +    adc@...e9000 {
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	compatible = "aspeed,ast2400-adc";
> +	reg = <0x1e6e9000 0xB0>;
> +	clocks = <&clk_apb>;
> +	update-interval-ms = <100>;
> +
> +	[ child node definitions... ]
> +    };
> +
> +2) channel nodes
> +
> +  Optional properties:
> +  - status: indicates the operational status of the device.
> +    Value must be either "disabled" or "okay".

Don't need to document this.

> +  - label : string describing the monitored value

You need a reg property for the channel number.

> +
> +  Example channel node:
> +  channel@1 {
> +	status = "okay";
> +	label = "3V3 rail";
> +
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_adc0_default>;

Need to document these.

> +  };
> -- 
> 2.11.0.483.g087da7b7c-goog
> 

Powered by blists - more mailing lists