[linux,dev-4.13,v1,1/2] dt-binding: hwmon: document NPCM7xx sensors DT bindings

Message ID 1514382619-14336-2-git-send-email-tmaimon77@gmail.com
State Needs Review / ACK
Headers show
Series
  • hwmon: npcm: add NPCM7xx PWM and Fan Tacho driver
Related show

Commit Message

Tomer Maimon Dec. 27, 2017, 1:50 p.m.
Added device tree binding documentation for Nuvoton
NPCM7xx Pulse Width Modulation (PWM) and Fan
Tachometer devices.

Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
---
 .../devicetree/bindings/hwmon/npcm7xx-fan.txt          | 18 ++++++++++++++++++
 .../devicetree/bindings/hwmon/npcm7xx-pwm.txt          | 16 ++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/npcm7xx-fan.txt
 create mode 100644 Documentation/devicetree/bindings/hwmon/npcm7xx-pwm.txt

Comments

Brandon Wyman Jan. 5, 2018, 11:24 p.m. | #1
On Wed, Dec 27, 2017 at 7:50 AM, Tomer Maimon <tmaimon77@gmail.com> wrote:
> Added device tree binding documentation for Nuvoton
> NPCM7xx Pulse Width Modulation (PWM) and Fan
> Tachometer devices.
>
> Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
> ---
>  .../devicetree/bindings/hwmon/npcm7xx-fan.txt          | 18 ++++++++++++++++++
>  .../devicetree/bindings/hwmon/npcm7xx-pwm.txt          | 16 ++++++++++++++++
>  2 files changed, 34 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/npcm7xx-fan.txt
>  create mode 100644 Documentation/devicetree/bindings/hwmon/npcm7xx-pwm.txt
>
> diff --git a/Documentation/devicetree/bindings/hwmon/npcm7xx-fan.txt b/Documentation/devicetree/bindings/hwmon/npcm7xx-fan.txt
> new file mode 100644
> index 000000000000..cb456632a99f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/npcm7xx-fan.txt
> @@ -0,0 +1,18 @@
> +Nuvoton NPCM7xx fan tachometer (Fan) controller device driver
> +
> +The NPCM7xx fan tachometer controller supports upto 16 Fan inputs.
... up to ....

> +
> +Required properties:
> +- compatible      : "nuvoton,npcm750-fan" for Poleg NPCM750.
> +- reg             : Offset and length of the register set for the device.
> +- clocks          : phandle of fan reference clock.
> +- interrupts      : Contain the fan interrupts with flags for
> +                    falling edge.
> +
> +fan: fan@0 {
> +       compatible = "nuvoton,npcm750-fan";
> +       reg = <0xf0180000 0x8000>;
> +       interrupts = <0 96 4>, <0 97 4>, <0 98 4>, <0 99 4>,
> +               <0 100 4>, <0 101 4>, <0 102 4>, <0 103 4>;
> +       clocks = <&clk NPCM7XX_CLK_APB4>;
> +};
> diff --git a/Documentation/devicetree/bindings/hwmon/npcm7xx-pwm.txt b/Documentation/devicetree/bindings/hwmon/npcm7xx-pwm.txt
> new file mode 100644
> index 000000000000..8b54a59c272a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/npcm7xx-pwm.txt
> @@ -0,0 +1,16 @@
> +Nuvoton NPCM7xx Pulse-width modulation (PWM) controller device driver
> +
> +The NPCM7xx PWM controller supports upto 8 PWM outputs.
> +Each PWM output module have watchdog.
> +
> +Required properties:
> +- compatible      : "nuvoton,npcm750-pwm" for Poleg NPCM750.
> +- reg             : Offset and length of the registers set for the device.
> +- clocks          : phandle of pwm reference clock.
> +
> +pwm:pwm@f0103000 {
> +       compatible = "nuvoton,npcm750-pwm";
> +       reg = <0xf0103000 0x1000
> +                               0xf0104000 0x1000>;
> +       clocks = <&clk NPCM7XX_CLK_APB3>;
> +};
> --
> 2.14.1
>
Andrew Jeffery Jan. 11, 2018, 6:20 p.m. | #2
On Wed, 2017-12-27 at 15:50 +0200, Tomer Maimon wrote:
> Added device tree binding documentation for Nuvoton
> NPCM7xx Pulse Width Modulation (PWM) and Fan
> Tachometer devices.
> 
> Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
> ---
>  .../devicetree/bindings/hwmon/npcm7xx-fan.txt          | 18 ++++++++++++++++++
>  .../devicetree/bindings/hwmon/npcm7xx-pwm.txt          | 16 ++++++++++++++++

