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

TOMOYO Linux Cross Reference
Linux/include/linux/mfd/max14577.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 ] ~

Diff markup

Differences between /include/linux/mfd/max14577.h (Version linux-6.12-rc7) and /include/linux/mfd/max14577.h (Version linux-5.3.18)


  1 /* SPDX-License-Identifier: GPL-2.0+ */             1 /* SPDX-License-Identifier: GPL-2.0+ */
  2 /*                                                  2 /*
  3  * max14577.h - Driver for the Maxim 14577/778      3  * max14577.h - Driver for the Maxim 14577/77836
  4  *                                                  4  *
  5  * Copyright (C) 2014 Samsung Electrnoics           5  * Copyright (C) 2014 Samsung Electrnoics
  6  * Chanwoo Choi <cw00.choi@samsung.com>             6  * Chanwoo Choi <cw00.choi@samsung.com>
  7  * Krzysztof Kozlowski <krzk@kernel.org>            7  * Krzysztof Kozlowski <krzk@kernel.org>
  8  *                                                  8  *
  9  * This driver is based on max8997.h                9  * This driver is based on max8997.h
 10  *                                                 10  *
 11  * MAX14577 has MUIC, Charger devices.             11  * MAX14577 has MUIC, Charger devices.
 12  * The devices share the same I2C bus and inte     12  * The devices share the same I2C bus and interrupt line
 13  * included in this mfd driver.                    13  * included in this mfd driver.
 14  *                                                 14  *
 15  * MAX77836 has additional PMIC and Fuel-Gauge     15  * MAX77836 has additional PMIC and Fuel-Gauge on different I2C slave
 16  * addresses.                                      16  * addresses.
 17  */                                                17  */
 18                                                    18 
 19 #ifndef __MAX14577_H__                             19 #ifndef __MAX14577_H__
 20 #define __MAX14577_H__                             20 #define __MAX14577_H__
 21                                                    21 
 22 #include <linux/regulator/consumer.h>              22 #include <linux/regulator/consumer.h>
 23                                                    23 
 24 /* MAX14577 regulator IDs */                       24 /* MAX14577 regulator IDs */
 25 enum max14577_regulators {                         25 enum max14577_regulators {
 26         MAX14577_SAFEOUT = 0,                      26         MAX14577_SAFEOUT = 0,
 27         MAX14577_CHARGER,                          27         MAX14577_CHARGER,
 28                                                    28 
 29         MAX14577_REGULATOR_NUM,                    29         MAX14577_REGULATOR_NUM,
 30 };                                                 30 };
 31                                                    31 
 32 /* MAX77836 regulator IDs */                       32 /* MAX77836 regulator IDs */
 33 enum max77836_regulators {                         33 enum max77836_regulators {
 34         MAX77836_SAFEOUT = 0,                      34         MAX77836_SAFEOUT = 0,
 35         MAX77836_CHARGER,                          35         MAX77836_CHARGER,
 36         MAX77836_LDO1,                             36         MAX77836_LDO1,
 37         MAX77836_LDO2,                             37         MAX77836_LDO2,
 38                                                    38 
 39         MAX77836_REGULATOR_NUM,                    39         MAX77836_REGULATOR_NUM,
 40 };                                                 40 };
 41                                                    41 
 42 struct max14577_regulator_platform_data {          42 struct max14577_regulator_platform_data {
 43         int id;                                    43         int id;
 44         struct regulator_init_data *initdata;      44         struct regulator_init_data *initdata;
 45         struct device_node *of_node;               45         struct device_node *of_node;
 46 };                                                 46 };
 47                                                    47 
 48 struct max14577_charger_platform_data {            48 struct max14577_charger_platform_data {
 49         u32 constant_uvolt;                        49         u32 constant_uvolt;
 50         u32 fast_charge_uamp;                      50         u32 fast_charge_uamp;
 51         u32 eoc_uamp;                              51         u32 eoc_uamp;
 52         u32 ovp_uvolt;                             52         u32 ovp_uvolt;
 53 };                                                 53 };
 54                                                    54 
 55 /*                                                 55 /*
 56  * MAX14577 MFD platform data                      56  * MAX14577 MFD platform data
 57  */                                                57  */
 58 struct max14577_platform_data {                    58 struct max14577_platform_data {
 59         /* IRQ */                                  59         /* IRQ */
 60         int irq_base;                              60         int irq_base;
 61                                                    61 
 62         /* current control GPIOs */                62         /* current control GPIOs */
 63         int gpio_pogo_vbatt_en;                    63         int gpio_pogo_vbatt_en;
 64         int gpio_pogo_vbus_en;                     64         int gpio_pogo_vbus_en;
 65                                                    65 
 66         /* current control GPIO control functi     66         /* current control GPIO control function */
 67         int (*set_gpio_pogo_vbatt_en) (int gpi     67         int (*set_gpio_pogo_vbatt_en) (int gpio_val);
 68         int (*set_gpio_pogo_vbus_en) (int gpio     68         int (*set_gpio_pogo_vbus_en) (int gpio_val);
 69                                                    69 
 70         int (*set_gpio_pogo_cb) (int new_dev);     70         int (*set_gpio_pogo_cb) (int new_dev);
 71                                                    71 
 72         struct max14577_regulator_platform_dat     72         struct max14577_regulator_platform_data *regulators;
 73 };                                                 73 };
 74                                                    74 
 75 /*                                                 75 /*
 76  * Valid limits of current for max14577 and ma     76  * Valid limits of current for max14577 and max77836 chargers.
 77  * They must correspond to MBCICHWRCL and MBCI     77  * They must correspond to MBCICHWRCL and MBCICHWRCH fields in CHGCTRL4
 78  * register for given chipset.                     78  * register for given chipset.
 79  */                                                79  */
 80 struct maxim_charger_current {                     80 struct maxim_charger_current {
 81         /* Minimal current, set in CHGCTRL4/MB     81         /* Minimal current, set in CHGCTRL4/MBCICHWRCL, uA */
 82         unsigned int min;                          82         unsigned int min;
 83         /*                                         83         /*
 84          * Minimal current when high setting i     84          * Minimal current when high setting is active,
 85          * set in CHGCTRL4/MBCICHWRCH, uA          85          * set in CHGCTRL4/MBCICHWRCH, uA
 86          */                                        86          */
 87         unsigned int high_start;                   87         unsigned int high_start;
 88         /* Value of one step in high setting,      88         /* Value of one step in high setting, uA */
 89         unsigned int high_step;                    89         unsigned int high_step;
 90         /* Maximum current of high setting, uA     90         /* Maximum current of high setting, uA */
 91         unsigned int max;                          91         unsigned int max;
 92 };                                                 92 };
 93                                                    93 
 94 extern const struct maxim_charger_current maxi     94 extern const struct maxim_charger_current maxim_charger_currents[];
 95 extern int maxim_charger_calc_reg_current(cons     95 extern int maxim_charger_calc_reg_current(const struct maxim_charger_current *limits,
 96                 unsigned int min_ua, unsigned      96                 unsigned int min_ua, unsigned int max_ua, u8 *dst);
 97                                                    97 
 98 #endif /* __MAX14577_H__ */                        98 #endif /* __MAX14577_H__ */
 99                                                    99 

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