power supply and reset changes for the v5.18 series
power-supply core:
- Introduce "Bypass" charging type used by USB PPS standard
- Refactor power_supply_set_input_current_limit_from_supplier()
- Add fwnode support to power_supply_get_battery_info()
Drivers:
- ab8500: continue migrating towards using standard core APIs
- axp288 fuel-gauge: refactor driver to be fully resource managed
- battery-samsung-sdi: new in-kernel provider for (constant) Samsung battery info
- bq24190: disable boost regulator on shutdown
- bq24190: add support for battery-info on ACPI based systems
- bq25890: prepare driver for usage on ACPI based systems
- bq25890: add boost regulator support
- cpcap-battery: add NVMEM based battery detection support
- injoinic ip5xxx: new driver for power bank IC
- upi ug3105: new battery driver
- misc. small improvements and fixes
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmI4ub0ACgkQ2O7X88g7
+poBBg/+OTb2O+dJsigwT9q2HKz98oPSwd+Zd0L/s1hCtc4AhlsNPHimEOYslvOl
WN3auTQO1rjB4gi73p9A5NKTiAMTnXuCXoY0pLRgkcKybHGzliDqPY99Em1VqLHT
OdJ+xG1qdk34T5hLW6ZfHV1VlB1J6u/JZbXyGbBzZ2r1mP3sLpWCW87cRTuBpaXD
vmdWBRhYdz47pJS0PQs4TI7nFWoCvLB6Hmqe79zTI4hgRkKS05XeU3HXu+npdtdS
2OmPKwVcHIeuI3blTvtn7pHiX1j4Le319mmlOtwtdeEr70ONng9p2L6GPhW88ewH
1AZG58V6hFInMKKVHBbftEHybZ7wEc9CmjQ+l6VVdwHAgWwQEijsY3aG+fQ41Yw/
x1IRMMv5SO0A2amZ+mMxmIs7aQ0OXe78n8DiDPnhSWdh7q7+KgzXlBawmWDEZ9LZ
HUcfDOQ+EISfg9F81Q7KKVDsSClUk2zIVbs944Y/4emT78XQjPq/NPlLpfwy0kMC
46lIO5prhWqe8WXtqkyR7x04nkrzo9Q/yWuj959l+bYACAtns8zQNZ+f8O2TvJ7V
Is2DoaT5fELUD2D8NOla5RYZAtPzkfDf3iaNOLG7mkzGuz1RPcn3mgl0+a760AiZ
poNmjfaKlY0d1WHc8AoxZgoKZxDZ3ckjAt8YzI/QT0RXEvoBEtY=
=OiYc
-----END PGP SIGNATURE-----
Merge tag 'for-v5.18' 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 core:
- Introduce "Bypass" charging type used by USB PPS standard
- Refactor power_supply_set_input_current_limit_from_supplier()
- Add fwnode support to power_supply_get_battery_info()
Drivers:
- ab8500: continue migrating towards using standard core APIs
- axp288 fuel-gauge: refactor driver to be fully resource managed
- battery-samsung-sdi: new in-kernel provider for (constant) Samsung
battery info
- bq24190: disable boost regulator on shutdown
- bq24190: add support for battery-info on ACPI based systems
- bq25890: prepare driver for usage on ACPI based systems
- bq25890: add boost regulator support
- cpcap-battery: add NVMEM based battery detection support
- injoinic ip5xxx: new driver for power bank IC
- upi ug3105: new battery driver
- misc small improvements and fixes"
* tag 'for-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (94 commits)
power: ab8500_chargalg: Use CLOCK_MONOTONIC
power: supply: Add a driver for Injoinic power bank ICs
dt-bindings: trivial-devices: Add Injoinic power bank ICs
dt-bindings: vendor-prefixes: Add Injoinic
power: supply: ab8500: Remove unused variable
power: supply: da9150-fg: Remove unnecessary print function dev_err()
power: supply: ab8500: fix a handful of spelling mistakes
power: supply: ab8500_fg: Account for line impedance
dt-bindings: power: supply: ab8500_fg: Add line impedance
power: supply: axp20x_usb_power: fix platform_get_irq.cocci warnings
power: supply: axp20x_ac_power: fix platform_get_irq.cocci warning
power: supply: wm8350-power: Add missing free in free_charger_irq
power: supply: wm8350-power: Handle error for wm8350_register_irq
power: supply: Static data for Samsung batteries
power: supply: ab8500_fg: Use VBAT-to-Ri if possible
power: supply: Support VBAT-to-Ri lookup tables
power: supply: ab8500: Standardize BTI resistance
power: supply: ab8500: Standardize alert mode charging
power: supply: ab8500: Standardize maintenance charging
power: supply: bq24190_charger: Delay applying charge_type changes when OTG 5V Vbus boost is on
...
This commit is contained in:
commit
8eb48fc7c5
50 changed files with 4137 additions and 1448 deletions
|
|
@ -3386,6 +3386,9 @@ enum ec_mkbp_event {
|
|||
/* Send an incoming CEC message to the AP */
|
||||
EC_MKBP_EVENT_CEC_MESSAGE = 9,
|
||||
|
||||
/* Peripheral device charger event */
|
||||
EC_MKBP_EVENT_PCHG = 12,
|
||||
|
||||
/* Number of MKBP events */
|
||||
EC_MKBP_EVENT_COUNT,
|
||||
};
|
||||
|
|
@ -5527,6 +5530,67 @@ enum pchg_state {
|
|||
[PCHG_STATE_CONNECTED] = "CONNECTED", \
|
||||
}
|
||||
|
||||
/*
|
||||
* Update firmware of peripheral chip
|
||||
*/
|
||||
#define EC_CMD_PCHG_UPDATE 0x0136
|
||||
|
||||
/* Port number is encoded in bit[28:31]. */
|
||||
#define EC_MKBP_PCHG_PORT_SHIFT 28
|
||||
/* Utility macro for converting MKBP event to port number. */
|
||||
#define EC_MKBP_PCHG_EVENT_TO_PORT(e) (((e) >> EC_MKBP_PCHG_PORT_SHIFT) & 0xf)
|
||||
/* Utility macro for extracting event bits. */
|
||||
#define EC_MKBP_PCHG_EVENT_MASK(e) ((e) \
|
||||
& GENMASK(EC_MKBP_PCHG_PORT_SHIFT-1, 0))
|
||||
|
||||
#define EC_MKBP_PCHG_UPDATE_OPENED BIT(0)
|
||||
#define EC_MKBP_PCHG_WRITE_COMPLETE BIT(1)
|
||||
#define EC_MKBP_PCHG_UPDATE_CLOSED BIT(2)
|
||||
#define EC_MKBP_PCHG_UPDATE_ERROR BIT(3)
|
||||
#define EC_MKBP_PCHG_DEVICE_EVENT BIT(4)
|
||||
|
||||
enum ec_pchg_update_cmd {
|
||||
/* Reset chip to normal mode. */
|
||||
EC_PCHG_UPDATE_CMD_RESET_TO_NORMAL = 0,
|
||||
/* Reset and put a chip in update (a.k.a. download) mode. */
|
||||
EC_PCHG_UPDATE_CMD_OPEN,
|
||||
/* Write a block of data containing FW image. */
|
||||
EC_PCHG_UPDATE_CMD_WRITE,
|
||||
/* Close update session. */
|
||||
EC_PCHG_UPDATE_CMD_CLOSE,
|
||||
/* End of commands */
|
||||
EC_PCHG_UPDATE_CMD_COUNT,
|
||||
};
|
||||
|
||||
struct ec_params_pchg_update {
|
||||
/* PCHG port number */
|
||||
uint8_t port;
|
||||
/* enum ec_pchg_update_cmd */
|
||||
uint8_t cmd;
|
||||
/* Padding */
|
||||
uint8_t reserved0;
|
||||
uint8_t reserved1;
|
||||
/* Version of new firmware */
|
||||
uint32_t version;
|
||||
/* CRC32 of new firmware */
|
||||
uint32_t crc32;
|
||||
/* Address in chip memory where <data> is written to */
|
||||
uint32_t addr;
|
||||
/* Size of <data> */
|
||||
uint32_t size;
|
||||
/* Partial data of new firmware */
|
||||
uint8_t data[];
|
||||
} __ec_align4;
|
||||
|
||||
BUILD_ASSERT(EC_PCHG_UPDATE_CMD_COUNT
|
||||
< BIT(sizeof(((struct ec_params_pchg_update *)0)->cmd)*8));
|
||||
|
||||
struct ec_response_pchg_update {
|
||||
/* Block size */
|
||||
uint32_t block_size;
|
||||
} __ec_align4;
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Voltage regulator controls */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue