Commit ecdf7e7a authored by Sebastian Reichel's avatar Sebastian Reichel
Browse files

Merge tag 'ib-mt6360-for-5.15-signed' into psy-next



Immutable branch between regulator and power-supply for for 5.15

This immutable branch introduces the MT6360 charger driver,
which requires a new linear range helper.

Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parents 27a8ff46 0402e8eb
Loading
Loading
Loading
Loading
+48 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/mt6360_charger.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Battery charger driver for MT6360 PMIC from MediaTek Integrated.

maintainers:
  - Gene Chen <gene_chen@richtek.com>

description: |
  This module is part of the MT6360 MFD device.
  Provides Battery Charger, Boost for OTG devices and BC1.2 detection.

properties:
  compatible:
    const: mediatek,mt6360-chg

  richtek,vinovp-microvolt:
    description: Maximum CHGIN regulation voltage in uV.
    enum: [ 5500000, 6500000, 11000000, 14500000 ]


  usb-otg-vbus-regulator:
    type: object
    description: OTG boost regulator.
    $ref: /schemas/regulator/regulator.yaml#

required:
  - compatible

additionalProperties: false

examples:
  - |
    mt6360_charger: charger {
      compatible = "mediatek,mt6360-chg";
      richtek,vinovp-microvolt = <14500000>;

      otg_vbus_regulator: usb-otg-vbus-regulator {
        regulator-compatible = "usb-otg-vbus";
        regulator-name = "usb-otg-vbus";
        regulator-min-microvolt = <4425000>;
        regulator-max-microvolt = <5825000>;
      };
    };
...
+11 −0
Original line number Diff line number Diff line
@@ -577,6 +577,17 @@ config CHARGER_MP2629
	  Battery charger. This driver provides Battery charger power management
	  functions on the systems.

config CHARGER_MT6360
	tristate "Mediatek MT6360 Charger Driver"
	depends on MFD_MT6360
	depends on REGULATOR
	select LINEAR_RANGES
	help
	  Say Y here to enable MT6360 Charger Part.
	  The device supports High-Accuracy Voltage/Current Regulation,
	  Average Input Current Regulation, Battery Temperature Sensing,
	  Over-Temperature Protection, DPDM Detection for BC1.2.

config CHARGER_QCOM_SMBB
	tristate "Qualcomm Switch-Mode Battery Charger and Boost"
	depends on MFD_SPMI_PMIC || COMPILE_TEST
+1 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ obj-$(CONFIG_CHARGER_MAX77693) += max77693_charger.o
obj-$(CONFIG_CHARGER_MAX8997)	+= max8997_charger.o
obj-$(CONFIG_CHARGER_MAX8998)	+= max8998_charger.o
obj-$(CONFIG_CHARGER_MP2629)	+= mp2629_charger.o
obj-$(CONFIG_CHARGER_MT6360)	+= mt6360_charger.o
obj-$(CONFIG_CHARGER_QCOM_SMBB)	+= qcom_smbb.o
obj-$(CONFIG_CHARGER_BQ2415X)	+= bq2415x_charger.o
obj-$(CONFIG_CHARGER_BQ24190)	+= bq24190_charger.o
+867 −0

File added.

Preview size limit exceeded, changes collapsed.

+2 −0
Original line number Diff line number Diff line
@@ -41,6 +41,8 @@ int linear_range_get_selector_low(const struct linear_range *r,
int linear_range_get_selector_high(const struct linear_range *r,
				   unsigned int val, unsigned int *selector,
				   bool *found);
void linear_range_get_selector_within(const struct linear_range *r,
				      unsigned int val, unsigned int *selector);
int linear_range_get_selector_low_array(const struct linear_range *r,
					int ranges, unsigned int val,
					unsigned int *selector, bool *found);
Loading