All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH v6 00/11] mfd: add support for max77650 PMIC
@ 2019-03-18 17:40 Bartosz Golaszewski
  2019-03-18 17:40 ` [RESEND PATCH v6 01/11] dt-bindings: mfd: add DT bindings for max77650 Bartosz Golaszewski
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Bartosz Golaszewski @ 2019-03-18 17:40 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Linus Walleij, Dmitry Torokhov,
	Jacek Anaszewski, Pavel Machek, Lee Jones, Sebastian Reichel,
	Liam Girdwood, Greg Kroah-Hartman
  Cc: linux-kernel, linux-gpio, devicetree, linux-input, linux-leds,
	linux-pm, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

This series missed the last merge window so resending rebased on top
of v5.1-rc1 with no functional changes.

---

This series adds support for max77650 ultra low-power PMIC. It provides
the core mfd driver and a set of five sub-drivers for the regulator,
power supply, gpio, leds and input subsystems.

Patches 1-4 add the DT binding documents. Patch 5 documents mfd_add_devices().
Patches 6-10 add all drivers. Last patch adds a MAINTAINERS entry for this
device.

The regulator part is already upstream.

v1 -> v2:
=========

General:
- use C++ style comments for the SPDX license identifier and the
  copyright header
- s/MODULE_LICENSE("GPL")/MODULE_LICENSE("GPL v2")/
- lookup the virtual interrupt numbers in the MFD driver, setup
  resources for child devices and use platform_get_irq_byname()
  in sub-drivers
- picked up review tags
- use devm_request_any_context_irq() for interrupt requests

LEDs:
- changed the max77650_leds_ prefix to max77650_led_
- drop the max77650_leds structure as the only field it held was the
  regmap pointer, move said pointer to struct max77650_led
- change the driver name to "max77650-led"
- drop the last return value check and return the result of
  regmap_write() directly
- change the labeling scheme to one consistent with other LED drivers

ONKEY:
- drop the key reporting helper and call the input functions directly
  from interrupt handlers
- rename the rv local variable to error
- drop parent device asignment

Regulator:
- drop the unnecessary init_data lookup from the driver code
- drop unnecessary include

Charger:
- disable the charger on driver remove
- change the power supply type to POWER_SUPPLY_TYPE_USB

GPIO:
- drop interrupt support until we have correct implementation of hierarchical
  irqs in gpiolib

v2 -> v3:
=========

General:
- dropped regulator patches as they're already in Mark Brown's branch

LED:
- fix the compatible string in the DT binding example
- use the max_brightness property
- use a common prefix ("MAX77650_LED") for all defines in the driver

MFD:
- add the MODULE_DEVICE_TABLE()
- add a sentinel to the of_device_id array
- constify the pointers to irq names
- use an enum instead of defines for interrupt indexes

v3 -> v4:
=========

GPIO:
- as discussed with Linus Walleij: the gpio-controller is now part of
  the core mfd module (we don't spawn a sub-node anymore), the binding
  document for GPIO has been dropped, the GPIO properties have been
  defined in the binding document for the mfd core, the interrupt
  functionality has been reintroduced with the irq directly passed from
  the mfd part
- due to the above changes the Reviewed-by tag from Linus was dropped

v4 -> v5:
=========

General:
- add a patch documenting mfd_add_devices()

MFD:
- pass the regmap irq_chip irq domain to mfd over mfd_add_devices so that
  the hw interrupts from resources can be correctly mapped to virtual irqs
- remove the enum listing cell indexes
- extend Kconfig help
- add a link to the programming manual
- use REGMAP_IRQ_REG() for regmap interrupts (except for GPI which has
  is composed of two hw interrupts for rising and falling edge)
- add error messages in probe
- use PLATFORM_DEVID_NONE constant in devm_mfd_add_devices()
- set irq_base to 0 in regmap_add_irq_chip() as other users to, it's only
  relevant if it's > 0

Charger:
- use non-maxim specific property names for minimum input voltage and current
  limit
- code shrink by using the enable/disable charger helpers everywhere
- use more descriptive names for constants

Onkey:
- use EV_SW event type for slide mode

LED:
- remove stray " from Kconfig help

v5 -> v6:
=========

MFD:
- remove stray spaces in the binding document
- rename the example dt node
- remove unnecessary interrupt-parent property from the bindings

LED:
- add a missing dependency on LEDS_CLASS to Kconfig

Onkey:
- use boolean for the slide button property

Charger:
- fix the property names in DT example
- make constants even more readable

Bartosz Golaszewski (11):
  dt-bindings: mfd: add DT bindings for max77650
  dt-bindings: power: supply: add DT bindings for max77650
  dt-bindings: leds: add DT bindings for max77650
  dt-bindings: input: add DT bindings for max77650
  mfd: core: document mfd_add_devices()
  mfd: max77650: new core mfd driver
  power: supply: max77650: add support for battery charger
  gpio: max77650: add GPIO support
  leds: max77650: add LEDs support
  input: max77650: add onkey support
  MAINTAINERS: add an entry for max77650 mfd driver

 .../bindings/input/max77650-onkey.txt         |  26 ++
 .../bindings/leds/leds-max77650.txt           |  57 +++
 .../devicetree/bindings/mfd/max77650.txt      |  46 +++
 .../power/supply/max77650-charger.txt         |  27 ++
 MAINTAINERS                                   |  14 +
 drivers/gpio/Kconfig                          |   7 +
 drivers/gpio/Makefile                         |   1 +
 drivers/gpio/gpio-max77650.c                  | 190 +++++++++
 drivers/input/misc/Kconfig                    |   9 +
 drivers/input/misc/Makefile                   |   1 +
 drivers/input/misc/max77650-onkey.c           | 121 ++++++
 drivers/leds/Kconfig                          |   6 +
 drivers/leds/Makefile                         |   1 +
 drivers/leds/leds-max77650.c                  | 147 +++++++
 drivers/mfd/Kconfig                           |  14 +
 drivers/mfd/Makefile                          |   1 +
 drivers/mfd/max77650.c                        | 234 +++++++++++
 drivers/mfd/mfd-core.c                        |  14 +
 drivers/power/supply/Kconfig                  |   7 +
 drivers/power/supply/Makefile                 |   1 +
 drivers/power/supply/max77650-charger.c       | 366 ++++++++++++++++++
 include/linux/mfd/max77650.h                  |  59 +++
 22 files changed, 1349 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/max77650-onkey.txt
 create mode 100644 Documentation/devicetree/bindings/leds/leds-max77650.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/max77650.txt
 create mode 100644 Documentation/devicetree/bindings/power/supply/max77650-charger.txt
 create mode 100644 drivers/gpio/gpio-max77650.c
 create mode 100644 drivers/input/misc/max77650-onkey.c
 create mode 100644 drivers/leds/leds-max77650.c
 create mode 100644 drivers/mfd/max77650.c
 create mode 100644 drivers/power/supply/max77650-charger.c
 create mode 100644 include/linux/mfd/max77650.h

-- 
2.20.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [RESEND PATCH v6 01/11] dt-bindings: mfd: add DT bindings for max77650
  2019-03-18 17:40 [RESEND PATCH v6 00/11] mfd: add support for max77650 PMIC Bartosz Golaszewski
@ 2019-03-18 17:40 ` Bartosz Golaszewski
  2019-03-22  8:57   ` Pavel Machek
  2019-03-18 17:40 ` [RESEND PATCH v6 02/11] dt-bindings: power: supply: " Bartosz Golaszewski
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Bartosz Golaszewski @ 2019-03-18 17:40 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Linus Walleij, Dmitry Torokhov,
	Jacek Anaszewski, Pavel Machek, Lee Jones, Sebastian Reichel,
	Liam Girdwood, Greg Kroah-Hartman
  Cc: linux-kernel, linux-gpio, devicetree, linux-input, linux-leds,
	linux-pm, Bartosz Golaszewski, Rob Herring

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Add a DT binding document for max77650 ultra-low power PMIC. This
describes the core mfd device and the GPIO module.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
 .../devicetree/bindings/mfd/max77650.txt      | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/max77650.txt

