mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
fa722ecb93
- Add support for Lakefield PCH to Intel LPSS PCI - Remove Device Support - Remove support for ROHM BD70528 Power Management IC - New Functionality - Add support for SMBus and I2C mode to Dialog DA9062/61 PMIC - Enable I2C4 on Microsoft Surface Go & Go 2 - Fix-ups - Device Tree changes (inc. YAML conversion); maxim,max77686, rohm,bd9571mwv, syscon, brcm,twd, google,cros-ec - Use __maybe_unused instead of #ifery; atmel-flexcom - Allow the Regmap API to handle endianess internally; ntxec - Utilise I2C's .resume_noirq call-back; atmel-flexcom - Remove unused code; ti_am335x_tscadc - Use CPU-id instead of ACPI _HRV to ID variants; intel_soc_pmic_core - Allow device to power-off right from .probe(); tps65910 - Trivial (whitespace, typos, etc); da9063 - Bug Fixes - Fix ordering issues during probe; intel-lpss-acpi - Fix correct clock speed; intel-lpss-pci -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmHddokACgkQUa+KL4f8 d2EWoRAAk3RX5VEsHO3yu5P5ElEz95BpXnyZDI3/C5a2DNPLnatqb0ATqEuEgBaC VP3QEF3N+7vMPQBe7Bh3WOS+sFNAciAg3cudP7dwxQUeb/Yh8Vv1vTPFenJ23Ygh ETZ2NDSnQnBRa2spg3aYnFG45r7Hao2froxF4il9Lu5Vx6nBMqnK/WGEWBhbuldq 6E30RLHjLyFGO7QP7gjliBIa/4b0Qj8JkzpiXR6wfEAZBBxOTk23cNnFtiwTsWg+ KBpoPzcUimIcpz4urAGhGbkONy8GojKkNbDvxXuntIAenTnCOkcb9ADxxuXRSAMi rG2pt/57DDT03qCwHVnRGw+0YAUoaWq96VKqkjoIzlaXZ8j/8wLSG1ZXDaqPR0Ds lEdi9QcAruzffpRJUIy6YgVy5wLdRaBNXOZfv5ADJPJaodq2koXtoY5s372dL+i7 cneA1w79RcfjJDQ3P8zBs4We0eEdesIyqbVYLq4E0GGrG3ck4+sCEEiHxUcFGeS9 XkYHaB2VU1PAXa5qqmJSdm+qw6yK0ls5BpORGV9hizy/iMvjOnHCX/k0kmgfNlVi y7lsrv2hKSqXGEENU1YY4Ah0gotop8l6ck6drWme5eWvGXmciNQWtiY7VxMFV4fT FIqVNKxxh5W/EHMFrFk3Wl17tEDL3biwIFiUlxPs1a2JWcilwrI= =acuh -----END PGP SIGNATURE----- Merge tag 'mfd-next-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Device Support: - Add support for Lakefield PCH to Intel LPSS PCI Remove Device Support: - Remove support for ROHM BD70528 Power Management IC New Functionality: - Add support for SMBus and I2C mode to Dialog DA9062/61 PMIC - Enable I2C4 on Microsoft Surface Go & Go 2 Fix-ups: - Device Tree changes (inc. YAML conversion); maxim,max77686, rohm,bd9571mwv, syscon, brcm,twd, google,cros-ec - Use __maybe_unused instead of #ifery; atmel-flexcom - Allow the Regmap API to handle endianess internally; ntxec - Utilise I2C's .resume_noirq call-back; atmel-flexcom - Remove unused code; ti_am335x_tscadc - Use CPU-id instead of ACPI _HRV to ID variants; intel_soc_pmic_core - Allow device to power-off right from .probe(); tps65910 - Trivial (whitespace, typos, etc); da9063 Bug Fixes: - Fix ordering issues during probe; intel-lpss-acpi - Fix correct clock speed; intel-lpss-pci" * tag 'mfd-next-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (25 commits) mfd: google,cros-ec: Fix property name for MediaTek rpmsg dt-bindings: mfd: Fix typo "DA9093" -> "DA9063" mfd: ntxec: Change return type of ntxec_reg8 from __be16 to u16 mfd: tps65910: Set PWR_OFF bit during driver probe mfd: intel_soc_pmic: Use CPU-id check instead of _HRV check to differentiate variants mfd: intel-lpss: Fix I2C4 not being available on the Microsoft Surface Go & Go 2 dt-bindings: mfd: Add Broadcom's Timer-Watchdog block dt-bindings: mfd: Add Freecom system controller mfd: Kconfig: Change INTEL_SOC_PMIC_CHTDC_TI to bool dt-bindings: mfd: syscon: Add samsung,exynos850-sysreg mfd: da9062: Support SMBus and I2C mode mfd: intel-lpss-pci: Fix clock speed for 38a8 UART mfd: intel-lpss: Fix too early PM enablement in the ACPI ->probe() mfd: ti_am335x_tscadc: Drop the CNTRLREG_TSC_8WIRE macro mfd: stmpe: Support disabling sub-functions mfd: atmel-flexcom: Use .resume_noirq mfd: atmel-flexcom: Remove #ifdef CONFIG_PM_SLEEP dt-bindings: mfd: bd9571mwv: Convert to json-schema mfd: intel-lpss: Add Intel Lakefield PCH PCI IDs dt-bindings: mfd: maxim,max77686: Convert to dtschema ...
87 lines
2.6 KiB
C
87 lines
2.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/* Copyright (C) 2018 ROHM Semiconductors */
|
|
|
|
#ifndef __LINUX_MFD_ROHM_H__
|
|
#define __LINUX_MFD_ROHM_H__
|
|
|
|
#include <linux/regmap.h>
|
|
#include <linux/regulator/driver.h>
|
|
|
|
enum rohm_chip_type {
|
|
ROHM_CHIP_TYPE_BD9571,
|
|
ROHM_CHIP_TYPE_BD9573,
|
|
ROHM_CHIP_TYPE_BD9574,
|
|
ROHM_CHIP_TYPE_BD9576,
|
|
ROHM_CHIP_TYPE_BD71815,
|
|
ROHM_CHIP_TYPE_BD71828,
|
|
ROHM_CHIP_TYPE_BD71837,
|
|
ROHM_CHIP_TYPE_BD71847,
|
|
ROHM_CHIP_TYPE_AMOUNT
|
|
};
|
|
|
|
struct rohm_regmap_dev {
|
|
struct device *dev;
|
|
struct regmap *regmap;
|
|
};
|
|
|
|
#define ROHM_DVS_LEVEL_RUN BIT(0)
|
|
#define ROHM_DVS_LEVEL_IDLE BIT(1)
|
|
#define ROHM_DVS_LEVEL_SUSPEND BIT(2)
|
|
#define ROHM_DVS_LEVEL_LPSR BIT(3)
|
|
#define ROHM_DVS_LEVEL_SNVS BIT(4)
|
|
#define ROHM_DVS_LEVEL_VALID_AMOUNT 5
|
|
#define ROHM_DVS_LEVEL_UNKNOWN 0
|
|
|
|
/**
|
|
* struct rohm_dvs_config - dynamic voltage scaling register descriptions
|
|
*
|
|
* @level_map: bitmap representing supported run-levels for this
|
|
* regulator
|
|
* @run_reg: register address for regulator config at 'run' state
|
|
* @run_mask: value mask for regulator voltages at 'run' state
|
|
* @run_on_mask: enable mask for regulator at 'run' state
|
|
* @idle_reg: register address for regulator config at 'idle' state
|
|
* @idle_mask: value mask for regulator voltages at 'idle' state
|
|
* @idle_on_mask: enable mask for regulator at 'idle' state
|
|
* @suspend_reg: register address for regulator config at 'suspend' state
|
|
* @suspend_mask: value mask for regulator voltages at 'suspend' state
|
|
* @suspend_on_mask: enable mask for regulator at 'suspend' state
|
|
* @lpsr_reg: register address for regulator config at 'lpsr' state
|
|
* @lpsr_mask: value mask for regulator voltages at 'lpsr' state
|
|
* @lpsr_on_mask: enable mask for regulator at 'lpsr' state
|
|
*
|
|
* Description of ROHM PMICs voltage configuration registers for different
|
|
* system states. This is used to correctly configure the PMIC at startup
|
|
* based on values read from DT.
|
|
*/
|
|
struct rohm_dvs_config {
|
|
uint64_t level_map;
|
|
unsigned int run_reg;
|
|
unsigned int run_mask;
|
|
unsigned int run_on_mask;
|
|
unsigned int idle_reg;
|
|
unsigned int idle_mask;
|
|
unsigned int idle_on_mask;
|
|
unsigned int suspend_reg;
|
|
unsigned int suspend_mask;
|
|
unsigned int suspend_on_mask;
|
|
unsigned int lpsr_reg;
|
|
unsigned int lpsr_mask;
|
|
unsigned int lpsr_on_mask;
|
|
unsigned int snvs_reg;
|
|
unsigned int snvs_mask;
|
|
unsigned int snvs_on_mask;
|
|
};
|
|
|
|
#if IS_ENABLED(CONFIG_REGULATOR_ROHM)
|
|
int rohm_regulator_set_dvs_levels(const struct rohm_dvs_config *dvs,
|
|
struct device_node *np,
|
|
const struct regulator_desc *desc,
|
|
struct regmap *regmap);
|
|
|
|
int rohm_regulator_set_voltage_sel_restricted(struct regulator_dev *rdev,
|
|
unsigned int sel);
|
|
#endif
|
|
|
|
#endif
|