summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-06-20 04:13:09 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2026-06-20 04:13:09 +0300
commit390d73adf896bf4883c7d3bcd13c1b53d64351e3 (patch)
tree74dc30d42adf8edf169efd51e3f5b6e2d8d3d118 /include
parent1a3746ccbb0a97bed3c06ccde6b880013b1dddc1 (diff)
parenta888754e51e915731c8974c4d6d62709facb35d3 (diff)
downloadlinux-390d73adf896bf4883c7d3bcd13c1b53d64351e3.tar.xz
Merge tag 'for-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply
Pull power supply and reset updates from Sebastian Reichel: "Power-supply drivers: - New EC driver providing battery info for Microsoft Surface RT - New driver for battery charger in Samsung S2M PMICs - Rework max17042 driver - sysfs control for bd71828 auto input current limitation All over: - Use named fields for struct platform_device_id and of_device_id entries - Misc small cleanups and fixes" * tag 'for-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (33 commits) Documentation: ABI: sysfs-class-reboot-mode-reboot_modes: fix doc warnings power: supply: charger-manager: fix refcount leak in is_full_charged() power: supply: core: fix supplied_from allocations power: supply: max17042_battery: Use modern PM ops to clear up warning power: supply: add support for Samsung S2M series PMIC charger device power: supply: Add support for Surface RT battery and charger dt-bindings: embedded-controller: Document Surface RT EC power: supply: bd71828: sysfs for auto input current limitation power: supply: cpcap-charger: include missing <linux/property.h> power: supply: cros_charge-control: Move MODULE_DEVICE_TABLE next to the table itself power: supply: ab8500_fg: Fix typos in comments power: supply: Use named initializers for arrays of i2c_device_data power: supply: Remove unused jz4740-battery.h power: reset: st-poweroff: Use of_device_get_match_data() power: supply: bq257xx: Add fields for 'charging' and 'overvoltage' states power: supply: bq257xx: Consistently use indirect get/set helpers power: supply: bq257xx: Make the default current limit a per-chip attribute power: supply: bq257xx: Fix VSYSMIN clamping logic power: supply: cpcap-battery: Fix missing nvmem_device_put() causing reference leak power: supply: max17042: fix OF node reference imbalance ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/power/max17042_battery.h32
1 files changed, 3 insertions, 29 deletions
diff --git a/include/linux/power/max17042_battery.h b/include/linux/power/max17042_battery.h
index d5b08313cf11..13aeab1597c6 100644
--- a/include/linux/power/max17042_battery.h
+++ b/include/linux/power/max17042_battery.h
@@ -24,6 +24,8 @@
#define MAX17042_CHARACTERIZATION_DATA_SIZE 48
+#define MAX17055_MODELCFG_REFRESH_BIT BIT(15)
+
enum max17042_register {
MAX17042_STATUS = 0x00,
MAX17042_VALRT_Th = 0x01,
@@ -198,16 +200,6 @@ enum max170xx_chip_type {
MAXIM_DEVICE_TYPE_NUM
};
-/*
- * used for setting a register to a desired value
- * addr : address for a register
- * data : setting value for the register
- */
-struct max17042_reg_data {
- u8 addr;
- u16 data;
-};
-
struct max17042_config_data {
/* External current sense resistor value in milli-ohms */
u32 cur_sense_val;
@@ -229,6 +221,7 @@ struct max17042_config_data {
u16 full_soc_thresh; /* 0x13 */
u16 design_cap; /* 0x18 */
u16 ichgt_term; /* 0x1E */
+ u16 model_cfg; /* 0xDB */
/* MG3 config */
u16 at_rate; /* 0x04 */
@@ -265,23 +258,4 @@ struct max17042_config_data {
u16 cell_char_tbl[MAX17042_CHARACTERIZATION_DATA_SIZE];
} __packed;
-struct max17042_platform_data {
- struct max17042_reg_data *init_data;
- struct max17042_config_data *config_data;
- int num_init_data; /* Number of enties in init_data array */
- bool enable_current_sense;
- bool enable_por_init; /* Use POR init from Maxim appnote */
-
- /*
- * R_sns in micro-ohms.
- * default 10000 (if r_sns = 0) as it is the recommended value by
- * the datasheet although it can be changed by board designers.
- */
- unsigned int r_sns;
- int vmin; /* in millivolts */
- int vmax; /* in millivolts */
- int temp_min; /* in tenths of degree Celsius */
- int temp_max; /* in tenths of degree Celsius */
-};
-
#endif /* __MAX17042_BATTERY_H_ */