Commit 9d6c80f8 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'regulator-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator updates from Mark Brown:
 "This has been a fairly quiet release for the regulator API, the
  changes are dominated by some new drivers and a quite large set of
  cleanups and filling in the blanks of features for the existing MT6358
  driver.

   - Cleanups and additional features for the Mediatek MT6358 driver

   - Under voltage detection in the fixed regulator

   - Support for Maxim MAX77503, Mediatek MT6366, Qualcomm PM8909,
     PM8919, PMA8048 and PMC8380"

* tag 'regulator-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (45 commits)
  regulator (max5970): Remove duplicate line
  regulator (max5970): Add hwmon support
  regulator: qcom-rpmh: Fix smps4 regulator for pm8550ve
  regulator: qcom,rpmh: Add PMC8380 compatible
  regulator: qcom-rpmh: Add regulators support for PMC8380
  regulator: fixed: add support for under-voltage IRQ
  regulator: dt-bindings: fixed-regulator: Add under-voltage interrupt support
  dt-bindings: regulator: dlg,da9210: Convert to json-schema
  regulator: dt-bindings: Add ADI MAX77503 support
  regulator: max77503: Add ADI MAX77503 support
  regulator: Use device_get_match_data()
  regulator: da9121: Use i2c_get_match_data()
  regulator: Drop unnecessary of_match_device() calls
  regulator: da9063: Annotate struct da9063_regulators with __counted_by
  regulator: da9062: Annotate struct da9062_regulators with __counted_by
  regulator: mt6358: Add supply names for MT6366 regulators
  regulator: mt6358: Add missing regulators for MT6366
  regulator: mt6358: Make MT6366 vcn18 LDO configurable
  regulator: mt6358: fix and drop type prefix in MT6366 regulator node names
  regulator: mt6358: Add supply names for MT6358 regulators
  ...
