Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1656380 > unrolled thread

[PATCH v3 0/2] dt-bindings: mfd: Add max7360 mfd driver and DT documentation

Started byValentin Sitdikov <valentin_sitdikov@mentor.com>
First post2017-06-02 18:30 +0200
Last post2017-06-05 11:30 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v3 0/2] dt-bindings: mfd: Add max7360 mfd driver and DT documentation Valentin Sitdikov <valentin_sitdikov@mentor.com> - 2017-06-02 18:30 +0200
    [PATCH 1/2] dt-bindings: mfd: Add DT bindings documentation for the max7360 mfd driver Valentin Sitdikov <valentin_sitdikov@mentor.com> - 2017-06-02 18:30 +0200
      Re: [PATCH 1/2] dt-bindings: mfd: Add DT bindings documentation for  the max7360 mfd driver Lee Jones <lee.jones@linaro.org> - 2017-06-05 11:30 +0200

#1656380 — [PATCH v3 0/2] dt-bindings: mfd: Add max7360 mfd driver and DT documentation

FromValentin Sitdikov <valentin_sitdikov@mentor.com>
Date2017-06-02 18:30 +0200
Subject[PATCH v3 0/2] dt-bindings: mfd: Add max7360 mfd driver and DT documentation
Message-ID<tNXCx-3wP-3@gated-at.bofh.it>
This series add initial support of mfd core driver for max7360 chip

Andrei Dranitca (1):
  mfd: max7360: Add mfd core device driver

Valentin Sitdikov (1):
  dt-bindings: mfd: Add DT bindings documentation for the max7360 mfd
    driver

---
Changes since v1:

  - Use proper node names
  - Drop unused addresses in node names
  - Fix description of interrupt-names property

Changes since v2:

  - Fix rotary-encoder node name
  - Add description of interrupts property
  - Drop unused code
  - Comment max7360 structure
  - Add comments to the code
 
 Documentation/devicetree/bindings/mfd/max7360.txt |  74 ++++++
 drivers/mfd/Kconfig                               |  16 ++
 drivers/mfd/Makefile                              |   1 +
 drivers/mfd/max7360.c                             | 302 ++++++++++++++++++++++
 include/linux/mfd/max7360.h                       |  90 +++++++
 5 files changed, 483 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/max7360.txt
 create mode 100644 drivers/mfd/max7360.c
 create mode 100644 include/linux/mfd/max7360.h

-- 
2.9.3

[toc] | [next] | [standalone]


#1656383 — [PATCH 1/2] dt-bindings: mfd: Add DT bindings documentation for the max7360 mfd driver

FromValentin Sitdikov <valentin_sitdikov@mentor.com>
Date2017-06-02 18:30 +0200
Subject[PATCH 1/2] dt-bindings: mfd: Add DT bindings documentation for the max7360 mfd driver
Message-ID<tNXCy-3wP-13@gated-at.bofh.it>
In reply to#1656380
This patch adds documentation for the max7360 bindings.
The max7360 is multifunctional device containing GPIO, keypad, PWM and rotary encoder submodules.

Signed-off-by: Andrei Dranitca <Andrei_Dranitca@mentor.com>
Signed-off-by: Valentin Sitdikov <valentin_sitdikov@mentor.com>
---
 Documentation/devicetree/bindings/mfd/max7360.txt | 74 +++++++++++++++++++++++
 1 file changed, 74 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/max7360.txt

diff --git a/Documentation/devicetree/bindings/mfd/max7360.txt b/Documentation/devicetree/bindings/mfd/max7360.txt
new file mode 100644
index 0000000..a38ca9e
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/max7360.txt
@@ -0,0 +1,74 @@
+* Maxim MAX7360 multi-function device
+
+The Maxim MAX7360 is a multifunction device which includes
+64 key switches, eight LED drivers/GPIOs, PWM intensity control,
+and rotary switch control.
+
+Required properties:
+- compatible: Should be the following: "maxim,max7360"
+- reg: Specifies the i2c slave address of the max7360 block.
+  It can be 0x38, 0x3a, 0x3c or 0x3e IIUC.
+
+Optional properties:
+- interrupt-parent: Specifies the phandle of the interrupt controller to which
+  the interrupts from MAX7360 are routed to.
+- interrupts: list of IRQ lines specifiers
+- interrupt-names: list of "inti" and "intk"
+- interrupt-controller:  Identifies the device as an interrupt controller.
+- #interrupt-cells :  Number of cells to encode an interrupt source, shall be 1.
+
+Examples:
+
+Without subnodes:
+	max7360@38 {
+		compatible = "maxim,max7360";
+		reg = <0x38>;
+		interrupt-parent = <&gpio1>;
+		interrupts = <23 IRQ_TYPE_LEVEL_LOW>, <23 IRQ_TYPE_LEVEL_LOW>;
+		interrupt-names = "inti", "intk";
+		interrupt-controller;
+		#interrupt-cells = <0x1>;
+
+	};
+
+With subnodes:
+	max7360@38 {
+		compatible = "maxim,max7360";
+		reg = <0x38>;
+		interrupt-parent = <&gpio1>;
+		interrupts = <23 IRQ_TYPE_LEVEL_LOW>, <23 IRQ_TYPE_LEVEL_LOW>;
+		interrupt-names = "inti", "intk";
+		interrupt-controller;
+		#interrupt-cells = <0x1>;
+
+		gpio {
+			compatible = "maxim,max7360-gpio";
+			gpio-controller;
+			#gpio-cells = <0x2>;
+			interrupt-controller;
+			#interrupt-cells = <0x2>;
+			interrupts = <0>;
+		};
+
+		keypad {
+			compatible = "maxim,max7360-keypad";
+			maxim,debounce_reg = /bits/ 8 <0xef>;
+			maxim,ports_reg = /bits/ 8 <0xae>;
+			linux,keymap = < MATRIX_KEY(0, 0, KEY_F5)
+					 MATRIX_KEY(1, 0, KEY_F4) >;
+			keypad,num-rows = <2>;
+			keypad,num-columns = <1>;
+			interrupts = <1>;
+		};
+
+		pwm {
+			compatible = "maxim,max7360-pwm";
+			#pwm-cells = <0x2>;
+		};
+
+		rotary-encoder {
+			compatible = "maxim,max7360-rotary";
+			interrupts = <2>;
+		};
+
+	};
-- 
2.9.3

