~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/mfd/rohm-generic.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /* Copyright (C) 2018 ROHM Semiconductors */
  3 
  4 #ifndef __LINUX_MFD_ROHM_H__
  5 #define __LINUX_MFD_ROHM_H__
  6 
  7 #include <linux/regmap.h>
  8 #include <linux/regulator/driver.h>
  9 
 10 enum rohm_chip_type {
 11         ROHM_CHIP_TYPE_BD9571,
 12         ROHM_CHIP_TYPE_BD9573,
 13         ROHM_CHIP_TYPE_BD9574,
 14         ROHM_CHIP_TYPE_BD9576,
 15         ROHM_CHIP_TYPE_BD71815,
 16         ROHM_CHIP_TYPE_BD71828,
 17         ROHM_CHIP_TYPE_BD71837,
 18         ROHM_CHIP_TYPE_BD71847,
 19         ROHM_CHIP_TYPE_BD96801,
 20         ROHM_CHIP_TYPE_AMOUNT
 21 };
 22 
 23 struct rohm_regmap_dev {
 24         struct device *dev;
 25         struct regmap *regmap;
 26 };
 27 
 28 #define ROHM_DVS_LEVEL_RUN              BIT(0)
 29 #define ROHM_DVS_LEVEL_IDLE             BIT(1)
 30 #define ROHM_DVS_LEVEL_SUSPEND          BIT(2)
 31 #define ROHM_DVS_LEVEL_LPSR             BIT(3)
 32 #define ROHM_DVS_LEVEL_SNVS             BIT(4)
 33 #define ROHM_DVS_LEVEL_VALID_AMOUNT     5
 34 #define ROHM_DVS_LEVEL_UNKNOWN          0
 35 
 36 /**
 37  * struct rohm_dvs_config - dynamic voltage scaling register descriptions
 38  *
 39  * @level_map:          bitmap representing supported run-levels for this
 40  *                      regulator
 41  * @run_reg:            register address for regulator config at 'run' state
 42  * @run_mask:           value mask for regulator voltages at 'run' state
 43  * @run_on_mask:        enable mask for regulator at 'run' state
 44  * @idle_reg:           register address for regulator config at 'idle' state
 45  * @idle_mask:          value mask for regulator voltages at 'idle' state
 46  * @idle_on_mask:       enable mask for regulator at 'idle' state
 47  * @suspend_reg:        register address for regulator config at 'suspend' state
 48  * @suspend_mask:       value mask for regulator voltages at 'suspend' state
 49  * @suspend_on_mask:    enable mask for regulator at 'suspend' state
 50  * @lpsr_reg:           register address for regulator config at 'lpsr' state
 51  * @lpsr_mask:          value mask for regulator voltages at 'lpsr' state
 52  * @lpsr_on_mask:       enable mask for regulator at 'lpsr' state
 53  *
 54  * Description of ROHM PMICs voltage configuration registers for different
 55  * system states. This is used to correctly configure the PMIC at startup
 56  * based on values read from DT.
 57  */
 58 struct rohm_dvs_config {
 59         uint64_t level_map;
 60         unsigned int run_reg;
 61         unsigned int run_mask;
 62         unsigned int run_on_mask;
 63         unsigned int idle_reg;
 64         unsigned int idle_mask;
 65         unsigned int idle_on_mask;
 66         unsigned int suspend_reg;
 67         unsigned int suspend_mask;
 68         unsigned int suspend_on_mask;
 69         unsigned int lpsr_reg;
 70         unsigned int lpsr_mask;
 71         unsigned int lpsr_on_mask;
 72         unsigned int snvs_reg;
 73         unsigned int snvs_mask;
 74         unsigned int snvs_on_mask;
 75 };
 76 
 77 #if IS_ENABLED(CONFIG_REGULATOR_ROHM)
 78 int rohm_regulator_set_dvs_levels(const struct rohm_dvs_config *dvs,
 79                                   struct device_node *np,
 80                                   const struct regulator_desc *desc,
 81                                   struct regmap *regmap);
 82 
 83 int rohm_regulator_set_voltage_sel_restricted(struct regulator_dev *rdev,
 84                                               unsigned int sel);
 85 #endif
 86 
 87 #endif
 88 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php