dt-bindings: mfd: Add max7360 mfd driver and DT documentation
v2 cover dt-bindings: mfd: Add max7360 mfd driver and DT documentation
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: Add DT bindings documentation for the max7360 mfd driver
Documentation/devicetree/bindings/mfd/max7360.txt | 72 ++++ drivers/mfd/Kconfig | 16 + drivers/mfd/Makefile | 1 + drivers/mfd/max7360.c | 397 ++++++++++++++++++++++ include/linux/mfd/max7360.h | 130 +++++++ max7360.txt | 72 ++++ 6 files changed, 688 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 create mode 100644 max7360.txt
Signature · 6 lines
2.9.3 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 1/2 dt-bindings: mfd: Add DT bindings documentation for the max7360 mfd driver
This patch adds documentation for the max7360 bindings. The max7360 is multifunctional device containing gpio, keypad, pwm and rotary encoder submodules.
--- Documentation/devicetree/bindings/mfd/max7360.txt | 72 +++++++++++++++++++++++ max7360.txt | 72 +++++++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/max7360.txt create mode 100644 max7360.txt
Documentation/devicetree/bindings/mfd/max7360.txt new file +72 -0
@@ -0,0 +1,72 @@ +* 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. +- 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>; + interrupt-names = "int-shared"; + 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>; + }; + + };
max7360.txt new file +72 -0
72 lines not on this page · raw message
Signature · 1 line
2.9.3
Re: [PATCH v2 1/2] dt-bindings: mfd: Add DT bindings documentation for the max7360 mfd driver
Quoted 9 lines · Valentin Sitdikov
This patch adds documentation for the max7360 bindings. The max7360 is multifunctional device containing gpio, keypad, pwm and rotary encoder submodules.
Signed-off-by Valentin Sitdikov <[email protected]>Signed-off-by Andrei Dranitca <[email protected]>--- Documentation/devicetree/bindings/mfd/max7360.txt | 72 +++++++++++++++++++++++ max7360.txt | 72 +++++++++++++++++++++++
I think you need to re-roll this patch.
Quoted 160 lines
2 files changed, 144 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/max7360.txt create mode 100644 max7360.txtDocumentation/devicetree/bindings/mfd/max7360.txt new file +72
-0@@ -0,0 +1,72 @@ +* 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. +- 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>; + interrupt-names = "int-shared"; + 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>; + }; + + };max7360.txt new file +72
-0@@ -0,0 +1,72 @@ +* 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. +- interrupt-names: might be "int-shared" or 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>; + interrupt-names = "int-shared"; + interrupt-controller; + #interrupt-cells = <0x1>; + + }; + +With subnodes: + max7360@38 { + compatible = "maxim,max7360"; + reg = <0x38>; + interrupt-parent = <&gpio1>; + interrupts = <23 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "int-shared"; + interrupt-controller; + #interrupt-cells = <0x1>; + + max7360_gpio: max7360_gpio@0 { + compatible = "maxim,max7360-gpio"; + gpio-controller; + #gpio-cells = <0x2>; + interrupt-controller; + #interrupt-cells = <0x2>; + interrupts = <0>; + }; + + max7360_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>; + }; + + max7360_pwm: max7360_pwm { + compatible = "maxim,max7360-pwm"; + #pwm-cells = <0x2>; + }; + + max7360_rotary_encoder { + compatible = "maxim,max7360-rotary"; + interrupts = <2>; + }; + + };
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH v2 2/2 mfd: max7360: Add mfd core device driver
In reply to Valentin SitdikovFrom: Andrei Dranitca <[email protected]>
This patch adds core/irq driver to support MAX7360 i2c chip which contains keypad, gpio, pwm, gpo and rotary encoder submodules.
--- drivers/mfd/Kconfig | 16 ++ drivers/mfd/Makefile | 1 + drivers/mfd/max7360.c | 397 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/max7360.h | 130 +++++++++++++++ 4 files changed, 544 insertions(+) create mode 100644 drivers/mfd/max7360.c create mode 100644 include/linux/mfd/max7360.h
drivers/mfd/Kconfig +16 -0
@@ -721,6 +721,22 @@ config MFD_MAX8998 additional drivers must be enabled in order to use the functionality of the device. +config MFD_MAX7360 + tristate "Maxim Semiconductor MAX7360 support" + depends on I2C && OF + select MFD_CORE + select REGMAP_I2C + select IRQ_DOMAIN + help + Say yes here to add support for Maxim Semiconductor MAX7360. + This provides microprocessors with management of up to 64 key switches, + with an additional eight LED drivers/GPIOs that feature constant-current, + PWM intensity control, and rotary switch control options. + + This driver provides common support for accessing the device, + additional drivers must be enabled in order to use the functionality + of the device. + config MFD_MT6397 tristate "MediaTek MT6397 PMIC Support" select MFD_CORE
drivers/mfd/Makefile +1 -0
@@ -137,6 +137,7 @@ obj-$(CONFIG_MFD_DA9063) += da9063.o obj-$(CONFIG_MFD_DA9150) += da9150-core.o obj-$(CONFIG_MFD_MAX14577) += max14577.o +obj-$(CONFIG_MFD_MAX7360) += max7360.o obj-$(CONFIG_MFD_MAX77620) += max77620.o obj-$(CONFIG_MFD_MAX77686) += max77686.o obj-$(CONFIG_MFD_MAX77693) += max77693.o
drivers/mfd/max7360.c new file +397 -0
397 lines not on this page · raw message
include/linux/mfd/max7360.h new file +130 -0
130 lines not on this page · raw message
Signature · 1 line
2.9.3