diff --git a/Documentation/devicetree/bindings/mfd/max77650.txt b/Documentation/devicetree/bindings/mfd/max77650.txt
new file mode 100644
index 000000000000..b529d8d19335
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/max77650.txt
@@ -0,0 +1,46 @@
+MAX77650 ultra low-power PMIC from Maxim Integrated.
+
+Required properties:
+-------------------
+- compatible:		Must be "maxim,max77650"
+- reg:			I2C device address.
+- interrupts:		The interrupt on the parent the controller is
+			connected to.
+- interrupt-controller: Marks the device node as an interrupt controller.
+- #interrupt-cells:	Must be <2>.
+
+- gpio-controller:	Marks the device node as a gpio controller.
+- #gpio-cells:		Must be <2>. The first cell is the pin number and
+			the second cell is used to specify the gpio active
+			state.
+
+Optional properties:
+--------------------
+gpio-line-names:	Single string containing the name of the GPIO line.
+
+The GPIO-controller module is represented as part of the top-level PMIC
+node. The device exposes a single GPIO line.
+
+For device-tree bindings of other sub-modules (regulator, power supply,
+LEDs and onkey) refer to the binding documents under the respective
+sub-system directories.
+
+For more details on GPIO bindings, please refer to the generic GPIO DT
+binding document <devicetree/bindings/gpio/gpio.txt>.
+
+Example:
+--------
+
+	pmic@48 {
+		compatible = "maxim,max77650";
+		reg = <0x48>;
+
+		interrupt-controller;
+		interrupt-parent = <&gpio2>;
+		#interrupt-cells = <2>;
+		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
+
+		gpio-controller;
+		#gpio-cells = <2>;
+		gpio-line-names = "max77650-charger";
+	};
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [RESEND PATCH v6 02/11] dt-bindings: power: supply: add DT bindings for max77650
  2019-03-18 17:40 [RESEND PATCH v6 00/11] mfd: add support for max77650 PMIC Bartosz Golaszewski
  2019-03-18 17:40 ` [RESEND PATCH v6 01/11] dt-bindings: mfd: add DT bindings for max77650 Bartosz Golaszewski
@ 2019-03-18 17:40 ` Bartosz Golaszewski
  2019-03-22  9:00   ` Pavel Machek
  2019-03-18 17:40 ` [RESEND PATCH v6 03/11] dt-bindings: leds: " Bartosz Golaszewski
  2019-03-18 17:44 ` [RESEND PATCH v6 00/11] mfd: add support for max77650 PMIC Bartosz Golaszewski
  3 siblings, 1 reply; 11+ messages in thread
From: Bartosz Golaszewski @ 2019-03-18 17:40 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Linus Walleij, Dmitry Torokhov,
	Jacek Anaszewski, Pavel Machek, Lee Jones, Sebastian Reichel,
	Liam Girdwood, Greg Kroah-Hartman
  Cc: linux-kernel, linux-gpio, devicetree, linux-input, linux-leds,
	linux-pm, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Add the DT binding document for the battery charger module of max77650.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 .../power/supply/max77650-charger.txt         | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/supply/max77650-charger.txt

diff --git a/Documentation/devicetree/bindings/power/supply/max77650-charger.txt b/Documentation/devicetree/bindings/power/supply/max77650-charger.txt
new file mode 100644
index 000000000000..d25c95369616
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/max77650-charger.txt
@@ -0,0 +1,27 @@
+Battery charger driver for MAX77650 PMIC from Maxim Integrated.
+
+This module is part of the MAX77650 MFD device. For more details
+see Documentation/devicetree/bindings/mfd/max77650.txt.
+
+The charger is represented as a sub-node of the PMIC node on the device tree.
+
+Required properties:
+--------------------
+- compatible:		Must be "maxim,max77650-charger"
+
+Optional properties:
+--------------------
+- min-microvolt:	Minimum CHGIN regulation voltage (in microvolts). Must be
+			one of: 4000000, 4100000, 4200000, 4300000, 4400000,
+			4500000, 4600000, 4700000.
+- curr-lim-microamp:	CHGIN input current limit (in microamps). Must be one of:
+			95000, 190000, 285000, 380000, 475000.
+
+Example:
+--------
+
+	charger {
+		compatible = "maxim,max77650-charger";
+		min-microvolt = <4200000>;
+		curr-lim-microamp = <285000>;
+	};
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [RESEND PATCH v6 03/11] dt-bindings: leds: add DT bindings for max77650
  2019-03-18 17:40 [RESEND PATCH v6 00/11] mfd: add support for max77650 PMIC Bartosz Golaszewski
  2019-03-18 17:40 ` [RESEND PATCH v6 01/11] dt-bindings: mfd: add DT bindings for max77650 Bartosz Golaszewski
  2019-03-18 17:40 ` [RESEND PATCH v6 02/11] dt-bindings: power: supply: " Bartosz Golaszewski
@ 2019-03-18 17:40 ` Bartosz Golaszewski
  2019-03-22  9:02   ` Pavel Machek
  2019-03-18 17:44 ` [RESEND PATCH v6 00/11] mfd: add support for max77650 PMIC Bartosz Golaszewski
  3 siblings, 1 reply; 11+ messages in thread
From: Bartosz Golaszewski @ 2019-03-18 17:40 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Linus Walleij, Dmitry Torokhov,
	Jacek Anaszewski, Pavel Machek, Lee Jones, Sebastian Reichel,
	Liam Girdwood, Greg Kroah-Hartman
  Cc: linux-kernel, linux-gpio, devicetree, linux-input, linux-leds,
	linux-pm, Bartosz Golaszewski, Rob Herring

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Add the DT binding document for the LEDs module of max77650.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
 .../bindings/leds/leds-max77650.txt           | 57 +++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/leds-max77650.txt

diff --git a/Documentation/devicetree/bindings/leds/leds-max77650.txt b/Documentation/devicetree/bindings/leds/leds-max77650.txt
new file mode 100644
index 000000000000..3a67115cc1da
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-max77650.txt
@@ -0,0 +1,57 @@
+LED driver for MAX77650 PMIC from Maxim Integrated.
+
+This module is part of the MAX77650 MFD device. For more details
+see Documentation/devicetree/bindings/mfd/max77650.txt.
+
+The LED controller is represented as a sub-node of the PMIC node on
+the device tree.
+
+This device has three current sinks.
+
+Required properties:
+--------------------
+- compatible:		Must be "maxim,max77650-led"
+- #address-cells:	Must be <1>.
+- #size-cells:		Must be <0>.
+
+Each LED is represented as a sub-node of the LED-controller node. Up to
+three sub-nodes can be defined.
+
+Required properties of the sub-node:
+------------------------------------
+
+- reg:			Must be <0>, <1> or <2>.
+
+Optional properties of the sub-node:
+------------------------------------
+
+- label:		See Documentation/devicetree/bindings/leds/common.txt
+- linux,default-trigger: See Documentation/devicetree/bindings/leds/common.txt
+
+For more details, please refer to the generic GPIO DT binding document
+<devicetree/bindings/gpio/gpio.txt>.
+
+Example:
+--------
+
+	leds {
+		compatible = "maxim,max77650-led";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		led@0 {
+			reg = <0>;
+			label = "blue:usr0";
+		};
+
+		led@1 {
+			reg = <1>;
+			label = "red:usr1";
+			linux,default-trigger = "heartbeat";
+		};
+
+		led@2 {
+			reg = <2>;
+			label = "green:usr2";
+		};
+	};
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [RESEND PATCH v6 00/11] mfd: add support for max77650 PMIC
  2019-03-18 17:40 [RESEND PATCH v6 00/11] mfd: add support for max77650 PMIC Bartosz Golaszewski
                   ` (2 preceding siblings ...)
  2019-03-18 17:40 ` [RESEND PATCH v6 03/11] dt-bindings: leds: " Bartosz Golaszewski
@ 2019-03-18 17:44 ` Bartosz Golaszewski
  3 siblings, 0 replies; 11+ messages in thread
From: Bartosz Golaszewski @ 2019-03-18 17:44 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Linus Walleij, Dmitry Torokhov,
	Jacek Anaszewski, Pavel Machek, Lee Jones, Sebastian Reichel,
	Liam Girdwood, Greg Kroah-Hartman
  Cc: Linux Kernel Mailing List, open list:GPIO SUBSYSTEM, devicetree,
	Linux Input, Linux LED Subsystem, Linux PM list,
	Bartosz Golaszewski

pon., 18 mar 2019 o 18:40 Bartosz Golaszewski <brgl@bgdev.pl> napisał(a):
>
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>
> This series missed the last merge window so resending rebased on top
> of v5.1-rc1 with no functional changes.
>
> ---
>
> This series adds support for max77650 ultra low-power PMIC. It provides
> the core mfd driver and a set of five sub-drivers for the regulator,
> power supply, gpio, leds and input subsystems.
>
> Patches 1-4 add the DT binding documents. Patch 5 documents mfd_add_devices().
> Patches 6-10 add all drivers. Last patch adds a MAINTAINERS entry for this
> device.
>
> The regulator part is already upstream.
>
> v1 -> v2:
> =========
>
> General:
> - use C++ style comments for the SPDX license identifier and the
>   copyright header
> - s/MODULE_LICENSE("GPL")/MODULE_LICENSE("GPL v2")/
> - lookup the virtual interrupt numbers in the MFD driver, setup
>   resources for child devices and use platform_get_irq_byname()
>   in sub-drivers
> - picked up review tags
> - use devm_request_any_context_irq() for interrupt requests
>
> LEDs:
> - changed the max77650_leds_ prefix to max77650_led_
> - drop the max77650_leds structure as the only field it held was the
>   regmap pointer, move said pointer to struct max77650_led
> - change the driver name to "max77650-led"
> - drop the last return value check and return the result of
>   regmap_write() directly
> - change the labeling scheme to one consistent with other LED drivers
>
> ONKEY:
> - drop the key reporting helper and call the input functions directly
>   from interrupt handlers
> - rename the rv local variable to error
> - drop parent device asignment
>
> Regulator:
> - drop the unnecessary init_data lookup from the driver code
> - drop unnecessary include
>
> Charger:
> - disable the charger on driver remove
> - change the power supply type to POWER_SUPPLY_TYPE_USB
>
> GPIO:
> - drop interrupt support until we have correct implementation of hierarchical
>   irqs in gpiolib
>
> v2 -> v3:
> =========
>
> General:
> - dropped regulator patches as they're already in Mark Brown's branch
>
> LED:
> - fix the compatible string in the DT binding example
> - use the max_brightness property
> - use a common prefix ("MAX77650_LED") for all defines in the driver
>
> MFD:
> - add the MODULE_DEVICE_TABLE()
> - add a sentinel to the of_device_id array
> - constify the pointers to irq names
> - use an enum instead of defines for interrupt indexes
>
> v3 -> v4:
> =========
>
> GPIO:
> - as discussed with Linus Walleij: the gpio-controller is now part of
>   the core mfd module (we don't spawn a sub-node anymore), the binding
>   document for GPIO has been dropped, the GPIO properties have been
>   defined in the binding document for the mfd core, the interrupt
>   functionality has been reintroduced with the irq directly passed from
>   the mfd part
> - due to the above changes the Reviewed-by tag from Linus was dropped
>
> v4 -> v5:
> =========
>
> General:
> - add a patch documenting mfd_add_devices()
>
> MFD:
> - pass the regmap irq_chip irq domain to mfd over mfd_add_devices so that
>   the hw interrupts from resources can be correctly mapped to virtual irqs
> - remove the enum listing cell indexes
> - extend Kconfig help
> - add a link to the programming manual
> - use REGMAP_IRQ_REG() for regmap interrupts (except for GPI which has
>   is composed of two hw interrupts for rising and falling edge)
> - add error messages in probe
> - use PLATFORM_DEVID_NONE constant in devm_mfd_add_devices()
> - set irq_base to 0 in regmap_add_irq_chip() as other users to, it's only
>   relevant if it's > 0
>
> Charger:
> - use non-maxim specific property names for minimum input voltage and current
>   limit
> - code shrink by using the enable/disable charger helpers everywhere
> - use more descriptive names for constants
>
> Onkey:
> - use EV_SW event type for slide mode
>
> LED:
> - remove stray " from Kconfig help
>
> v5 -> v6:
> =========
>
> MFD:
> - remove stray spaces in the binding document
> - rename the example dt node
> - remove unnecessary interrupt-parent property from the bindings
>
> LED:
> - add a missing dependency on LEDS_CLASS to Kconfig
>
> Onkey:
> - use boolean for the slide button property
>
> Charger:
> - fix the property names in DT example
> - make constants even more readable
>
> Bartosz Golaszewski (11):
>   dt-bindings: mfd: add DT bindings for max77650
>   dt-bindings: power: supply: add DT bindings for max77650
>   dt-bindings: leds: add DT bindings for max77650
>   dt-bindings: input: add DT bindings for max77650
>   mfd: core: document mfd_add_devices()
>   mfd: max77650: new core mfd driver
>   power: supply: max77650: add support for battery charger
>   gpio: max77650: add GPIO support
>   leds: max77650: add LEDs support
>   input: max77650: add onkey support
>   MAINTAINERS: add an entry for max77650 mfd driver
>
>  .../bindings/input/max77650-onkey.txt         |  26 ++
>  .../bindings/leds/leds-max77650.txt           |  57 +++
>  .../devicetree/bindings/mfd/max77650.txt      |  46 +++
>  .../power/supply/max77650-charger.txt         |  27 ++
>  MAINTAINERS                                   |  14 +
>  drivers/gpio/Kconfig                          |   7 +
>  drivers/gpio/Makefile                         |   1 +
>  drivers/gpio/gpio-max77650.c                  | 190 +++++++++
>  drivers/input/misc/Kconfig                    |   9 +
>  drivers/input/misc/Makefile                   |   1 +
>  drivers/input/misc/max77650-onkey.c           | 121 ++++++
>  drivers/leds/Kconfig                          |   6 +
>  drivers/leds/Makefile                         |   1 +
>  drivers/leds/leds-max77650.c                  | 147 +++++++
>  drivers/mfd/Kconfig                           |  14 +
>  drivers/mfd/Makefile                          |   1 +
>  drivers/mfd/max77650.c                        | 234 +++++++++++
>  drivers/mfd/mfd-core.c                        |  14 +
>  drivers/power/supply/Kconfig                  |   7 +
>  drivers/power/supply/Makefile                 |   1 +
>  drivers/power/supply/max77650-charger.c       | 366 ++++++++++++++++++
>  include/linux/mfd/max77650.h                  |  59 +++
>  22 files changed, 1349 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/input/max77650-onkey.txt
>  create mode 100644 Documentation/devicetree/bindings/leds/leds-max77650.txt
>  create mode 100644 Documentation/devicetree/bindings/mfd/max77650.txt
>  create mode 100644 Documentation/devicetree/bindings/power/supply/max77650-charger.txt
>  create mode 100644 drivers/gpio/gpio-max77650.c
>  create mode 100644 drivers/input/misc/max77650-onkey.c
>  create mode 100644 drivers/leds/leds-max77650.c
>  create mode 100644 drivers/mfd/max77650.c
>  create mode 100644 drivers/power/supply/max77650-charger.c
>  create mode 100644 include/linux/mfd/max77650.h
>
> --
> 2.20.1
>

Sorry for spamming - I got a strange error from git send-email:

Died at /<snip!>libexec/git-core/git-send-email line 1542.

Bart

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RESEND PATCH v6 01/11] dt-bindings: mfd: add DT bindings for max77650
  2019-03-18 17:40 ` [RESEND PATCH v6 01/11] dt-bindings: mfd: add DT bindings for max77650 Bartosz Golaszewski