The bindings look okay to me, but I feel they probably should be split
into individual patches. I suggest this based on wanting to split the
drivers out, as they are more complicated and thus more susceptible to
review comments. Decoupling them from eachother means they can be
reviewed and submitted independently.

Andrew

>  2 files changed, 34 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/npcm7xx-fan.txt
>  create mode 100644 Documentation/devicetree/bindings/hwmon/npcm7xx-pwm.txt
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/npcm7xx-fan.txt b/Documentation/devicetree/bindings/hwmon/npcm7xx-fan.txt
> new file mode 100644
> index 000000000000..cb456632a99f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/npcm7xx-fan.txt
> @@ -0,0 +1,18 @@
> +Nuvoton NPCM7xx fan tachometer (Fan) controller device driver
> +
> +The NPCM7xx fan tachometer controller supports upto 16 Fan inputs.
> +
> +Required properties:
> +- compatible      : "nuvoton,npcm750-fan" for Poleg NPCM750.
> +- reg             : Offset and length of the register set for the device.
> +- clocks          : phandle of fan reference clock.
> +- interrupts      : Contain the fan interrupts with flags for
> +                    falling edge.
> +
> +fan: fan@0 {
> +	compatible = "nuvoton,npcm750-fan";
> +	reg = <0xf0180000 0x8000>;
> +	interrupts = <0 96 4>, <0 97 4>, <0 98 4>, <0 99 4>,
> +		<0 100 4>, <0 101 4>, <0 102 4>, <0 103 4>;
> +	clocks = <&clk NPCM7XX_CLK_APB4>;
> +};
> diff --git a/Documentation/devicetree/bindings/hwmon/npcm7xx-pwm.txt b/Documentation/devicetree/bindings/hwmon/npcm7xx-pwm.txt
> new file mode 100644
> index 000000000000..8b54a59c272a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/npcm7xx-pwm.txt
> @@ -0,0 +1,16 @@
> +Nuvoton NPCM7xx Pulse-width modulation (PWM) controller device driver
> +
> +The NPCM7xx PWM controller supports upto 8 PWM outputs.
> +Each PWM output module have watchdog.
> +
> +Required properties:
> +- compatible      : "nuvoton,npcm750-pwm" for Poleg NPCM750.
> +- reg             : Offset and length of the registers set for the device.
> +- clocks          : phandle of pwm reference clock.
> +
> +pwm:pwm@f0103000 {
> +	compatible = "nuvoton,npcm750-pwm";
> +	reg = <0xf0103000 0x1000
> +				0xf0104000 0x1000>;
> +	clocks = <&clk NPCM7XX_CLK_APB3>;
> +};

Patch

diff --git a/Documentation/devicetree/bindings/hwmon/npcm7xx-fan.txt b/Documentation/devicetree/bindings/hwmon/npcm7xx-fan.txt
new file mode 100644
index 000000000000..cb456632a99f
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/npcm7xx-fan.txt
@@ -0,0 +1,18 @@ 
+Nuvoton NPCM7xx fan tachometer (Fan) controller device driver
+
+The NPCM7xx fan tachometer controller supports upto 16 Fan inputs.
+
+Required properties:
+- compatible      : "nuvoton,npcm750-fan" for Poleg NPCM750.
+- reg             : Offset and length of the register set for the device.
+- clocks          : phandle of fan reference clock.
+- interrupts      : Contain the fan interrupts with flags for
+                    falling edge.
+
+fan: fan@0 {
+	compatible = "nuvoton,npcm750-fan";
+	reg = <0xf0180000 0x8000>;
+	interrupts = <0 96 4>, <0 97 4>, <0 98 4>, <0 99 4>,
+		<0 100 4>, <0 101 4>, <0 102 4>, <0 103 4>;
+	clocks = <&clk NPCM7XX_CLK_APB4>;
+};
diff --git a/Documentation/devicetree/bindings/hwmon/npcm7xx-pwm.txt b/Documentation/devicetree/bindings/hwmon/npcm7xx-pwm.txt
new file mode 100644
index 000000000000..8b54a59c272a
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/npcm7xx-pwm.txt
@@ -0,0 +1,16 @@ 
+Nuvoton NPCM7xx Pulse-width modulation (PWM) controller device driver
+
+The NPCM7xx PWM controller supports upto 8 PWM outputs.
+Each PWM output module have watchdog.
+
+Required properties:
+- compatible      : "nuvoton,npcm750-pwm" for Poleg NPCM750.
+- reg             : Offset and length of the registers set for the device.
+- clocks          : phandle of pwm reference clock.
+
+pwm:pwm@f0103000 {
+	compatible = "nuvoton,npcm750-pwm";
+	reg = <0xf0103000 0x1000
+				0xf0104000 0x1000>;
+	clocks = <&clk NPCM7XX_CLK_APB3>;
+};