[toc] | [prev] | [next] | [standalone]


#1657453 — Re: [PATCH 1/2] dt-bindings: mfd: Add DT bindings documentation for the max7360 mfd driver

FromLee Jones <lee.jones@linaro.org>
Date2017-06-05 11:30 +0200
SubjectRe: [PATCH 1/2] dt-bindings: mfd: Add DT bindings documentation for the max7360 mfd driver
Message-ID<tOWuK-160-15@gated-at.bofh.it>
In reply to#1656383
On Fri, 02 Jun 2017, Valentin Sitdikov wrote:

> This patch adds documentation for the max7360 bindings.
> The max7360 is multifunctional device containing GPIO, keypad, PWM and rotary encoder submodules.
> 
> Signed-off-by: Andrei Dranitca <Andrei_Dranitca@mentor.com>
> Signed-off-by: Valentin Sitdikov <valentin_sitdikov@mentor.com>
> ---
>  Documentation/devicetree/bindings/mfd/max7360.txt | 74 +++++++++++++++++++++++
>  1 file changed, 74 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mfd/max7360.txt
> 
> diff --git a/Documentation/devicetree/bindings/mfd/max7360.txt b/Documentation/devicetree/bindings/mfd/max7360.txt
> new file mode 100644
> index 0000000..a38ca9e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/max7360.txt
> @@ -0,0 +1,74 @@
> +* Maxim MAX7360 multi-function device

Multi-Function Device

> +The Maxim MAX7360 is a multifunction device which includes

Multi-Function Device

> +64 key switches, eight LED drivers/GPIOs, PWM intensity control,

s/eight/8/

> +and rotary switch control.
> +
> +Required properties:
> +- compatible: Should be the following: "maxim,max7360"
> +- reg: Specifies the i2c slave address of the max7360 block.

I2C

> +  It can be 0x38, 0x3a, 0x3c or 0x3e IIUC.
> +
> +Optional properties:
> +- interrupt-parent: Specifies the phandle of the interrupt controller to which
> +  the interrupts from MAX7360 are routed to.

Either use a full-stop, or don't, but please do not mix.

> +- interrupts: list of IRQ lines specifiers
> +- interrupt-names: list of "inti" and "intk"
> +- interrupt-controller:  Identifies the device as an interrupt controller.
> +- #interrupt-cells :  Number of cells to encode an interrupt source, shall be 1.

Tab these out.

> +Required properties:
> +- compatible:		Should be the following: "maxim,max7360"
> +- reg:			Specifies the i2c slave address of the max7360 block.
> +  				It can be 0x38, 0x3a, 0x3c or 0x3e IIUC.
> +
> +Optional properties:
> +- interrupt-parent:		Specifies the phandle of the interrupt controller to which
> +  				the interrupts from MAX7360 are routed to.
> +- interrupts: 		list of IRQ lines specifiers
> +- interrupt-names: 		list of "inti" and "intk"
> +- interrupt-controller:  	Identifies the device as an interrupt controller.
> +- #interrupt-cells : 	Number of cells to encode an interrupt source, shall be 1.

Descriptions should *all* start with an upper case character.

> +Examples:
> +
> +Without subnodes:
> +	max7360@38 {
> +		compatible = "maxim,max7360";
> +		reg = <0x38>;
> +		interrupt-parent = <&gpio1>;
> +		interrupts = <23 IRQ_TYPE_LEVEL_LOW>, <23 IRQ_TYPE_LEVEL_LOW>;
> +		interrupt-names = "inti", "intk";
> +		interrupt-controller;
> +		#interrupt-cells = <0x1>;
> +

Remove this line.

> +	};
> +
> +With subnodes:
> +	max7360@38 {
> +		compatible = "maxim,max7360";
> +		reg = <0x38>;
> +		interrupt-parent = <&gpio1>;
> +		interrupts = <23 IRQ_TYPE_LEVEL_LOW>, <23 IRQ_TYPE_LEVEL_LOW>;
> +		interrupt-names = "inti", "intk";
> +		interrupt-controller;
> +		#interrupt-cells = <0x1>;
> +
> +		gpio {
> +			compatible = "maxim,max7360-gpio";
> +			gpio-controller;
> +			#gpio-cells = <0x2>;
> +			interrupt-controller;
> +			#interrupt-cells = <0x2>;
> +			interrupts = <0>;
> +		};
> +
> +		keypad {
> +			compatible = "maxim,max7360-keypad";
> +			maxim,debounce_reg = /bits/ 8 <0xef>;
> +			maxim,ports_reg = /bits/ 8 <0xae>;
> +			linux,keymap = < MATRIX_KEY(0, 0, KEY_F5)
> +					 MATRIX_KEY(1, 0, KEY_F4) >;
> +			keypad,num-rows = <2>;
> +			keypad,num-columns = <1>;
> +			interrupts = <1>;
> +		};
> +
> +		pwm {
> +			compatible = "maxim,max7360-pwm";
> +			#pwm-cells = <0x2>;
> +		};
> +
> +		rotary-encoder {
> +			compatible = "maxim,max7360-rotary";
> +			interrupts = <2>;
> +		};
> +
> +	};

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web