@ 2019-03-22  8:57   ` Pavel Machek
  0 siblings, 0 replies; 11+ messages in thread
From: Pavel Machek @ 2019-03-22  8:57 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Rob Herring, Mark Rutland, Linus Walleij, Dmitry Torokhov,
	Jacek Anaszewski, Lee Jones, Sebastian Reichel, Liam Girdwood,
	Greg Kroah-Hartman, linux-kernel, linux-gpio, devicetree,
	linux-input, linux-leds, linux-pm, Bartosz Golaszewski,
	Rob Herring

[-- Attachment #1: Type: text/plain, Size: 538 bytes --]

On Mon 2019-03-18 18:40:30, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> Add a DT binding document for max77650 ultra-low power PMIC. This
> describes the core mfd device and the GPIO module.
> 
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> Reviewed-by: Rob Herring <robh@kernel.org>

Acked-by: Pavel Machek <pavel@ucw.cz>

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RESEND PATCH v6 02/11] dt-bindings: power: supply: add DT bindings for max77650
  2019-03-18 17:40 ` [RESEND PATCH v6 02/11] dt-bindings: power: supply: " Bartosz Golaszewski
@ 2019-03-22  9:00   ` Pavel Machek
  2019-03-26 17:34     ` Bartosz Golaszewski
  0 siblings, 1 reply; 11+ messages in thread
