Merge tag 'mfd-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "New Device Support:
   - Add support for Watchdog to ChromeOS Embedded Controller
   - Add support for GPIOs to ChromeOS Embedded Controller
   - Add supprt for Sound to MediaTek MT6357 CODEC

  New Functionality:
   - Add power-off functionality to Texas Instruments TWL series CODECs

  Fix-ups:
   - Device Tree binding adaptions/conversions/creation
   - Use/convert to new/better APIs/helpers/MACROs instead of
     hand-rolling implementations
   - Trivial; spelling, whitespace, clean-ups, etc
   - Remove superfluous code and simplify overall
   - Fix include lists; alphabetise, remove unused, explicitly add used
   - Use dev_err_probe() to clean-up error paths
   - Convert used cache type over to the Maple Tree in many instances
   - Constify a bunch of static structs
   - Refrain from over-riding resources provided via the firmware

  Bug Fixes:
   - Fix a clock related firmware bug on Dell XPS 9530 et al.
   - Repair incorrect IRQ designations
   - Increase buffer sizes to omit various snprintf compiler errors
   - Ensure errors are handled properly
   - Balance references and prevent resource leaks
   - Rectify Power Key interrupt processing
   - Fix Kconfig related build errors
   - Correct a bunch of register start-up default values"

* tag 'mfd-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (65 commits)
  mfd: cs42l43: Fix wrong GPIO_FN_SEL and SPI_CLK_CONFIG1 defaults
  mfd: cs42l43: Fix wrong register defaults
  mfd: mt6397-core: Register mt6357 sound codec
  dt-bindings: mfd: syscon: Add ti,am62-usb-phy-ctrl compatible
  dt-bindings: mfd: dlg,da9063: Make #interrupt-cells required
  dt-bindings: mfd: Convert atmel-flexcom to json-schema
  mfd: kempld-core: Don't replace resources provided by ACPI
  mfd: cros_ec_dev: Add GPIO device if feature present on EC
  dt-bindings: mfd: cros-ec: Add properties for GPIO controller
  mfd: twl: Select MFD_CORE
  mfd: core: Constify the struct device_type usage
  mfd: rk8xx-core: Fix interrupt processing order for power key button
  mfd: twl4030-power: Accept standard property for power controller
  mfd: twl-core: Add power off implementation for twl603x
  dt-bindings: mfd: ti,twl: Document system-power-controller
  mfd: altera-sysmgr: Call of_node_put() only when of_parse_phandle() takes a ref
  mfd: syscon: Remove extern from function prototypes
  mfd: syscon: Call of_node_put() only when of_parse_phandle() takes a ref
  mfd: mc13xxx: Use bitfield helpers
  mfd: rc5t583: Convert to use maple tree register cache
  ...
This commit is contained in:
Linus Torvalds
2024-03-14 10:29:47 -07:00
76 changed files with 1049 additions and 638 deletions
+35 -43
View File
@@ -3961,60 +3961,52 @@ struct ec_response_i2c_passthru {
} __ec_align1;
/*****************************************************************************/
/* Power button hang detect */
/* AP hang detect */
#define EC_CMD_HANG_DETECT 0x009F
/* Reasons to start hang detection timer */
/* Power button pressed */
#define EC_HANG_START_ON_POWER_PRESS BIT(0)
#define EC_HANG_DETECT_MIN_TIMEOUT 5
#define EC_HANG_DETECT_MAX_TIMEOUT 65535
/* Lid closed */
#define EC_HANG_START_ON_LID_CLOSE BIT(1)
/* EC hang detect commands */
enum ec_hang_detect_cmds {
/* Reload AP hang detect timer. */
EC_HANG_DETECT_CMD_RELOAD = 0x0,
/* Lid opened */
#define EC_HANG_START_ON_LID_OPEN BIT(2)
/* Stop AP hang detect timer. */
EC_HANG_DETECT_CMD_CANCEL = 0x1,
/* Start of AP S3->S0 transition (booting or resuming from suspend) */
#define EC_HANG_START_ON_RESUME BIT(3)
/* Configure watchdog with given reboot timeout and
* cancel currently running AP hang detect timer.
*/
EC_HANG_DETECT_CMD_SET_TIMEOUT = 0x2,
/* Reasons to cancel hang detection */
/* Get last hang status - whether the AP boot was clear or not */
EC_HANG_DETECT_CMD_GET_STATUS = 0x3,
/* Power button released */
#define EC_HANG_STOP_ON_POWER_RELEASE BIT(8)
/* Any host command from AP received */
#define EC_HANG_STOP_ON_HOST_COMMAND BIT(9)
/* Stop on end of AP S0->S3 transition (suspending or shutting down) */
#define EC_HANG_STOP_ON_SUSPEND BIT(10)
/*
* If this flag is set, all the other fields are ignored, and the hang detect
* timer is started. This provides the AP a way to start the hang timer
* without reconfiguring any of the other hang detect settings. Note that
* you must previously have configured the timeouts.
*/
#define EC_HANG_START_NOW BIT(30)
/*
* If this flag is set, all the other fields are ignored (including
* EC_HANG_START_NOW). This provides the AP a way to stop the hang timer
* without reconfiguring any of the other hang detect settings.
*/
#define EC_HANG_STOP_NOW BIT(31)
/* Clear last hang status. Called when AP is rebooting/shutting down
* gracefully.
*/
EC_HANG_DETECT_CMD_CLEAR_STATUS = 0x4
};
struct ec_params_hang_detect {
/* Flags; see EC_HANG_* */
uint32_t flags;
uint16_t command; /* enum ec_hang_detect_cmds */
/* Timeout in seconds before generating reboot */
uint16_t reboot_timeout_sec;
} __ec_align2;
/* Timeout in msec before generating host event, if enabled */
uint16_t host_event_timeout_msec;
/* Timeout in msec before generating warm reboot, if enabled */
uint16_t warm_reboot_timeout_msec;
} __ec_align4;
/* Status codes that describe whether AP has boot normally or the hang has been
* detected and EC has reset AP
*/
enum ec_hang_detect_status {
EC_HANG_DETECT_AP_BOOT_NORMAL = 0x0,
EC_HANG_DETECT_AP_BOOT_EC_WDT = 0x1,
EC_HANG_DETECT_AP_BOOT_COUNT,
};
struct ec_response_hang_detect {
uint8_t status; /* enum ec_hang_detect_status */
} __ec_align1;
/*****************************************************************************/
/* Commands for battery charging */