diff options
| author | Linus Torvalds <[email protected]> | 2024-07-15 17:25:38 -0700 | 
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2024-07-15 17:25:38 -0700 | 
| commit | 89c491389331faea09a247da47ebd95982dae06e (patch) | |
| tree | ac8101800b1f0ebd5579039a9be51717d274a3b1 /drivers/platform/chrome/cros_ec_debugfs.c | |
| parent | d8764c1931a4c91b9b53ee183757f70999da2bb3 (diff) | |
| parent | 4baf1cc54433ff7c6e5178517bc8768001416681 (diff) | |
Merge tag 'tag-chrome-platform-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux
Pull chrome platform updates from Tzung-Bi Shih:
 "New code:
   - Add "cros_ec_hwmon" driver to expose fan speed and temperature
   - Add "cros_charge-control" driver to control charge thresholds and
     behaviour
   - Add module parameter "log_poll_period_ms" in cros_ec_debugfs for
     tuning the poll period
   - Support version 3 of EC_CMD_GET_NEXT_EVENT and keyboard matrix
  Fixes:
   - Fix a race condition in accessing MEC (Microchip EC) memory between
     ACPI and kernel. Serialize the memory access by an AML (ACPI
     Machine Language) mutex
   - Fix an issue of wrong EC message version in cros_ec_debugfs
  Misc:
   - Fix kernel-doc errors and cleanups"
* tag 'tag-chrome-platform-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: (28 commits)
  power: supply: cros_charge-control: Fix signedness bug in charge_behaviour_store()
  power: supply: cros_charge-control: Avoid accessing attributes out of bounds
  power: supply: cros_charge-control: don't load if Framework control is present
  power: supply: add ChromeOS EC based charge control driver
  platform/chrome: cros_ec_proto: Introduce cros_ec_get_cmd_versions()
  platform/chrome: Update binary interface for EC-based charge control
  ACPI: battery: add devm_battery_hook_register()
  dt-bindings: input: cros-ec-keyboard: Add keyboard matrix v3.0
  platform/chrome: cros_ec_lpc: Handle zero length read/write
  platform/chrome: cros_ec_lpc: Fix error code in cros_ec_lpc_mec_read_bytes()
  platform/chrome: cros_ec_debugfs: fix wrong EC message version
  platform/chrome: cros_ec_proto: update Kunit test for get_next_data_v3
  platform/chrome: cros_ec_proto: add missing MODULE_DESCRIPTION() macro
  hwmon: (cros_ec) Fix access to restricted __le16
  hwmon: (cros_ec) Prevent read overflow in probe()
  platform/chrome: cros_ec_lpc: Add quirks for Framework Laptop
  platform/chrome: cros_ec_lpc: Add a new quirk for AML mutex
  platform/chrome: cros_ec_lpc: Add a new quirk for ACPI id
  platform/chrome: cros_ec_lpc: MEC access can use an AML mutex
  platform/chrome: cros_ec_lpc: MEC access can return error code
  ...
Diffstat (limited to 'drivers/platform/chrome/cros_ec_debugfs.c')
| -rw-r--r-- | drivers/platform/chrome/cros_ec_debugfs.c | 9 | 
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/platform/chrome/cros_ec_debugfs.c b/drivers/platform/chrome/cros_ec_debugfs.c index e1d313246beb..4525ad1b59f4 100644 --- a/drivers/platform/chrome/cros_ec_debugfs.c +++ b/drivers/platform/chrome/cros_ec_debugfs.c @@ -26,6 +26,10 @@  #define CIRC_ADD(idx, size, value)	(((idx) + (value)) & ((size) - 1)) +static unsigned int log_poll_period_ms = LOG_POLL_SEC * MSEC_PER_SEC; +module_param(log_poll_period_ms, uint, 0644); +MODULE_PARM_DESC(log_poll_period_ms, "EC log polling period(ms)"); +  /* waitqueue for log readers */  static DECLARE_WAIT_QUEUE_HEAD(cros_ec_debugfs_log_wq); @@ -57,7 +61,7 @@ struct cros_ec_debugfs {  /*   * We need to make sure that the EC log buffer on the UART is large enough, - * so that it is unlikely enough to overlow within LOG_POLL_SEC. + * so that it is unlikely enough to overlow within log_poll_period_ms.   */  static void cros_ec_console_log_work(struct work_struct *__work)  { @@ -119,7 +123,7 @@ static void cros_ec_console_log_work(struct work_struct *__work)  resched:  	schedule_delayed_work(&debug_info->log_poll_work, -			      msecs_to_jiffies(LOG_POLL_SEC * 1000)); +			      msecs_to_jiffies(log_poll_period_ms));  }  static int cros_ec_console_log_open(struct inode *inode, struct file *file) @@ -330,6 +334,7 @@ static int ec_read_version_supported(struct cros_ec_dev *ec)  	if (!msg)  		return 0; +	msg->version = 1;  	msg->command = EC_CMD_GET_CMD_VERSIONS + ec->cmd_offset;  	msg->outsize = sizeof(*params);  	msg->insize = sizeof(*response);  |