Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1589840 > unrolled thread
| Started by | Rick Altherr <raltherr@google.com> |
|---|---|
| First post | 2017-02-28 23:20 +0100 |
| Last post | 2017-03-07 00:20 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 1/2] Documentation: dt-bindings: Document bindings for Aspeed AST2400/AST2500 ADC Rick Altherr <raltherr@google.com> - 2017-02-28 23:20 +0100
Re: [PATCH 1/2] Documentation: dt-bindings: Document bindings for Aspeed AST2400/AST2500 ADC Joel Stanley <joel@jms.id.au> - 2017-03-01 02:10 +0100
Re: [PATCH 1/2] Documentation: dt-bindings: Document bindings for Aspeed AST2400/AST2500 ADC Rob Herring <robh@kernel.org> - 2017-03-03 10:20 +0100
Re: [PATCH 1/2] Documentation: dt-bindings: Document bindings for Aspeed AST2400/AST2500 ADC Rick Altherr <raltherr@google.com> - 2017-03-07 00:20 +0100
| From | Rick Altherr <raltherr@google.com> |
|---|---|
| Date | 2017-02-28 23:20 +0100 |
| Subject | [PATCH 1/2] Documentation: dt-bindings: Document bindings for Aspeed AST2400/AST2500 ADC |
| Message-ID | <tfXlE-1rB-19@gated-at.bofh.it> |
Signed-off-by: Rick Altherr <raltherr@google.com>
---
.../devicetree/bindings/hwmon/aspeed_adc.txt | 48 ++++++++++++++++++++++
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
+
+ The node contains child nodes for each channel that the platform uses.
+
+ Example adc node:
+ adc@1e6e9000 {
+ #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".
+ - label : string describing the monitored value
+
+ Example channel node:
+ channel@1 {
+ status = "okay";
+ label = "3V3 rail";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_adc0_default>;
+ };
--
2.11.0.483.g087da7b7c-goog
[toc] | [next] | [standalone]
| From | Joel Stanley <joel@jms.id.au> |
|---|---|
| Date | 2017-03-01 02:10 +0100 |
| Subject | Re: [PATCH 1/2] Documentation: dt-bindings: Document bindings for Aspeed AST2400/AST2500 ADC |
| Message-ID | <tg0Wd-3Nm-9@gated-at.bofh.it> |
| In reply to | #1589840 |
On Wed, Mar 1, 2017 at 6:44 AM, Rick Altherr <raltherr@google.com> wrote:
> Signed-off-by: Rick Altherr <raltherr@google.com>
Acked-by: Joel Stanley <joel@jms.id.au>
> ---
> .../devicetree/bindings/hwmon/aspeed_adc.txt | 48 ++++++++++++++++++++++
> 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
> +
> + The node contains child nodes for each channel that the platform uses.
> +
> + Example adc node:
> + adc@1e6e9000 {
> + #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".
> + - label : string describing the monitored value
> +
> + Example channel node:
> + channel@1 {
> + status = "okay";
> + label = "3V3 rail";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_adc0_default>;
> + };
> --
> 2.11.0.483.g087da7b7c-goog
>
[toc] | [prev] | [next] | [standalone]
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2017-03-03 10:20 +0100 |
| Subject | Re: [PATCH 1/2] Documentation: dt-bindings: Document bindings for Aspeed AST2400/AST2500 ADC |
| Message-ID | <tgRxw-7rN-39@gated-at.bofh.it> |
| In reply to | #1589840 |
On Tue, Feb 28, 2017 at 12:14:03PM -0800, Rick Altherr wrote:
> Signed-off-by: Rick Altherr <raltherr@google.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@1e6e9000 {
> + #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
>
[toc] | [prev] | [next] | [standalone]
| From | Rick Altherr <raltherr@google.com> |
|---|---|
| Date | 2017-03-07 00:20 +0100 |
| Subject | Re: [PATCH 1/2] Documentation: dt-bindings: Document bindings for Aspeed AST2400/AST2500 ADC |
| Message-ID | <tia53-6X7-11@gated-at.bofh.it> |
| In reply to | #1591794 |
On Thu, Mar 2, 2017 at 10:21 PM, Rob Herring <robh@kernel.org> wrote:
> On Tue, Feb 28, 2017 at 12:14:03PM -0800, Rick Altherr wrote:
>> Signed-off-by: Rick Altherr <raltherr@google.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.
>
hwmon maintainers suggested IIO as well. Looks like there is an IIO
to hwmon bridge so no concerns there. I think IIO looks like a
plausible framework for this part based on my cursory look at the IIO
docs. I'll be working on v2 as an IIO driver.
>> 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.
>
Will look.
>> +
>> + The node contains child nodes for each channel that the platform uses.
>> +
>> + Example adc node:
>> + adc@1e6e9000 {
>> + #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.
>
OK
>> + - label : string describing the monitored value
>
> You need a reg property for the channel number.
>
Missed that when I fixed the code. Will include in next revision.
>> +
>> + Example channel node:
>> + channel@1 {
>> + status = "okay";
>> + label = "3V3 rail";
>> +
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&pinctrl_adc0_default>;
>
> Need to document these.
These are described in the pinctrl bindings. I only put them in the
example as they will be commonly used together but the driver does not
use them.
>
>> + };
>> --
>> 2.11.0.483.g087da7b7c-goog
>>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web