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

TOMOYO Linux Cross Reference
Linux/include/linux/mfd/tps6586x.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ 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.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef __LINUX_MFD_TPS6586X_H
  3 #define __LINUX_MFD_TPS6586X_H
  4 
  5 #define TPS6586X_SLEW_RATE_INSTANTLY    0x00
  6 #define TPS6586X_SLEW_RATE_110UV        0x01
  7 #define TPS6586X_SLEW_RATE_220UV        0x02
  8 #define TPS6586X_SLEW_RATE_440UV        0x03
  9 #define TPS6586X_SLEW_RATE_880UV        0x04
 10 #define TPS6586X_SLEW_RATE_1760UV       0x05
 11 #define TPS6586X_SLEW_RATE_3520UV       0x06
 12 #define TPS6586X_SLEW_RATE_7040UV       0x07
 13 
 14 #define TPS6586X_SLEW_RATE_SET          0x08
 15 #define TPS6586X_SLEW_RATE_MASK         0x07
 16 
 17 /* VERSION CRC */
 18 #define TPS658621A      0x15
 19 #define TPS658621CD     0x2c
 20 #define TPS658623       0x1b
 21 #define TPS658624       0x0a
 22 #define TPS658640       0x01
 23 #define TPS658640v2     0x02
 24 #define TPS658643       0x03
 25 
 26 enum {
 27         TPS6586X_ID_SYS,
 28         TPS6586X_ID_SM_0,
 29         TPS6586X_ID_SM_1,
 30         TPS6586X_ID_SM_2,
 31         TPS6586X_ID_LDO_0,
 32         TPS6586X_ID_LDO_1,
 33         TPS6586X_ID_LDO_2,
 34         TPS6586X_ID_LDO_3,
 35         TPS6586X_ID_LDO_4,
 36         TPS6586X_ID_LDO_5,
 37         TPS6586X_ID_LDO_6,
 38         TPS6586X_ID_LDO_7,
 39         TPS6586X_ID_LDO_8,
 40         TPS6586X_ID_LDO_9,
 41         TPS6586X_ID_LDO_RTC,
 42         TPS6586X_ID_MAX_REGULATOR,
 43 };
 44 
 45 enum {
 46         TPS6586X_INT_PLDO_0,
 47         TPS6586X_INT_PLDO_1,
 48         TPS6586X_INT_PLDO_2,
 49         TPS6586X_INT_PLDO_3,
 50         TPS6586X_INT_PLDO_4,
 51         TPS6586X_INT_PLDO_5,
 52         TPS6586X_INT_PLDO_6,
 53         TPS6586X_INT_PLDO_7,
 54         TPS6586X_INT_COMP_DET,
 55         TPS6586X_INT_ADC,
 56         TPS6586X_INT_PLDO_8,
 57         TPS6586X_INT_PLDO_9,
 58         TPS6586X_INT_PSM_0,
 59         TPS6586X_INT_PSM_1,
 60         TPS6586X_INT_PSM_2,
 61         TPS6586X_INT_PSM_3,
 62         TPS6586X_INT_RTC_ALM1,
 63         TPS6586X_INT_ACUSB_OVP,
 64         TPS6586X_INT_USB_DET,
 65         TPS6586X_INT_AC_DET,
 66         TPS6586X_INT_BAT_DET,
 67         TPS6586X_INT_CHG_STAT,
 68         TPS6586X_INT_CHG_TEMP,
 69         TPS6586X_INT_PP,
 70         TPS6586X_INT_RESUME,
 71         TPS6586X_INT_LOW_SYS,
 72         TPS6586X_INT_RTC_ALM2,
 73 };
 74 
 75 struct tps6586x_settings {
 76         int slew_rate;
 77 };
 78 
 79 struct tps6586x_subdev_info {
 80         int             id;
 81         const char      *name;
 82         void            *platform_data;
 83         struct device_node *of_node;
 84 };
 85 
 86 struct tps6586x_platform_data {
 87         int num_subdevs;
 88         struct tps6586x_subdev_info *subdevs;
 89 
 90         int gpio_base;
 91         int irq_base;
 92         bool pm_off;
 93 
 94         struct regulator_init_data *reg_init_data[TPS6586X_ID_MAX_REGULATOR];
 95 };
 96 
 97 /*
 98  * NOTE: the functions below are not intended for use outside
 99  * of the TPS6586X sub-device drivers
100  */
101 extern int tps6586x_write(struct device *dev, int reg, uint8_t val);
102 extern int tps6586x_writes(struct device *dev, int reg, int len, uint8_t *val);
103 extern int tps6586x_read(struct device *dev, int reg, uint8_t *val);
104 extern int tps6586x_reads(struct device *dev, int reg, int len, uint8_t *val);
105 extern int tps6586x_set_bits(struct device *dev, int reg, uint8_t bit_mask);
106 extern int tps6586x_clr_bits(struct device *dev, int reg, uint8_t bit_mask);
107 extern int tps6586x_update(struct device *dev, int reg, uint8_t val,
108                            uint8_t mask);
109 extern int tps6586x_irq_get_virq(struct device *dev, int irq);
110 extern int tps6586x_get_version(struct device *dev);
111 
112 #endif /*__LINUX_MFD_TPS6586X_H */
113 

~ [ 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