From: Pavel Machek @ 2019-03-22  9:00 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Rob Herring, Mark Rutland, Linus Walleij, Dmitry Torokhov,
	Jacek Anaszewski, Lee Jones, Sebastian Reichel, Liam Girdwood,
	Greg Kroah-Hartman, linux-kernel, linux-gpio, devicetree,
	linux-input, linux-leds, linux-pm, Bartosz Golaszewski

[-- Attachment #1: Type: text/plain, Size: 1893 bytes --]

On Mon 2019-03-18 18:40:31, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> Add the DT binding document for the battery charger module of max77650.
> 
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
>  .../power/supply/max77650-charger.txt         | 27 +++++++++++++++++++
>  1 file changed, 27 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/power/supply/max77650-charger.txt
> 
> diff --git a/Documentation/devicetree/bindings/power/supply/max77650-charger.txt b/Documentation/devicetree/bindings/power/supply/max77650-charger.txt
> new file mode 100644
> index 000000000000..d25c95369616
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/supply/max77650-charger.txt
> @@ -0,0 +1,27 @@
> +Battery charger driver for MAX77650 PMIC from Maxim Integrated.
> +
> +This module is part of the MAX77650 MFD device. For more details
> +see Documentation/devicetree/bindings/mfd/max77650.txt.
> +
> +The charger is represented as a sub-node of the PMIC node on the device tree.
> +
> +Required properties:
> +--------------------
> +- compatible:		Must be "maxim,max77650-charger"
> +
> +Optional properties:
> +--------------------
> +- min-microvolt:	Minimum CHGIN regulation voltage (in microvolts). Must be
> +			one of: 4000000, 4100000, 4200000, 4300000, 4400000,
> +			4500000, 4600000, 4700000.

Probably needs "max," prefix. And .. what does this mean? Will charger
shutdown if input is less than this?

> +- curr-lim-microamp:	CHGIN input current limit (in microamps). Must be one of:
> +			95000, 190000, 285000, 380000, 475000.

"current-limit-microamp", I guess. And probably "max,current-limit-microamp".

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RESEND PATCH v6 03/11] dt-bindings: leds: add DT bindings for max77650
  2019-03-18 17:40 ` [RESEND PATCH v6 03/11] dt-bindings: leds: " Bartosz Golaszewski
@ 2019-03-22  9:02   ` Pavel Machek
  2019-03-22  9:54     ` Bartosz Golaszewski
  0 siblings, 1 reply; 11+ messages in thread
From: Pavel Machek @ 2019-03-22  9:02 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Rob Herring, Mark Rutland, Linus Walleij, Dmitry Torokhov,
	Jacek Anaszewski, Lee Jones, Sebastian Reichel, Liam Girdwood,
	Greg Kroah-Hartman, linux-kernel, linux-gpio, devicetree,
	linux-input, linux-leds, linux-pm, Bartosz Golaszewski,
	Rob Herring

[-- Attachment #1: Type: text/plain, Size: 651 bytes --]

On Mon 2019-03-18 18:40:32, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> Add the DT binding document for the LEDs module of max77650.
> 
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> Reviewed-by: Rob Herring <robh@kernel.org>

Acked-by: Pavel Machek <pavel@ucw.cz>

> +		led@0 {
> +			reg = <0>;
> +			label = "blue:usr0";
> +		};

I'd rather not see these "usrX" things... Does it have some kind of
real function?
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RESEND PATCH v6 03/11] dt-bindings: leds: add DT bindings for max77650
  2019-03-22  9:02   ` Pavel Machek
@ 2019-03-22  9:54     ` Bartosz Golaszewski
  0 siblings, 0 replies; 11+ messages in thread
From: Bartosz Golaszewski @ 2019-03-22  9:54 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Rob Herring, Mark Rutland, Linus Walleij, Dmitry Torokhov,
	Jacek Anaszewski, Lee Jones, Sebastian Reichel, Liam Girdwood,
	Greg Kroah-Hartman, Linux Kernel Mailing List,
	open list:GPIO SUBSYSTEM, devicetree, Linux Input,
	Linux LED Subsystem, Linux PM list, Bartosz Golaszewski,
	Rob Herring

pt., 22 mar 2019 o 10:02 Pavel Machek <pavel@ucw.cz> napisał(a):
>
> On Mon 2019-03-18 18:40:32, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> >
> > Add the DT binding document for the LEDs module of max77650.
> >
> > Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > Reviewed-by: Rob Herring <robh@kernel.org>
>
> Acked-by: Pavel Machek <pavel@ucw.cz>
>
> > +             led@0 {
> > +                     reg = <0>;
> > +                     label = "blue:usr0";
> > +             };
>
> I'd rather not see these "usrX" things... Does it have some kind of
> real function?

Not really. In the design we're using it for, it's unused and on the
development kit from MAXIM it's simple three colored leds.

Bart

>                                                                         Pavel
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RESEND PATCH v6 02/11] dt-bindings: power: supply: add DT bindings for max77650
  2019-03-22  9:00   ` Pavel Machek
@ 2019-03-26 17:34     ` Bartosz Golaszewski
  0 siblings, 0 replies; 11+ messages in thread
From: Bartosz Golaszewski @ 2019-03-26 17:34 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Rob Herring, Mark Rutland, Linus Walleij, Dmitry Torokhov,
	Jacek Anaszewski, Lee Jones, Sebastian Reichel, Liam Girdwood,
	Greg Kroah-Hartman, Linux Kernel Mailing List,
	open list:GPIO SUBSYSTEM, devicetree, Linux Input,
	Linux LED Subsystem, Linux PM list, Bartosz Golaszewski

pt., 22 mar 2019 o 10:00 Pavel Machek <pavel@ucw.cz> napisał(a):
>
> On Mon 2019-03-18 18:40:31, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> >
> > Add the DT binding document for the battery charger module of max77650.
> >
> > Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > ---
> >  .../power/supply/max77650-charger.txt         | 27 +++++++++++++++++++
> >  1 file changed, 27 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/power/supply/max77650-charger.txt
> >
> > diff --git a/Documentation/devicetree/bindings/power/supply/max77650-charger.txt b/Documentation/devicetree/bindings/power/supply/max77650-charger.txt
> > new file mode 100644
> > index 000000000000..d25c95369616
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/power/supply/max77650-charger.txt
> > @@ -0,0 +1,27 @@
> > +Battery charger driver for MAX77650 PMIC from Maxim Integrated.
> > +
> > +This module is part of the MAX77650 MFD device. For more details
> > +see Documentation/devicetree/bindings/mfd/max77650.txt.
> > +
> > +The charger is represented as a sub-node of the PMIC node on the device tree.
> > +
> > +Required properties:
> > +--------------------
> > +- compatible:                Must be "maxim,max77650-charger"
> > +
> > +Optional properties:
> > +--------------------
> > +- min-microvolt:     Minimum CHGIN regulation voltage (in microvolts). Must be
> > +                     one of: 4000000, 4100000, 4200000, 4300000, 4400000,
> > +                     4500000, 4600000, 4700000.
>
> Probably needs "max," prefix. And .. what does this mean? Will charger
> shutdown if input is less than this?
>

The charger will enter the undervoltage lockout state and stop
charging, this is explained in the manual, so I don't think the
bindings are the right place to add this information.

Bart

> > +- curr-lim-microamp: CHGIN input current limit (in microamps). Must be one of:
> > +                     95000, 190000, 285000, 380000, 475000.
>
> "current-limit-microamp", I guess. And probably "max,current-limit-microamp".
>
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [RESEND PATCH v6 00/11] mfd: add support for max77650 PMIC
@ 2019-03-18 17:42 Bartosz Golaszewski
  0 siblings, 0 replies; 11+ messages in thread
From: Bartosz Golaszewski @ 2019-03-18 17:42 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Linus Walleij, Dmitry Torokhov,
	Jacek Anaszewski, Pavel Machek, Lee Jones, Sebastian Reichel,
	Liam Girdwood, Greg Kroah-Hartman
  Cc: linux-kernel, linux-gpio, devicetree, linux-input, linux-leds,
	linux-pm, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

This series missed the last merge window so resending rebased on top
of v5.1-rc1 with no functional changes.

---

This series adds support for max77650 ultra low-power PMIC. It provides
the core mfd driver and a set of five sub-drivers for the regulator,
power supply, gpio, leds and input subsystems.

Patches 1-4 add the DT binding documents. Patch 5 documents mfd_add_devices().
Patches 6-10 add all drivers. Last patch adds a MAINTAINERS entry for this
device.

The regulator part is already upstream.

v1 -> v2:
=========

General:
- use C++ style comments for the SPDX license identifier and the
  copyright header
- s/MODULE_LICENSE("GPL")/MODULE_LICENSE("GPL v2")/
- lookup the virtual interrupt numbers in the MFD driver, setup
  resources for child devices and use platform_get_irq_byname()
  in sub-drivers
- picked up review tags
- use devm_request_any_context_irq() for interrupt requests

LEDs:
- changed the max77650_leds_ prefix to max77650_led_
- drop the max77650_leds structure as the only field it held was the
  regmap pointer, move said pointer to struct max77650_led
- change the driver name to "max77650-led"
- drop the last return value check and return the result of
  regmap_write() directly
- change the labeling scheme to one consistent with other LED drivers

ONKEY:
- drop the key reporting helper and call the input functions directly
  from interrupt handlers
- rename the rv local variable to error
- drop parent device asignment

Regulator:
- drop the unnecessary init_data lookup from the driver code
- drop unnecessary include

Charger:
- disable the charger on driver remove
- change the power supply type to POWER_SUPPLY_TYPE_USB

GPIO:
- drop interrupt support until we have correct implementation of hierarchical
  irqs in gpiolib

v2 -> v3:
=========

General:
- dropped regulator patches as they're already in Mark Brown's branch

LED:
- fix the compatible string in the DT binding example
- use the max_brightness property
- use a common prefix ("MAX77650_LED") for all defines in the driver

MFD:
- add the MODULE_DEVICE_TABLE()
- add a sentinel to the of_device_id array
- constify the pointers to irq names
- use an enum instead of defines for interrupt indexes

v3 -> v4:
=========

GPIO:
- as discussed with Linus Walleij: the gpio-controller is now part of
  the core mfd module (we don't spawn a sub-node anymore), the binding
  document for GPIO has been dropped, the GPIO properties have been
  defined in the binding document for the mfd core, the interrupt
  functionality has been reintroduced with the irq directly passed from
  the mfd part
- due to the above changes the Reviewed-by tag from Linus was dropped

v4 -> v5:
=========

General:
- add a patch documenting mfd_add_devices()

MFD:
- pass the regmap irq_chip irq domain to mfd over mfd_add_devices so that
  the hw interrupts from resources can be correctly mapped to virtual irqs
- remove the enum listing cell indexes
- extend Kconfig help
- add a link to the programming manual
- use REGMAP_IRQ_REG() for regmap interrupts (except for GPI which has
  is composed of two hw interrupts for rising and falling edge)
- add error messages in probe
- use PLATFORM_DEVID_NONE constant in devm_mfd_add_devices()
- set irq_base to 0 in regmap_add_irq_chip() as other users to, it's only
  relevant if it's > 0

Charger:
- use non-maxim specific property names for minimum input voltage and current
  limit
- code shrink by using the enable/disable charger helpers everywhere
- use more descriptive names for constants

Onkey:
- use EV_SW event type for slide mode

LED:
- remove stray " from Kconfig help

v5 -> v6:
=========

MFD:
- remove stray spaces in the binding document
- rename the example dt node
- remove unnecessary interrupt-parent property from the bindings

LED:
- add a missing dependency on LEDS_CLASS to Kconfig

Onkey:
- use boolean for the slide button property

Charger:
- fix the property names in DT example
- make constants even more readable

Bartosz Golaszewski (11):
  dt-bindings: mfd: add DT bindings for max77650
  dt-bindings: power: supply: add DT bindings for max77650
  dt-bindings: leds: add DT bindings for max77650
  dt-bindings: input: add DT bindings for max77650
  mfd: core: document mfd_add_devices()
  mfd: max77650: new core mfd driver
  power: supply: max77650: add support for battery charger
  gpio: max77650: add GPIO support
  leds: max77650: add LEDs support
  input: max77650: add onkey support
  MAINTAINERS: add an entry for max77650 mfd driver

 .../bindings/input/max77650-onkey.txt         |  26 ++
 .../bindings/leds/leds-max77650.txt           |  57 +++
 .../devicetree/bindings/mfd/max77650.txt      |  46 +++
 .../power/supply/max77650-charger.txt         |  27 ++
 MAINTAINERS                                   |  14 +
 drivers/gpio/Kconfig                          |   7 +
 drivers/gpio/Makefile                         |   1 +
 drivers/gpio/gpio-max77650.c                  | 190 +++++++++
 drivers/input/misc/Kconfig                    |   9 +
 drivers/input/misc/Makefile                   |   1 +
 drivers/input/misc/max77650-onkey.c           | 121 ++++++
 drivers/leds/Kconfig                          |   6 +
 drivers/leds/Makefile                         |   1 +
 drivers/leds/leds-max77650.c                  | 147 +++++++
 drivers/mfd/Kconfig                           |  14 +
 drivers/mfd/Makefile                          |   1 +
 drivers/mfd/max77650.c                        | 234 +++++++++++
 drivers/mfd/mfd-core.c                        |  14 +
 drivers/power/supply/Kconfig                  |   7 +
 drivers/power/supply/Makefile                 |   1 +
 drivers/power/supply/max77650-charger.c       | 366 ++++++++++++++++++
 include/linux/mfd/max77650.h                  |  59 +++
 22 files changed, 1349 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/max77650-onkey.txt
 create mode 100644 Documentation/devicetree/bindings/leds/leds-max77650.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/max77650.txt
 create mode 100644 Documentation/devicetree/bindings/power/supply/max77650-charger.txt
 create mode 100644 drivers/gpio/gpio-max77650.c
 create mode 100644 drivers/input/misc/max77650-onkey.c
 create mode 100644 drivers/leds/leds-max77650.c
 create mode 100644 drivers/mfd/max77650.c
 create mode 100644 drivers/power/supply/max77650-charger.c
 create mode 100644 include/linux/mfd/max77650.h

-- 
2.20.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-03-26 17:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-18 17:40 [RESEND PATCH v6 00/11] mfd: add support for max77650 PMIC Bartosz Golaszewski
2019-03-18 17:40 ` [RESEND PATCH v6 01/11] dt-bindings: mfd: add DT bindings for max77650 Bartosz Golaszewski
2019-03-22  8:57   ` Pavel Machek
2019-03-18 17:40 ` [RESEND PATCH v6 02/11] dt-bindings: power: supply: " Bartosz Golaszewski
2019-03-22  9:00   ` Pavel Machek
2019-03-26 17:34     ` Bartosz Golaszewski
2019-03-18 17:40 ` [RESEND PATCH v6 03/11] dt-bindings: leds: " Bartosz Golaszewski
2019-03-22  9:02   ` Pavel Machek
2019-03-22  9:54     ` Bartosz Golaszewski
2019-03-18 17:44 ` [RESEND PATCH v6 00/11] mfd: add support for max77650 PMIC Bartosz Golaszewski
2019-03-18 17:42 Bartosz Golaszewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.