parents 5cbff4b2 3e0569ff
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright (c) 2023 Analog Devices, Inc.
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/adi,max77503-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Analog Devices MAX77503 Buck Converter
maintainers:
- Gokhan Celik <Gokhan.Celik@analog.com>
description: |
The Analog Devices MAX77503 is a single channel 14V input, 1.5A
high-efficiency buck converter. This converter has 94% efficiency
for 2-Cell/3-Cell battery applications.
allOf:
- $ref: regulator.yaml#
properties:
compatible:
enum:
- adi,max77503
reg:
description: I2C address of the device
items:
- enum: [0x1e, 0x24, 0x37]
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
regulator@1e {
compatible = "adi,max77503";
reg = <0x1e>;
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <5000000>;
};
};
* Dialog Semiconductor DA9210 Multi-phase 12A DCDC BUCK Converter
Required properties:
- compatible: must be "dlg,da9210"
- reg: the i2c slave address of the regulator. It should be 0x68.
Optional properties:
- interrupts: a reference to the DA9210 interrupt, if available.
Any standard regulator properties can be used to configure the single da9210
DCDC.
Example:
da9210@68 {
compatible = "dlg,da9210";
reg = <0x68>;
interrupt-parent = <...>;
interrupts = <...>;
regulator-min-microvolt = <300000>;
regulator-max-microvolt = <1570000>;
regulator-min-microamp = <1600000>;
regulator-max-microamp = <4600000>;
regulator-boot-on;
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/dlg,da9210.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Dialog Semiconductor DA9210 Multi-Phase 12A DC-DC Buck Converter
maintainers:
- Support Opensource <support.opensource@diasemi.com>
allOf:
- $ref: regulator.yaml#
properties:
compatible:
const: dlg,da9210
reg:
maxItems: 1
interrupts:
maxItems: 1
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
regulator@68 {
compatible = "dlg,da9210";
reg = <0x68>;
interrupt-parent = <&irqc0>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
regulator-min-microvolt = <300000>;
regulator-max-microvolt = <1570000>;
regulator-min-microamp = <1600000>;
regulator-max-microamp = <4600000>;
regulator-boot-on;
};
};
......@@ -100,6 +100,11 @@ properties:
vin-supply:
description: Input supply phandle.
interrupts:
maxItems: 1
description:
Interrupt signaling a critical under-voltage event.
required:
- compatible
- regulator-name
......
......@@ -43,6 +43,7 @@ properties:
"^OUT[1-4]$":
type: object
$ref: regulator.yaml#
unevaluatedProperties: false
additionalProperties: false
......
......@@ -30,10 +30,12 @@ properties:
"^LDO([1-9]|1[0-5])$":
type: object
$ref: regulator.yaml#
unevaluatedProperties: false
"^BUCK|BUCKBOOST$":
type: object
$ref: regulator.yaml#
unevaluatedProperties: false
additionalProperties: false
......
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/mediatek,mt6358-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MediaTek MT6358 Regulator
maintainers:
- Zhiyong Tao <zhiyong.tao@mediatek.com>
description:
Regulator node of the PMIC. This node should under the PMIC's device node.
All voltage regulators provided by the PMIC are described as sub-nodes of
this node.
properties:
compatible:
oneOf:
- const: mediatek,mt6358-regulator
- items:
- const: mediatek,mt6366-regulator
- const: mediatek,mt6358-regulator
vsys-ldo1-supply:
description: Supply for LDOs vfe28, vxo22, vcn28, vaux18, vaud28, vsim1, vusb, vbif28
vsys-ldo2-supply:
description: Supply for LDOs vldo28 (MT6358 only), vio28, vmc, vmch, vsim2
vsys-ldo3-supply:
description: Supply for LDOs vcn33, vcama[12] (MT6358 only), vemc, vibr
vsys-vcore-supply:
description: Supply for buck regulator vcore
vsys-vdram1-supply:
description: Supply for buck regulator vdram1
vsys-vgpu-supply:
description: Supply for buck regulator vgpu
vsys-vmodem-supply:
description: Supply for buck regulator vmodem
vsys-vpa-supply:
description: Supply for buck regulator vpa
vsys-vproc11-supply:
description: Supply for buck regulator vproc11
vsys-vproc12-supply:
description: Supply for buck regulator vproc12
vsys-vs1-supply:
description: Supply for buck regulator vs1
vsys-vs2-supply:
description: Supply for buck regulator vs2
vs1-ldo1-supply:
description:
Supply for LDOs vrf18, vefuse, vcn18, vcamio (MT6358 only), vio18, vm18 (MT6366 only)
vs2-ldo1-supply:
description: Supply for LDOs vdram2, vmddr (MT6366 only)
vs2-ldo2-supply:
description: Supply for LDOs vrf12, va12
vs2-ldo3-supply:
description:
Supply for LDOs vsram-core (MT6366 only), vsram-gpu, vsram-others, vsram-proc11, vsram-proc12
vs2-ldo4-supply:
description: Supply for LDO vcamd
patternProperties:
"^(buck_)?v(core|dram1|gpu|modem|pa|proc1[12]|s[12])$":
description: Buck regulators
type: object
$ref: regulator.yaml#
properties:
regulator-allowed-modes:
description: |
Buck regulatpr operating modes allowed. Valid values below.
Users should use the macros from dt-bindings/regulator/mediatek,mt6397-regulator.h
0 (MT6397_BUCK_MODE_AUTO): Auto PFM/PWM mode
1 (MT6397_BUCK_MODE_FORCE_PWM): Forced PWM mode
items:
enum: [0, 1]
unevaluatedProperties: false
"^(ldo_)?v(a|rf)12$":
description: LDOs with fixed 1.2V output and 0~100/10mV tuning
type: object
$ref: regulator.yaml#
properties:
regulator-allowed-modes: false
unevaluatedProperties: false
"^(ldo_)?v((aux|cn|io|rf)18|camio)$":
description:
LDOs with fixed 1.8V output and 0~100/10mV tuning (vcn18 on MT6366 has variable output)
type: object
$ref: regulator.yaml#
properties:
regulator-allowed-modes: false
unevaluatedProperties: false
"^(ldo_)?vxo22$":
description: LDOs with fixed 2.2V output and 0~100/10mV tuning
type: object
$ref: regulator.yaml#
properties:
regulator-allowed-modes: false
unevaluatedProperties: false
"^(ldo_)?v(aud|bif|cn|fe|io)28$":
description: LDOs with fixed 2.8V output and 0~100/10mV tuning
type: object
$ref: regulator.yaml#
properties:
regulator-allowed-modes: false
unevaluatedProperties: false
"^(ldo_)?vusb$":
description: LDOs with fixed 3.0V output and 0~100/10mV tuning
type: object
$ref: regulator.yaml#
properties:
regulator-allowed-modes: false
unevaluatedProperties: false
"^(ldo_)?vsram[_-](core|gpu|others|proc1[12])$":
description: LDOs with variable output
type: object
$ref: regulator.yaml#
properties:
regulator-allowed-modes: false
unevaluatedProperties: false
"^(ldo_)?v(cama[12]|camd|cn33|dram2|efuse|emc|ibr|ldo28|m18|mc|mch|mddr|sim[12])$":
description: LDOs with variable output and 0~100/10mV tuning
type: object
$ref: regulator.yaml#
properties:
regulator-allowed-modes: false
unevaluatedProperties: false
required:
- compatible
additionalProperties: false
allOf:
- if:
properties:
compatible:
const: mediatek,mt6358-regulator
then:
patternProperties:
# Old regulator node name scheme (with prefix and underscores) only
# ([^y-] is used to avoid matching -supply
"^(?<!buck_)(?<!ldo_)v.*[^y-](?!-supply)$": false
"^ldo_vsram-": false
# vsram_core regulator doesn't exist on MT6358
"^ldo_vsram[-_]core$": false
properties:
# vm18 and vmddr regulators don't exist on MT6358
ldo_vm18: false
ldo_vmddr: false
- if:
properties:
compatible:
contains:
const: mediatek,mt6366-regulator
then:
patternProperties:
# Prefer cleaned up regulator node names
"^(buck|ldo)_": false
# Don't allow underscores
"^vsram_": false
# vcam* regulators don't exist on MT6366
"^vcam": false
properties:
# vldo28 regulator doesn't exist on MT6366
vldo28: false
# vs2_ldo4 supply pin doesn't exist on MT6366
vs2-ldo4-supply: false
examples:
- |
#include <dt-bindings/regulator/mediatek,mt6397-regulator.h>
regulator {
compatible = "mediatek,mt6358-regulator";
buck_vgpu {
regulator-name = "vgpu";
regulator-min-microvolt = <625000>;
regulator-max-microvolt = <900000>;
regulator-ramp-delay = <6250>;
regulator-enable-ramp-delay = <200>;
regulator-allowed-modes = <MT6397_BUCK_MODE_AUTO
MT6397_BUCK_MODE_FORCE_PWM>;
};
ldo_vsram_gpu {
regulator-name = "vsram_gpu";
regulator-min-microvolt = <850000>;
regulator-max-microvolt = <1000000>;
regulator-ramp-delay = <6250>;
regulator-enable-ramp-delay = <240>;
};
};
- |
#include <dt-bindings/regulator/mediatek,mt6397-regulator.h>
regulator {
compatible = "mediatek,mt6366-regulator", "mediatek,mt6358-regulator";
vdram1 {
regulator-name = "pp1125_emi_vdd2";
regulator-min-microvolt = <1125000>;
regulator-max-microvolt = <1125000>;
regulator-ramp-delay = <12500>;
regulator-enable-ramp-delay = <0>;
regulator-allowed-modes = <MT6397_BUCK_MODE_AUTO
MT6397_BUCK_MODE_FORCE_PWM>;
regulator-always-on;
};
vproc11 {
regulator-name = "ppvar_dvdd_proc_bc_mt6366";
regulator-min-microvolt = <600000>;
regulator-max-microvolt = <1200000>;
regulator-ramp-delay = <6250>;
regulator-enable-ramp-delay = <200>;
regulator-allowed-modes = <MT6397_BUCK_MODE_AUTO
MT6397_BUCK_MODE_FORCE_PWM>;
regulator-always-on;
};
vmddr {
regulator-name = "pm0750_emi_vmddr";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <750000>;
regulator-enable-ramp-delay = <325>;
regulator-always-on;
};
vsram-proc11 {
regulator-name = "pp0900_dvdd_sram_bc";
regulator-min-microvolt = <850000>;
regulator-max-microvolt = <1120000>;
regulator-ramp-delay = <6250>;
regulator-enable-ramp-delay = <240>;
regulator-always-on;
};
};
...
......@@ -48,10 +48,12 @@ properties:
"^LDO[1-4]$":
type: object
$ref: regulator.yaml#
unevaluatedProperties: false
"^BUCK|BOOST$":
type: object
$ref: regulator.yaml#
unevaluatedProperties: false
additionalProperties: false
......
......@@ -50,6 +50,7 @@ description: |
For PM8550, smps1 - smps6, ldo1 - ldo17, bob1 - bob2
For PM8998, smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2
For PMI8998, bob
For PMC8380, smps1 - smps8, ldo1 - lodo3
For PMR735A, smps1 - smps3, ldo1 - ldo7
For PMX55, smps1 - smps7, ldo1 - ldo16
For PMX65, smps1 - smps8, ldo1 - ldo21
......@@ -78,6 +79,7 @@ properties:
- qcom,pm8998-rpmh-regulators
- qcom,pmc8180-rpmh-regulators
- qcom,pmc8180c-rpmh-regulators
- qcom,pmc8380-rpmh-regulators
- qcom,pmg1110-rpmh-regulators
- qcom,pmi8998-rpmh-regulators
- qcom,pmm8155au-rpmh-regulators
......@@ -364,6 +366,16 @@ allOf:
patternProperties:
"^vdd-s([1-9]|1[0-3])-supply$": true
- if:
properties:
compatible:
enum:
- qcom,pmc8380-rpmh-regulators
then:
patternProperties:
"^vdd-l[1-3]-supply$": true
"^vdd-s[1-8]-supply$": true
- if:
properties:
compatible:
......
......@@ -17,12 +17,15 @@ properties:
- qcom,pm660l-regulators
- qcom,pm8004-regulators
- qcom,pm8005-regulators
- qcom,pm8019-regulators
- qcom,pm8226-regulators
- qcom,pm8841-regulators
- qcom,pm8909-regulators
- qcom,pm8916-regulators
- qcom,pm8941-regulators
- qcom,pm8950-regulators
- qcom,pm8994-regulators
- qcom,pma8084-regulators
- qcom,pmi8994-regulators
- qcom,pmp8074-regulators
- qcom,pms405-regulators
......@@ -32,7 +35,7 @@ properties:
$ref: /schemas/types.yaml#/definitions/phandle
patternProperties:
"^(5vs[1-2]|(l|s)[1-9][0-9]?|lvs[1-3])$":
"^(5vs[1-2]|(l|s)[1-9][0-9]?|lvs[1-4])$":
description: List of regulators and its properties
type: object
$ref: regulator.yaml#
......@@ -176,6 +179,25 @@ allOf:
patternProperties:
"^vdd_s[1-4]-supply$": true
- if:
properties:
compatible:
contains:
enum:
- qcom,pm8019-regulators
then:
properties:
vdd_l1-supply: true
vdd_l2_l3-supply: true
vdd_l4_l5_l6-supply: true
vdd_l7_l8_l11-supply: true
vdd_l9-supply: true
vdd_l10-supply: true
vdd_l12-supply: true
vdd_l13_l14-supply: true
patternProperties:
"^vdd_s[1-4]-supply$": true
- if:
properties:
compatible:
......@@ -206,6 +228,24 @@ allOf:
patternProperties:
"^vdd_s[1-8]-supply$": true
- if:
properties:
compatible:
contains:
enum:
- qcom,pm8909-regulators
then:
properties:
vdd_s1-supply: true
vdd_s2-supply: true
vdd_l1-supply: true
vdd_l2_l5-supply: true
vdd_l3_l6_l10-supply: true
vdd_l4_l7-supply: true
vdd_l8_l11_l15_l18-supply: true
vdd_l9_l12_l14_l17-supply: true
vdd_l13-supply: true
- if:
properties:
compatible:
......@@ -295,6 +335,32 @@ allOf:
patternProperties:
"^vdd_s[1-9][0-2]?-supply$": true
- if:
properties:
compatible:
contains:
enum:
- qcom,pma8084-regulators
then:
properties:
vdd_l1_l11-supply: true
vdd_l2_l3_l4_l27-supply: true
vdd_l5_l7-supply: true
vdd_l6_l12_l14_l15_l26-supply: true
vdd_l8-supply: true
vdd_l9_l10_l13_l20_l23_l24-supply: true
vdd_l16_l25-supply: true
vdd_l17-supply: true
vdd_l18-supply: true
vdd_l19-supply: true
vdd_l21-supply: true
vdd_l22-supply: true
vdd_lvs1_2-supply: true
vdd_lvs3_4-supply: true
vdd_5vs1-supply: true
patternProperties:
"^vdd_s([1-9]|1[0-2])-supply$": true
- if:
properties:
compatible:
......
......@@ -564,6 +564,16 @@ config REGULATOR_MAX5970
The MAX5970/5978 is a smart switch with no output regulation, but
fault protection and voltage and current monitoring capabilities.
config REGULATOR_MAX77503
tristate "Analog Devices MAX77503 Regulator"
depends on I2C
select REGMAP_I2C
help
This driver controls a Analog Devices MAX77503 14V input, 1.5A
high-efficiency buck converter via I2C bus.
Say M here if you want to include support for the regulator as a
module.
config REGULATOR_MAX77541
tristate "Analog Devices MAX77541/77540 Regulator"
depends on MFD_MAX77541
......
......@@ -69,6 +69,7 @@ obj-$(CONFIG_REGULATOR_LTC3676) += ltc3676.o
obj-$(CONFIG_REGULATOR_MAX14577) += max14577-regulator.o
obj-$(CONFIG_REGULATOR_MAX1586) += max1586.o
obj-$(CONFIG_REGULATOR_MAX5970) += max5970-regulator.o
obj-$(CONFIG_REGULATOR_MAX77503) += max77503-regulator.o
obj-$(CONFIG_REGULATOR_MAX77541) += max77541-regulator.o
obj-$(CONFIG_REGULATOR_MAX77620) += max77620-regulator.o
obj-$(CONFIG_REGULATOR_MAX77650) += max77650-regulator.o
......
......@@ -73,7 +73,7 @@ struct da9062_regulators {
int irq_ldo_lim;
unsigned n_regulators;
/* Array size to be defined during init. Keep at end. */
struct da9062_regulator regulator[];
struct da9062_regulator regulator[] __counted_by(n_regulators);
};
/* Regulator operations */
......
......@@ -158,7 +158,7 @@ struct da9063_regulator {
struct da9063_regulators {
unsigned int n_regulators;
/* Array size to be defined during init. Keep at end. */
struct da9063_regulator regulator[];
struct da9063_regulator regulator[] __counted_by(n_regulators);
};
/* BUCK modes for DA9063 */
......
......@@ -13,7 +13,7 @@
//
// Copyright (C) 2020 Dialog Semiconductor
#include <linux/of_device.h>
#include <linux/of.h>
#include <linux/of_gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/regulator/of_regulator.h>
......@@ -1117,17 +1117,6 @@ static const struct of_device_id da9121_dt_ids[] = {
};
MODULE_DEVICE_TABLE(of, da9121_dt_ids);
static inline int da9121_of_get_id(struct device *dev)
{
const struct of_device_id *id = of_match_device(da9121_dt_ids, dev);
if (!id) {
dev_err(dev, "%s: Failed\n", __func__);
return -EINVAL;
}
return (uintptr_t)id->data;
}
static int da9121_i2c_probe(struct i2c_client *i2c)
{
struct da9121 *chip;
......@@ -1141,7 +1130,7 @@ static int da9121_i2c_probe(struct i2c_client *i2c)
}
chip->pdata = i2c->dev.platform_data;
chip->subvariant_id = da9121_of_get_id(&i2c->dev);
chip->subvariant_id = (enum da9121_subvariant)i2c_get_match_data(i2c);
ret = da9121_assign_chip_model(i2c, chip);
if (ret < 0)
......
......@@ -10,7 +10,7 @@
#include <linux/irq.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/of_device.h>
#include <linux/of.h>
#include <linux/regulator/of_regulator.h>
#include <linux/regmap.h>
......@@ -135,16 +135,6 @@ static int da9210_i2c_probe(struct i2c_client *i2c)
struct regulator_dev *rdev = NULL;
struct regulator_config config = { };
int error;
const struct of_device_id *match;
if (i2c->dev.of_node && !pdata) {
match = of_match_device(of_match_ptr(da9210_dt_ids),
&i2c->dev);
if (!match) {
dev_err(&i2c->dev, "Error: No device match found\n");
return -ENODEV;
}
}
chip = devm_kzalloc(&i2c->dev, sizeof(struct da9210), GFP_KERNEL);
if (!chip)
......
......@@ -659,7 +659,6 @@ MODULE_DEVICE_TABLE(of, fan53555_dt_ids);
static int fan53555_regulator_probe(struct i2c_client *client)
{
const struct i2c_device_id *id = i2c_client_get_device_id(client);
struct device_node *np = client->dev.of_node;
struct fan53555_device_info *di;
struct fan53555_platform_data *pdata;
......@@ -682,10 +681,8 @@ static int fan53555_regulator_probe(struct i2c_client *client)
"Platform data not found!\n");
di->regulator = pdata->regulator;
if (client->dev.of_node) {
di->vendor =
(unsigned long)of_device_get_match_data(&client->dev);
} else {
di->vendor = (uintptr_t)i2c_get_match_data(client);
if (!dev_fwnode(&client->dev)) {
/* if no ramp constraint set, get the pdata ramp_delay */
if (!di->regulator->constraints.ramp_delay) {
if (pdata->slew_rate >= ARRAY_SIZE(slew_rates))
......@@ -695,8 +692,6 @@ static int fan53555_regulator_probe(struct i2c_client *client)
di->regulator->constraints.ramp_delay
= slew_rates[pdata->slew_rate];
}
di->vendor = id->driver_data;
}
regmap = devm_regmap_init_i2c(client, &fan53555_regmap_config);
......
......@@ -20,6 +20,7 @@
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/pm_opp.h>
#include <linux/reboot.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/fixed.h>
#include <linux/gpio/consumer.h>
......@@ -29,6 +30,8 @@
#include <linux/regulator/machine.h>
#include <linux/clk.h>
/* Default time in millisecond to wait for emergency shutdown */
#define FV_DEF_EMERG_SHUTDWN_TMO 10
struct fixed_voltage_data {
struct regulator_desc desc;
......@@ -105,6 +108,49 @@ static int reg_is_enabled(struct regulator_dev *rdev)
return priv->enable_counter > 0;
}
static irqreturn_t reg_fixed_under_voltage_irq_handler(int irq, void *data)
{
struct fixed_voltage_data *priv = data;
struct regulator_dev *rdev = priv->dev;
regulator_notifier_call_chain(rdev, REGULATOR_EVENT_UNDER_VOLTAGE,
NULL);
return IRQ_HANDLED;
}
/**
* reg_fixed_get_irqs - Get and register the optional IRQ for fixed voltage
* regulator.
* @dev: Pointer to the device structure.
* @priv: Pointer to fixed_voltage_data structure containing private data.
*
* This function tries to get the IRQ from the device firmware node.
* If it's an optional IRQ and not found, it returns 0.
* Otherwise, it attempts to request the threaded IRQ.
*
* Return: 0 on success, or error code on failure.
*/
static int reg_fixed_get_irqs(struct device *dev,
struct fixed_voltage_data *priv)
{
int ret;
ret = fwnode_irq_get(dev_fwnode(dev), 0);
/* This is optional IRQ. If not found we will get -EINVAL */
if (ret == -EINVAL)
return 0;
if (ret < 0)
return dev_err_probe(dev, ret, "Failed to get IRQ\n");
ret = devm_request_threaded_irq(dev, ret, NULL,
reg_fixed_under_voltage_irq_handler,
IRQF_ONESHOT, "under-voltage", priv);
if (ret)
return dev_err_probe(dev, ret, "Failed to request IRQ\n");
return 0;
}
/**
* of_get_fixed_voltage_config - extract fixed_voltage_config structure info
......@@ -294,6 +340,10 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "%s supplying %duV\n", drvdata->desc.name,
drvdata->desc.fixed_uV);
ret = reg_fixed_get_irqs(dev, drvdata);
if (ret)
return ret;
return 0;
}
......
......@@ -13,7 +13,6 @@
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
......@@ -243,7 +242,6 @@ static int lochnagar_regulator_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct lochnagar *lochnagar = dev_get_drvdata(dev->parent);
struct regulator_config config = { };
const struct of_device_id *of_id;
const struct regulator_desc *desc;
struct regulator_dev *rdev;
int ret;
......@@ -252,12 +250,10 @@ static int lochnagar_regulator_probe(struct platform_device *pdev)
config.regmap = lochnagar->regmap;
config.driver_data = lochnagar;
of_id = of_match_device(lochnagar_of_match, dev);
if (!of_id)
desc = device_get_match_data(dev);
if (!desc)
return -EINVAL;
desc = of_id->data;
rdev = devm_regulator_register(dev, desc, &config);
if (IS_ERR(rdev)) {
ret = PTR_ERR(rdev);
......
......@@ -58,12 +58,6 @@
#define LTC3589_VRRCR_SW3_RAMP_MASK GENMASK(5, 4)
#define LTC3589_VRRCR_LDO2_RAMP_MASK GENMASK(7, 6)
enum ltc3589_variant {
LTC3589,
LTC3589_1,
LTC3589_2,
};
enum ltc3589_reg {
LTC3589_SW1,
LTC3589_SW2,
......@@ -76,10 +70,14 @@ enum ltc3589_reg {
LTC3589_NUM_REGULATORS,
};
struct ltc3589_info {
const unsigned int *volt_table;
int fixed_uV;
};
struct ltc3589 {
struct regmap *regmap;
struct device *dev;
enum ltc3589_variant variant;
struct regulator_desc regulator_descs[LTC3589_NUM_REGULATORS];
struct regulator_dev *regulators[LTC3589_NUM_REGULATORS];
};
......@@ -379,8 +377,8 @@ static irqreturn_t ltc3589_isr(int irq, void *dev_id)
static int ltc3589_probe(struct i2c_client *client)
{
const struct i2c_device_id *id = i2c_client_get_device_id(client);
struct device *dev = &client->dev;
const struct ltc3589_info *info;
struct regulator_desc *descs;
struct ltc3589 *ltc3589;
int i, ret;
......@@ -390,21 +388,13 @@ static int ltc3589_probe(struct i2c_client *client)
return -ENOMEM;
i2c_set_clientdata(client, ltc3589);
if (client->dev.of_node)
ltc3589->variant = (uintptr_t)of_device_get_match_data(&client->dev);
else
ltc3589->variant = id->driver_data;
info = i2c_get_match_data(client);
ltc3589->dev = dev;
descs = ltc3589->regulator_descs;
memcpy(descs, ltc3589_regulators, sizeof(ltc3589_regulators));
if (ltc3589->variant == LTC3589) {
descs[LTC3589_LDO3].fixed_uV = 1800000;
descs[LTC3589_LDO4].volt_table = ltc3589_ldo4;
} else {
descs[LTC3589_LDO3].fixed_uV = 2800000;
descs[LTC3589_LDO4].volt_table = ltc3589_12_ldo4;
}
descs[LTC3589_LDO3].fixed_uV = info->fixed_uV;
descs[LTC3589_LDO4].volt_table = info->volt_table;
ltc3589->regmap = devm_regmap_init_i2c(client, &ltc3589_regmap_config);
if (IS_ERR(ltc3589->regmap)) {
......@@ -444,28 +434,29 @@ static int ltc3589_probe(struct i2c_client *client)
return 0;
}
static const struct ltc3589_info ltc3589_info = {
.fixed_uV = 1800000,
.volt_table = ltc3589_ldo4,
};
static const struct ltc3589_info ltc3589_12_info = {
.fixed_uV = 2800000,
.volt_table = ltc3589_12_ldo4,
};
static const struct i2c_device_id ltc3589_i2c_id[] = {
{ "ltc3589", LTC3589 },
{ "ltc3589-1", LTC3589_1 },
{ "ltc3589-2", LTC3589_2 },
{ "ltc3589", (kernel_ulong_t)&ltc3589_info },
{ "ltc3589-1", (kernel_ulong_t)&ltc3589_12_info },
{ "ltc3589-2", (kernel_ulong_t)&ltc3589_12_info },
{ }
};
MODULE_DEVICE_TABLE(i2c, ltc3589_i2c_id);
static const struct of_device_id __maybe_unused ltc3589_of_match[] = {
{
.compatible = "lltc,ltc3589",
.data = (void *)LTC3589,
},
{
.compatible = "lltc,ltc3589-1",
.data = (void *)LTC3589_1,
},
{
.compatible = "lltc,ltc3589-2",
.data = (void *)LTC3589_2,
},
{ },
{ .compatible = "lltc,ltc3589", .data = &ltc3589_info },
{ .compatible = "lltc,ltc3589-1", .data = &ltc3589_12_info },
{ .compatible = "lltc,ltc3589-2", .data = &ltc3589_12_info },
{ }
};
MODULE_DEVICE_TABLE(of, ltc3589_of_match);
......
......@@ -11,7 +11,7 @@
#include <linux/regulator/driver.h>
#include <linux/slab.h>
#include <linux/regulator/max1586.h>
#include <linux/of_device.h>
#include <linux/of.h>
#include <linux/regulator/of_regulator.h>
#define MAX1586_V3_MAX_VSEL 31
......@@ -213,16 +213,9 @@ static int max1586_pmic_probe(struct i2c_client *client)
struct regulator_config config = { };
struct max1586_data *max1586;
int i, id, ret;
const struct of_device_id *match;
pdata = dev_get_platdata(&client->dev);
if (client->dev.of_node && !pdata) {
match = of_match_device(of_match_ptr(max1586_of_match),
&client->dev);
if (!match) {
dev_err(&client->dev, "Error: No device match found\n");
return -ENODEV;
}
ret = of_get_max1586_platform_data(&client->dev, &pdata_of);
if (ret < 0)
return ret;
......
......@@ -223,7 +223,7 @@ static int max20086_i2c_probe(struct i2c_client *i2c)
return -ENOMEM;
chip->dev = &i2c->dev;
chip->info = device_get_match_data(chip->dev);
chip->info = i2c_get_match_data(i2c);
i2c_set_clientdata(i2c, chip);
......@@ -275,45 +275,42 @@ static int max20086_i2c_probe(struct i2c_client *i2c)
return 0;
}
static const struct i2c_device_id max20086_i2c_id[] = {
{ "max20086" },
{ "max20087" },
{ "max20088" },
{ "max20089" },
{ /* Sentinel */ },
static const struct max20086_chip_info max20086_chip_info = {
.id = MAX20086_DEVICE_ID_MAX20086,
.num_outputs = 4,
};
static const struct max20086_chip_info max20087_chip_info = {
.id = MAX20086_DEVICE_ID_MAX20087,
.num_outputs = 4,
};
static const struct max20086_chip_info max20088_chip_info = {
.id = MAX20086_DEVICE_ID_MAX20088,
.num_outputs = 2,
};
static const struct max20086_chip_info max20089_chip_info = {
.id = MAX20086_DEVICE_ID_MAX20089,
.num_outputs = 2,
};
static const struct i2c_device_id max20086_i2c_id[] = {
{ "max20086", (kernel_ulong_t)&max20086_chip_info },
{ "max20087", (kernel_ulong_t)&max20087_chip_info },
{ "max20088", (kernel_ulong_t)&max20088_chip_info },
{ "max20089", (kernel_ulong_t)&max20089_chip_info },
{ /* Sentinel */ }
};
MODULE_DEVICE_TABLE(i2c, max20086_i2c_id);
static const struct of_device_id max20086_dt_ids[] __maybe_unused = {
{
.compatible = "maxim,max20086",
.data = &(const struct max20086_chip_info) {
.id = MAX20086_DEVICE_ID_MAX20086,
.num_outputs = 4,
}
}, {
.compatible = "maxim,max20087",
.data = &(const struct max20086_chip_info) {
.id = MAX20086_DEVICE_ID_MAX20087,
.num_outputs = 4,
}
}, {
.compatible = "maxim,max20088",
.data = &(const struct max20086_chip_info) {
.id = MAX20086_DEVICE_ID_MAX20088,
.num_outputs = 2,
}
}, {
.compatible = "maxim,max20089",
.data = &(const struct max20086_chip_info) {
.id = MAX20086_DEVICE_ID_MAX20089,
.num_outputs = 2,
}
},
{ /* Sentinel */ },
{ .compatible = "maxim,max20086", .data = &max20086_chip_info },
{ .compatible = "maxim,max20087", .data = &max20087_chip_info },
{ .compatible = "maxim,max20088", .data = &max20088_chip_info },
{ .compatible = "maxim,max20089", .data = &max20089_chip_info },
{ /* Sentinel */ }
};
MODULE_DEVICE_TABLE(of, max20086_dt_ids);
static struct i2c_driver max20086_regulator_driver = {
......
......@@ -10,6 +10,7 @@
#include <linux/bitops.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/hwmon.h>
#include <linux/module.h>
#include <linux/io.h>
#include <linux/of.h>
......@@ -32,6 +33,132 @@ enum max597x_regulator_id {
MAX597X_SW1,
};
static int max5970_read_adc(struct regmap *regmap, int reg, long *val)
{
u8 reg_data[2];
int ret;
ret = regmap_bulk_read(regmap, reg, &reg_data[0], 2);
if (ret < 0)
return ret;
*val = (reg_data[0] << 2) | (reg_data[1] & 3);
return 0;
}
static int max5970_read(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long *val)
{
struct regulator_dev **rdevs = dev_get_drvdata(dev);
struct max5970_regulator *ddata = rdev_get_drvdata(rdevs[channel]);
struct regmap *regmap = ddata->regmap;
int ret;
switch (type) {
case hwmon_curr:
switch (attr) {
case hwmon_curr_input:
ret = max5970_read_adc(regmap, MAX5970_REG_CURRENT_H(channel), val);
if (ret < 0)
return ret;
/*
* Calculate current from ADC value, IRNG range & shunt resistor value.
* ddata->irng holds the voltage corresponding to the maximum value the
* 10-bit ADC can measure.
* To obtain the output, multiply the ADC value by the IRNG range (in
* millivolts) and then divide it by the maximum value of the 10-bit ADC.
*/
*val = (*val * ddata->irng) >> 10;
/* Convert the voltage meansurement across shunt resistor to current */
*val = (*val * 1000) / ddata->shunt_micro_ohms;
return 0;
default:
return -EOPNOTSUPP;
}
case hwmon_in:
switch (attr) {
case hwmon_in_input:
ret = max5970_read_adc(regmap, MAX5970_REG_VOLTAGE_H(channel), val);
if (ret < 0)
return ret;
/*
* Calculate voltage from ADC value and MON range.
* ddata->mon_rng holds the voltage corresponding to the maximum value the
* 10-bit ADC can measure.
* To obtain the output, multiply the ADC value by the MON range (in
* microvolts) and then divide it by the maximum value of the 10-bit ADC.
*/
*val = mul_u64_u32_shr(*val, ddata->mon_rng, 10);
/* uV to mV */
*val = *val / 1000;
return 0;
default:
return -EOPNOTSUPP;
}
default:
return -EOPNOTSUPP;
}
}
static umode_t max5970_is_visible(const void *data,
enum hwmon_sensor_types type,
u32 attr, int channel)
{
struct regulator_dev **rdevs = (struct regulator_dev **)data;
struct max5970_regulator *ddata;
if (channel >= MAX5970_NUM_SWITCHES || !rdevs[channel])
return 0;
ddata = rdev_get_drvdata(rdevs[channel]);
if (channel >= ddata->num_switches)
return 0;
switch (type) {
case hwmon_in:
switch (attr) {
case hwmon_in_input:
return 0444;
default:
break;
}
break;
case hwmon_curr:
switch (attr) {
case hwmon_curr_input:
/* Current measurement requires knowledge of the shunt resistor value. */
if (ddata->shunt_micro_ohms)
return 0444;
break;
default:
break;
}
break;
default:
break;
}
return 0;
}
static const struct hwmon_ops max5970_hwmon_ops = {
.is_visible = max5970_is_visible,
.read = max5970_read,
};
static const struct hwmon_channel_info *max5970_info[] = {
HWMON_CHANNEL_INFO(in, HWMON_I_INPUT, HWMON_I_INPUT),
HWMON_CHANNEL_INFO(curr, HWMON_C_INPUT, HWMON_C_INPUT),
NULL
};
static const struct hwmon_chip_info max5970_chip_info = {
.ops = &max5970_hwmon_ops,
.info = max5970_info,
};
static int max597x_uvp_ovp_check_mode(struct regulator_dev *rdev, int severity)
{
int ret, reg;
......@@ -431,7 +558,8 @@ static int max597x_regulator_probe(struct platform_device *pdev)
struct i2c_client *i2c = to_i2c_client(pdev->dev.parent);
struct regulator_config config = { };
struct regulator_dev *rdev;
struct regulator_dev *rdevs[MAX5970_NUM_SWITCHES];
struct regulator_dev **rdevs = NULL;
struct device *hwmon_dev;
int num_switches;
int ret, i;
......@@ -442,6 +570,11 @@ static int max597x_regulator_probe(struct platform_device *pdev)
if (!max597x)
return -ENOMEM;
rdevs = devm_kcalloc(&i2c->dev, MAX5970_NUM_SWITCHES, sizeof(struct regulator_dev *),
GFP_KERNEL);
if (!rdevs)
return -ENOMEM;
i2c_set_clientdata(i2c, max597x);
if (of_device_is_compatible(i2c->dev.of_node, "maxim,max5978"))
......@@ -451,7 +584,6 @@ static int max597x_regulator_probe(struct platform_device *pdev)
else
return -ENODEV;
i2c_set_clientdata(i2c, max597x);
num_switches = max597x->num_switches;
for (i = 0; i < num_switches; i++) {
......@@ -485,6 +617,15 @@ static int max597x_regulator_probe(struct platform_device *pdev)
max597x->shunt_micro_ohms[i] = data->shunt_micro_ohms;
}
if (IS_REACHABLE(CONFIG_HWMON)) {
hwmon_dev = devm_hwmon_device_register_with_info(&i2c->dev, "max5970", rdevs,
&max5970_chip_info, NULL);
if (IS_ERR(hwmon_dev)) {
return dev_err_probe(&i2c->dev, PTR_ERR(hwmon_dev),
"Unable to register hwmon device\n");
}
}
if (i2c->irq) {
ret =
max597x_setup_irq(&i2c->dev, i2c->irq, rdevs, num_switches,
......
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (c) 2023 Analog Devices, Inc.
* ADI regulator driver for MAX77503.
*/
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>
#include <linux/util_macros.h>
#define MAX77503_REG_CFG 0x00
#define MAX77503_REG_VOUT 0x01
#define MAX77503_BIT_EN BIT(0)
#define MAX77503_BIT_CURR_LIM BIT(3)
#define MAX77503_BIT_ADEN BIT(6)
#define MAX77503_BITS_SOFT_START GENMASK(5, 4)
#define MAX77503_BITS_MX_VOUT GENMASK(7, 0)
#define MAX77503_AD_ENABLED 0x1
#define MAX77503_AD_DISABLED 0x0
struct max77503_dev {
struct device *dev;
struct device_node *of_node;
struct regulator_desc desc;
struct regulator_dev *rdev;
struct regmap *regmap;
};
static const struct regmap_config max77503_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = 0x2,
};
static const struct regulator_ops max77503_buck_ops = {
.list_voltage = regulator_list_voltage_linear_range,
.map_voltage = regulator_map_voltage_ascend,
.is_enabled = regulator_is_enabled_regmap,
.enable = regulator_enable_regmap,
.disable = regulator_disable_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.get_current_limit = regulator_get_current_limit_regmap,
.set_current_limit = regulator_set_current_limit_regmap,
.set_active_discharge = regulator_set_active_discharge_regmap,
.set_soft_start = regulator_set_soft_start_regmap,
};
static const struct linear_range max77503_buck_ranges[] = {
REGULATOR_LINEAR_RANGE(800000, 0x00, 0x54, 50000)
};
static const unsigned int max77503_current_limit_table[] = {
500000, 2000000
};
static const struct regulator_desc max77503_regulators_desc = {
.name = "max77503",
.enable_reg = MAX77503_REG_CFG,
.enable_mask = MAX77503_BIT_EN,
.ops = &max77503_buck_ops,
.type = REGULATOR_VOLTAGE,
.linear_ranges = max77503_buck_ranges,
.n_linear_ranges = ARRAY_SIZE(max77503_buck_ranges),
.vsel_reg = MAX77503_REG_VOUT,
.vsel_mask = MAX77503_BITS_MX_VOUT,
.soft_start_reg = MAX77503_REG_CFG,
.soft_start_mask = MAX77503_BITS_SOFT_START,
.active_discharge_reg = MAX77503_REG_CFG,
.active_discharge_mask = MAX77503_BIT_ADEN,
.active_discharge_off = MAX77503_AD_DISABLED,
.active_discharge_on = MAX77503_AD_ENABLED,
.csel_reg = MAX77503_REG_CFG,
.csel_mask = MAX77503_BIT_CURR_LIM,
.curr_table = max77503_current_limit_table,
.n_current_limits = ARRAY_SIZE(max77503_current_limit_table),
.owner = THIS_MODULE,
};
static int max77503_regulator_probe(struct i2c_client *client)
{
struct device *dev = &client->dev;
struct regulator_config config = {};
struct regulator_dev *rdev;
config.dev = dev;
config.of_node = dev->of_node;
config.regmap = devm_regmap_init_i2c(client, &max77503_regmap_config);
if (IS_ERR(config.regmap)) {
dev_err(dev, "Failed to init regmap");
return PTR_ERR(config.regmap);
}
rdev = devm_regulator_register(dev, &max77503_regulators_desc, &config);
if (IS_ERR(rdev)) {
dev_err(dev, "Failed to register regulator MAX77503");
return PTR_ERR(rdev);
}
return 0;
}
static const struct of_device_id of_max77503_match_tbl[] = {
{ .compatible = "adi,max77503", },
{ }
};
MODULE_DEVICE_TABLE(of, of_max77503_match_tbl);
static const struct i2c_device_id max77503_regulator_id[] = {
{"max77503"},
{ }
};
MODULE_DEVICE_TABLE(i2c, max77503_regulator_id);
static struct i2c_driver max77503_regulator_driver = {
.driver = {
.name = "max77503",
.of_match_table = of_max77503_match_tbl
},
.probe = max77503_regulator_probe,
.id_table = max77503_regulator_id,
};
module_i2c_driver(max77503_regulator_driver);
MODULE_AUTHOR("Gokhan Celik <Gokhan.Celik@analog.com>");
MODULE_DESCRIPTION("MAX77503 regulator driver");
MODULE_LICENSE("GPL");
......@@ -24,7 +24,7 @@ struct mc13xxx_regulator_priv {
u32 powermisc_pwgt_state;
struct mc13xxx_regulator *mc13xxx_regulators;
int num_regulators;
struct regulator_dev *regulators[];
struct regulator_dev *regulators[] __counted_by(num_regulators);
};
extern int mc13xxx_fixed_regulator_set_voltage(struct regulator_dev *rdev,
......
......@@ -200,7 +200,7 @@ static int mp5416_i2c_probe(struct i2c_client *client)
return PTR_ERR(regmap);
}
desc = of_device_get_match_data(dev);
desc = i2c_get_match_data(client);
if (!desc)
return -ENODEV;
......@@ -223,14 +223,14 @@ static int mp5416_i2c_probe(struct i2c_client *client)
static const struct of_device_id mp5416_of_match[] = {
{ .compatible = "mps,mp5416", .data = &mp5416_regulators_desc },
{ .compatible = "mps,mp5496", .data = &mp5496_regulators_desc },
{},
{}
};
MODULE_DEVICE_TABLE(of, mp5416_of_match);
static const struct i2c_device_id mp5416_id[] = {
{ "mp5416", },
{ "mp5496", },
{ },
{ "mp5416", (kernel_ulong_t)&mp5416_regulators_desc },
{ "mp5496", (kernel_ulong_t)&mp5496_regulators_desc },
{}
};
MODULE_DEVICE_TABLE(i2c, mp5416_id);
......
......@@ -315,7 +315,7 @@ static int mp886x_i2c_probe(struct i2c_client *client)
if (IS_ERR(di->en_gpio))
return PTR_ERR(di->en_gpio);
di->ci = of_device_get_match_data(dev);
di->ci = i2c_get_match_data(client);
di->dev = dev;
regmap = devm_regmap_init_i2c(client, &mp886x_regmap_config);
......@@ -341,20 +341,14 @@ static int mp886x_i2c_probe(struct i2c_client *client)
}
static const struct of_device_id mp886x_dt_ids[] = {
{
.compatible = "mps,mp8867",
.data = &mp8867_ci
},
{
.compatible = "mps,mp8869",
.data = &mp8869_ci
},
{ .compatible = "mps,mp8867", .data = &mp8867_ci },
{ .compatible = "mps,mp8869", .data = &mp8869_ci },
{ }
};
MODULE_DEVICE_TABLE(of, mp886x_dt_ids);
static const struct i2c_device_id mp886x_id[] = {
{ "mp886x", },
{ "mp886x", (kernel_ulong_t)&mp8869_ci },
{ },
};
MODULE_DEVICE_TABLE(i2c, mp886x_id);
......
This diff is collapsed.
......@@ -19,7 +19,6 @@
#include <linux/regmap.h>
#include <linux/mfd/palmas.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/regulator/of_regulator.h>
static const struct linear_range smps_low_ranges[] = {
......@@ -1601,16 +1600,13 @@ static int palmas_regulators_probe(struct platform_device *pdev)
struct regulator_config config = { };
struct palmas_pmic *pmic;
const char *pdev_name;
const struct of_device_id *match;
int ret = 0;
unsigned int reg;
match = of_match_device(of_match_ptr(of_palmas_match_tbl), &pdev->dev);
if (!match)
driver_data = (struct palmas_pmic_driver_data *)device_get_match_data(&pdev->dev);
if (!driver_data)
return -ENODATA;
driver_data = (struct palmas_pmic_driver_data *)match->data;
pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata)
return -ENOMEM;
......
......@@ -5,6 +5,7 @@
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/init.h>
......@@ -28,11 +29,6 @@ enum {
PV88080_ID_HVBUCK,
};
enum pv88080_types {
TYPE_PV88080_AA,
TYPE_PV88080_BA,
};
struct pv88080_regulator {
struct regulator_desc desc;
unsigned int mode_reg;
......@@ -196,16 +192,6 @@ static const struct pv88080_compatible_regmap pv88080_ba_regs = {
.hvbuck_vsel_mask = PV88080_VHVBUCK_MASK,
};
#ifdef CONFIG_OF
static const struct of_device_id pv88080_dt_ids[] = {
{ .compatible = "pvs,pv88080", .data = (void *)TYPE_PV88080_AA },
{ .compatible = "pvs,pv88080-aa", .data = (void *)TYPE_PV88080_AA },
{ .compatible = "pvs,pv88080-ba", .data = (void *)TYPE_PV88080_BA },
{},
};
MODULE_DEVICE_TABLE(of, pv88080_dt_ids);
#endif
static unsigned int pv88080_buck_get_mode(struct regulator_dev *rdev)
{
struct pv88080_regulator *info = rdev_get_drvdata(rdev);
......@@ -376,11 +362,9 @@ static irqreturn_t pv88080_irq_handler(int irq, void *data)
*/
static int pv88080_i2c_probe(struct i2c_client *i2c)
{
const struct i2c_device_id *id = i2c_client_get_device_id(i2c);
struct regulator_init_data *init_data = dev_get_platdata(&i2c->dev);
struct pv88080 *chip;
const struct pv88080_compatible_regmap *regmap_config;
const struct of_device_id *match;
struct regulator_config config = { };
int i, error, ret;
unsigned int conf2, conf5;
......@@ -398,16 +382,9 @@ static int pv88080_i2c_probe(struct i2c_client *i2c)
return error;
}
if (i2c->dev.of_node) {
match = of_match_node(pv88080_dt_ids, i2c->dev.of_node);
if (!match) {
dev_err(chip->dev, "Failed to get of_match_node\n");
return -EINVAL;
}
chip->type = (unsigned long)match->data;
} else {
chip->type = id->driver_data;
}
chip->regmap_config = i2c_get_match_data(i2c);
if (!chip->regmap_config)
return -ENODEV;
i2c_set_clientdata(i2c, chip);
......@@ -452,15 +429,6 @@ static int pv88080_i2c_probe(struct i2c_client *i2c)
dev_warn(chip->dev, "No IRQ configured\n");
}
switch (chip->type) {
case TYPE_PV88080_AA:
chip->regmap_config = &pv88080_aa_regs;
break;
case TYPE_PV88080_BA:
chip->regmap_config = &pv88080_ba_regs;
break;
}
regmap_config = chip->regmap_config;
config.dev = chip->dev;
config.regmap = chip->regmap;
......@@ -546,11 +514,19 @@ static int pv88080_i2c_probe(struct i2c_client *i2c)
return 0;
}
static const struct of_device_id pv88080_dt_ids[] = {
{ .compatible = "pvs,pv88080", .data = &pv88080_aa_regs },
{ .compatible = "pvs,pv88080-aa", .data = &pv88080_aa_regs },
{ .compatible = "pvs,pv88080-ba", .data = &pv88080_ba_regs },
{}
};
MODULE_DEVICE_TABLE(of, pv88080_dt_ids);
static const struct i2c_device_id pv88080_i2c_id[] = {
{ "pv88080", TYPE_PV88080_AA },
{ "pv88080-aa", TYPE_PV88080_AA },
{ "pv88080-ba", TYPE_PV88080_BA },
{},
{ "pv88080", (kernel_ulong_t)&pv88080_aa_regs },
{ "pv88080-aa", (kernel_ulong_t)&pv88080_aa_regs },
{ "pv88080-ba", (kernel_ulong_t)&pv88080_ba_regs },
{}
};
MODULE_DEVICE_TABLE(i2c, pv88080_i2c_id);
......@@ -558,7 +534,7 @@ static struct i2c_driver pv88080_regulator_driver = {
.driver = {
.name = "pv88080",
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
.of_match_table = of_match_ptr(pv88080_dt_ids),
.of_match_table = pv88080_dt_ids,
},
.probe = pv88080_i2c_probe,
.id_table = pv88080_i2c_id,
......
......@@ -764,7 +764,6 @@ static int qcom_labibb_regulator_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct regulator_config cfg = {};
struct device_node *reg_node;
const struct of_device_id *match;
const struct labibb_regulator_data *reg_data;
struct regmap *reg_regmap;
unsigned int type;
......@@ -776,11 +775,11 @@ static int qcom_labibb_regulator_probe(struct platform_device *pdev)
return -ENODEV;
}
match = of_match_device(qcom_labibb_match, &pdev->dev);
if (!match)
reg_data = device_get_match_data(&pdev->dev);
if (!reg_data)
return -ENODEV;
for (reg_data = match->data; reg_data->name; reg_data++) {
for (; reg_data->name; reg_data++) {
char *sc_irq_name;
int irq = 0;
......
......@@ -1095,7 +1095,22 @@ static const struct rpmh_vreg_init_data pm8550ve_vreg_data[] = {
RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps525_lv, "vdd-s1"),
RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps525_lv, "vdd-s2"),
RPMH_VREG("smps3", "smp%s3", &pmic5_ftsmps525_lv, "vdd-s3"),
RPMH_VREG("smps4", "smp%s4", &pmic5_ftsmps525_lv, "vdd-s4"),
RPMH_VREG("smps4", "smp%s4", &pmic5_ftsmps525_mv, "vdd-s4"),
RPMH_VREG("smps5", "smp%s5", &pmic5_ftsmps525_lv, "vdd-s5"),
RPMH_VREG("smps6", "smp%s6", &pmic5_ftsmps525_lv, "vdd-s6"),
RPMH_VREG("smps7", "smp%s7", &pmic5_ftsmps525_lv, "vdd-s7"),
RPMH_VREG("smps8", "smp%s8", &pmic5_ftsmps525_lv, "vdd-s8"),
RPMH_VREG("ldo1", "ldo%s1", &pmic5_nldo515, "vdd-l1"),
RPMH_VREG("ldo2", "ldo%s2", &pmic5_nldo515, "vdd-l2"),
RPMH_VREG("ldo3", "ldo%s3", &pmic5_nldo515, "vdd-l3"),
{}
};
static const struct rpmh_vreg_init_data pmc8380_vreg_data[] = {
RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps525_lv, "vdd-s1"),
RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps525_lv, "vdd-s2"),
RPMH_VREG("smps3", "smp%s3", &pmic5_ftsmps525_lv, "vdd-s3"),
RPMH_VREG("smps4", "smp%s4", &pmic5_ftsmps525_mv, "vdd-s4"),
RPMH_VREG("smps5", "smp%s5", &pmic5_ftsmps525_lv, "vdd-s5"),
RPMH_VREG("smps6", "smp%s6", &pmic5_ftsmps525_lv, "vdd-s6"),
RPMH_VREG("smps7", "smp%s7", &pmic5_ftsmps525_lv, "vdd-s7"),
......@@ -1511,6 +1526,10 @@ static const struct of_device_id __maybe_unused rpmh_regulator_match_table[] = {
.compatible = "qcom,pmc8180c-rpmh-regulators",
.data = pm8150l_vreg_data,
},
{
.compatible = "qcom,pmc8380-rpmh-regulators",
.data = pmc8380_vreg_data,
},
{
.compatible = "qcom,pmm8155au-rpmh-regulators",
.data = pmm8155au_vreg_data,
......
......@@ -937,7 +937,6 @@ MODULE_DEVICE_TABLE(of, rpm_of_match);
static int rpm_reg_probe(struct platform_device *pdev)
{
const struct rpm_regulator_data *reg;
const struct of_device_id *match;
struct regulator_config config = { };
struct regulator_dev *rdev;
struct qcom_rpm_reg *vreg;
......@@ -949,13 +948,13 @@ static int rpm_reg_probe(struct platform_device *pdev)
return -ENODEV;
}
match = of_match_device(rpm_of_match, &pdev->dev);
if (!match) {
reg = device_get_match_data(&pdev->dev);
if (!reg) {
dev_err(&pdev->dev, "failed to match device\n");
return -ENODEV;
}
for (reg = match->data; reg->name; reg++) {
for (; reg->name; reg++) {
vreg = devm_kmemdup(&pdev->dev, reg->template, sizeof(*vreg), GFP_KERNEL);
if (!vreg)
return -ENOMEM;
......
......@@ -2118,6 +2118,28 @@ static const struct spmi_regulator_data pm8005_regulators[] = {
{ }
};
static const struct spmi_regulator_data pm8019_regulators[] = {
{ "s1", 0x1400, "vdd_s1", },
{ "s2", 0x1700, "vdd_s2", },
{ "s3", 0x1a00, "vdd_s3", },
{ "s4", 0x1d00, "vdd_s4", },
{ "l1", 0x4000, "vdd_l1", },
{ "l2", 0x4100, "vdd_l2_l3", },
{ "l3", 0x4200, "vdd_l2_l3", },
{ "l4", 0x4300, "vdd_l4_l5_l6", },
{ "l5", 0x4400, "vdd_l4_l5_l6", },
{ "l6", 0x4500, "vdd_l4_l5_l6", },
{ "l7", 0x4600, "vdd_l7_l8_l11", },
{ "l8", 0x4700, "vdd_l7_l8_l11", },
{ "l9", 0x4800, "vdd_l9", },
{ "l10", 0x4900, "vdd_l10", },
{ "l11", 0x4a00, "vdd_l7_l8_l11", },
{ "l12", 0x4b00, "vdd_l12", },
{ "l13", 0x4c00, "vdd_l13_l14", },
{ "l14", 0x4d00, "vdd_l13_l14", },
{ }
};
static const struct spmi_regulator_data pm8226_regulators[] = {
{ "s1", 0x1400, "vdd_s1", },
{ "s2", 0x1700, "vdd_s2", },
......@@ -2168,6 +2190,29 @@ static const struct spmi_regulator_data pm8841_regulators[] = {
{ }
};
static const struct spmi_regulator_data pm8909_regulators[] = {
{ "s1", 0x1400, "vdd_s1", },
{ "s2", 0x1700, "vdd_s2", },
{ "l1", 0x4000, "vdd_l1", },
{ "l2", 0x4100, "vdd_l2_l5", },
{ "l3", 0x4200, "vdd_l3_l6_l10", },
{ "l4", 0x4300, "vdd_l4_l7", },
{ "l5", 0x4400, "vdd_l2_l5", },
{ "l6", 0x4500, "vdd_l3_l6_l10", },
{ "l7", 0x4600, "vdd_l4_l7", },
{ "l8", 0x4700, "vdd_l8_l11_l15_l18", },
{ "l9", 0x4800, "vdd_l9_l12_l14_l17", },
{ "l10", 0x4900, "vdd_l3_l6_l10", },
{ "l11", 0x4a00, "vdd_l8_l11_l15_l18", },
{ "l12", 0x4b00, "vdd_l9_l12_l14_l17", },
{ "l13", 0x4c00, "vdd_l13", },
{ "l14", 0x4d00, "vdd_l9_l12_l14_l17", },
{ "l15", 0x4e00, "vdd_l8_l11_l15_l18", },
{ "l17", 0x5000, "vdd_l9_l12_l14_l17", },
{ "l18", 0x5100, "vdd_l8_l11_l15_l18", },
{ }
};
static const struct spmi_regulator_data pm8916_regulators[] = {
{ "s1", 0x1400, "vdd_s1", },
{ "s2", 0x1700, "vdd_s2", },
......@@ -2314,6 +2359,54 @@ static const struct spmi_regulator_data pm8994_regulators[] = {
{ }
};
static const struct spmi_regulator_data pma8084_regulators[] = {
{ "s1", 0x1400, "vdd_s1", },
{ "s2", 0x1700, "vdd_s2", },
{ "s3", 0x1a00, "vdd_s3", },
{ "s4", 0x1d00, "vdd_s4", },
{ "s5", 0x2000, "vdd_s5", },
{ "s6", 0x2300, "vdd_s6", },
{ "s7", 0x2600, "vdd_s7", },
{ "s8", 0x2900, "vdd_s8", },
{ "s9", 0x2c00, "vdd_s9", },
{ "s10", 0x2f00, "vdd_s10", },
{ "s11", 0x3200, "vdd_s11", },
{ "s12", 0x3500, "vdd_s12", },
{ "l1", 0x4000, "vdd_l1_l11", },
{ "l2", 0x4100, "vdd_l2_l3_l4_l27", },
{ "l3", 0x4200, "vdd_l2_l3_l4_l27", },
{ "l4", 0x4300, "vdd_l2_l3_l4_l27", },
{ "l5", 0x4400, "vdd_l5_l7", },
{ "l6", 0x4500, "vdd_l6_l12_l14_l15_l26", },
{ "l7", 0x4600, "vdd_l5_l7", },
{ "l8", 0x4700, "vdd_l8", },
{ "l9", 0x4800, "vdd_l9_l10_l13_l20_l23_l24", },
{ "l10", 0x4900, "vdd_l9_l10_l13_l20_l23_l24", },
{ "l11", 0x4a00, "vdd_l1_l11", },
{ "l12", 0x4b00, "vdd_l6_l12_l14_l15_l26", },
{ "l13", 0x4c00, "vdd_l9_l10_l13_l20_l23_l24", },
{ "l14", 0x4d00, "vdd_l6_l12_l14_l15_l26", },
{ "l15", 0x4e00, "vdd_l6_l12_l14_l15_l26", },
{ "l16", 0x4f00, "vdd_l16_l25", },
{ "l17", 0x5000, "vdd_l17", },
{ "l18", 0x5100, "vdd_l18", },
{ "l19", 0x5200, "vdd_l19", },
{ "l20", 0x5300, "vdd_l9_l10_l13_l20_l23_l24", },
{ "l21", 0x5400, "vdd_l21", },
{ "l22", 0x5500, "vdd_l22", },
{ "l23", 0x5600, "vdd_l9_l10_l13_l20_l23_l24", },
{ "l24", 0x5700, "vdd_l9_l10_l13_l20_l23_l24", },
{ "l25", 0x5800, "vdd_l16_l25", },
{ "l26", 0x5900, "vdd_l6_l12_l14_l15_l26", },
{ "l27", 0x5a00, "vdd_l2_l3_l4_l27", },
{ "lvs1", 0x8000, "vdd_lvs1_2", },
{ "lvs2", 0x8100, "vdd_lvs1_2", },
{ "lvs3", 0x8200, "vdd_lvs3_4", },
{ "lvs4", 0x8300, "vdd_lvs3_4", },
{ "5vs1", 0x8400, "vdd_5vs1", },
{ }
};
static const struct spmi_regulator_data pmi8994_regulators[] = {
{ "s1", 0x1400, "vdd_s1", },
{ "s2", 0x1700, "vdd_s2", },
......@@ -2355,12 +2448,15 @@ static const struct of_device_id qcom_spmi_regulator_match[] = {
{ .compatible = "qcom,pm660l-regulators", .data = &pm660l_regulators },
{ .compatible = "qcom,pm8004-regulators", .data = &pm8004_regulators },
{ .compatible = "qcom,pm8005-regulators", .data = &pm8005_regulators },
{ .compatible = "qcom,pm8019-regulators", .data = &pm8019_regulators },
{ .compatible = "qcom,pm8226-regulators", .data = &pm8226_regulators },
{ .compatible = "qcom,pm8841-regulators", .data = &pm8841_regulators },
{ .compatible = "qcom,pm8909-regulators", .data = &pm8909_regulators },
{ .compatible = "qcom,pm8916-regulators", .data = &pm8916_regulators },
{ .compatible = "qcom,pm8941-regulators", .data = &pm8941_regulators },
{ .compatible = "qcom,pm8950-regulators", .data = &pm8950_regulators },
{ .compatible = "qcom,pm8994-regulators", .data = &pm8994_regulators },
{ .compatible = "qcom,pma8084-regulators", .data = &pma8084_regulators },
{ .compatible = "qcom,pmi8994-regulators", .data = &pmi8994_regulators },
{ .compatible = "qcom,pmp8074-regulators", .data = &pmp8074_regulators },
{ .compatible = "qcom,pms405-regulators", .data = &pms405_regulators },
......@@ -2372,7 +2468,6 @@ static int qcom_spmi_regulator_probe(struct platform_device *pdev)
{
const struct spmi_regulator_data *reg;
const struct spmi_voltage_range *range;
const struct of_device_id *match;
struct regulator_config config = { };
struct regulator_dev *rdev;
struct spmi_regulator *vreg;
......@@ -2395,8 +2490,8 @@ static int qcom_spmi_regulator_probe(struct platform_device *pdev)
if (!regmap)
return -ENODEV;
match = of_match_device(qcom_spmi_regulator_match, &pdev->dev);
if (!match)
reg = device_get_match_data(&pdev->dev);
if (!reg)
return -ENODEV;
if (of_find_property(node, "qcom,saw-reg", &lenp)) {
......@@ -2407,7 +2502,7 @@ static int qcom_spmi_regulator_probe(struct platform_device *pdev)
dev_err(dev, "ERROR reading SAW regmap\n");
}
for (reg = match->data; reg->name; reg++) {
for (; reg->name; reg++) {
if (saw_regmap) {
reg_node = of_get_child_by_name(node, reg->name);
......
......@@ -15,10 +15,8 @@
*/
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_gpio.h>
#include <linux/mfd/rk808.h>
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
......
......@@ -4,7 +4,7 @@
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
......@@ -83,8 +83,7 @@ static int stm32_booster_probe(struct platform_device *pdev)
if (IS_ERR(regmap))
return PTR_ERR(regmap);
desc = (const struct regulator_desc *)
of_match_device(dev->driver->of_match_table, dev)->data;
desc = device_get_match_data(dev);
config.regmap = regmap;
config.dev = dev;
......
......@@ -142,7 +142,7 @@ static int sy8824_i2c_probe(struct i2c_client *client)
}
di->dev = dev;
di->cfg = of_device_get_match_data(dev);
di->cfg = i2c_get_match_data(client);
regmap = devm_regmap_init_i2c(client, di->cfg->config);
if (IS_ERR(regmap)) {
......@@ -204,29 +204,17 @@ static const struct sy8824_config sy20278_cfg = {
};
static const struct of_device_id sy8824_dt_ids[] = {
{
.compatible = "silergy,sy8824c",
.data = &sy8824c_cfg
},
{
.compatible = "silergy,sy8824e",
.data = &sy8824e_cfg
},
{
.compatible = "silergy,sy20276",
.data = &sy20276_cfg
},
{
.compatible = "silergy,sy20278",
.data = &sy20278_cfg
},
{ .compatible = "silergy,sy8824c", .data = &sy8824c_cfg },
{ .compatible = "silergy,sy8824e", .data = &sy8824e_cfg },
{ .compatible = "silergy,sy20276", .data = &sy20276_cfg },
{ .compatible = "silergy,sy20278", .data = &sy20278_cfg },
{ }
};
MODULE_DEVICE_TABLE(of, sy8824_dt_ids);
static const struct i2c_device_id sy8824_id[] = {
{ "sy8824", },
{ },
{ "sy8824", (kernel_ulong_t)&sy8824c_cfg },
{ }
};
MODULE_DEVICE_TABLE(i2c, sy8824_id);
......
......@@ -14,7 +14,6 @@
#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
......@@ -688,7 +687,6 @@ MODULE_DEVICE_TABLE(of, ti_abb_of_match);
static int ti_abb_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
const struct of_device_id *match;
struct resource *res;
struct ti_abb *abb;
struct regulator_init_data *initdata = NULL;
......@@ -699,21 +697,15 @@ static int ti_abb_probe(struct platform_device *pdev)
char *pname;
int ret = 0;
match = of_match_device(ti_abb_of_match, dev);
if (!match) {
/* We do not expect this to happen */
dev_err(dev, "%s: Unable to match device\n", __func__);
return -ENODEV;
}
if (!match->data) {
dev_err(dev, "%s: Bad data in match\n", __func__);
return -EINVAL;
}
abb = devm_kzalloc(dev, sizeof(struct ti_abb), GFP_KERNEL);
if (!abb)
return -ENOMEM;
abb->regs = match->data;
abb->regs = device_get_match_data(dev);
if (!abb->regs) {
dev_err(dev, "%s: Bad data in match\n", __func__);
return -EINVAL;
}
/* Map ABB resources */
if (abb->regs->setup_off || abb->regs->control_off) {
......@@ -866,7 +858,7 @@ static struct platform_driver ti_abb_driver = {
.driver = {
.name = "ti_abb",
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
.of_match_table = of_match_ptr(ti_abb_of_match),
.of_match_table = ti_abb_of_match,
},
};
module_platform_driver(ti_abb_driver);
......
......@@ -16,7 +16,6 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
......@@ -255,16 +254,6 @@ static int tps51632_probe(struct i2c_client *client)
int ret;
struct regulator_config config = { };
if (client->dev.of_node) {
const struct of_device_id *match;
match = of_match_device(of_match_ptr(tps51632_of_match),
&client->dev);
if (!match) {
dev_err(&client->dev, "Error: No device match found\n");
return -ENODEV;
}
}
tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL);
if (!tps)
return -ENOMEM;
......
......@@ -262,6 +262,12 @@
#define MT6358_LDO_VBIF28_CON3 0x1db0
#define MT6358_VCAMA1_ANA_CON0 0x1e08
#define MT6358_VCAMA2_ANA_CON0 0x1e0c
#define MT6358_VFE28_ANA_CON0 0x1e10
#define MT6358_VCN28_ANA_CON0 0x1e14
#define MT6358_VBIF28_ANA_CON0 0x1e18
#define MT6358_VAUD28_ANA_CON0 0x1e1c
#define MT6358_VAUX18_ANA_CON0 0x1e20
#define MT6358_VXO22_ANA_CON0 0x1e24
#define MT6358_VCN33_ANA_CON0 0x1e28
#define MT6358_VSIM1_ANA_CON0 0x1e2c
#define MT6358_VSIM2_ANA_CON0 0x1e30
......@@ -288,4 +294,21 @@
#define MT6358_AUD_TOP_INT_CON0 0x2228
#define MT6358_AUD_TOP_INT_STATUS0 0x2234
/*
* MT6366 has no VCAM*, but has other regulators in its place. The names
* keep the MT6358 prefix for ease of use in the regulator driver.
*/
#define MT6358_LDO_VSRAM_CON5 0x1bf8
#define MT6358_LDO_VM18_CON0 MT6358_LDO_VCAMA1_CON0
#define MT6358_LDO_VM18_CON1 MT6358_LDO_VCAMA1_CON1
#define MT6358_LDO_VM18_CON2 MT6358_LDO_VCAMA1_CON2
#define MT6358_LDO_VMDDR_CON0 MT6358_LDO_VCAMA2_CON0
#define MT6358_LDO_VMDDR_CON1 MT6358_LDO_VCAMA2_CON1
#define MT6358_LDO_VMDDR_CON2 MT6358_LDO_VCAMA2_CON2
#define MT6358_LDO_VSRAM_CORE_CON0 MT6358_LDO_VCAMD_CON0
#define MT6358_LDO_VSRAM_CORE_DBG0 0x1cb6
#define MT6358_LDO_VSRAM_CORE_DBG1 0x1cb8
#define MT6358_VM18_ANA_CON0 MT6358_VCAMA1_ANA_CON0
#define MT6358_VMDDR_ANA_CON0 MT6358_VCAMD_ANA_CON0
#endif /* __MFD_MT6358_REGISTERS_H__ */
......@@ -86,6 +86,9 @@ enum {
MT6366_ID_VMC,
MT6366_ID_VAUD28,
MT6366_ID_VSIM2,
MT6366_ID_VM18,
MT6366_ID_VMDDR,
MT6366_ID_VSRAM_CORE,
MT6366_ID_RG_MAX,
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment