aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-07-20platform/chrome: cros_ec_proto: add Kunit test for cros_ec_cmd()Tzung-Bi Shih1-0/+48
cros_ec_cmd() is a wrapper of cros_ec_cmd_xfer_status(). Add Kunit test for cros_ec_cmd(). Signed-off-by: Tzung-Bi Shih <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-20platform/chrome: cros_ec_proto: add Kunit tests for get_sensor_countTzung-Bi Shih3-0/+182
cros_ec_get_sensor_count() gets number of MEMS sensors. Add Kunit tests for cros_ec_get_sensor_count(). Signed-off-by: Tzung-Bi Shih <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-20platform/chrome: cros_ec_proto: add Kunit tests for check_featuresTzung-Bi Shih1-0/+77
cros_ec_check_features() gets EC features if it hasn't had cache, and checks whether the given EC_FEATURE_* is supported or not. Add Kunit tests for cros_ec_check_features(). Signed-off-by: Tzung-Bi Shih <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-20platform/chrome: cros_ec_proto: add Kunit tests for get_host_eventTzung-Bi Shih1-0/+59
cros_ec_get_host_event() performs some sanity checks, parses `ec_dev->event_data.data.host_event`, and returns bitmap of EC_HOST_EVENT_*. Add Kunit tests for cros_ec_get_host_event(). Signed-off-by: Tzung-Bi Shih <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-20platform/chrome: cros_ec_proto: add Kunit tests for get_next_eventTzung-Bi Shih1-0/+266
cros_ec_get_next_event() gets events from EC. It consists of 3 versions of event retrieval: 1. No MKBP event. 2. MKBP event version 0. 3. MKBP event version >0. Add Kunit tests for cros_ec_get_next_event(). Signed-off-by: Tzung-Bi Shih <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-20platform/chrome: cros_ec_proto: add Kunit test for cros_ec_map_error()Tzung-Bi Shih1-0/+49
cros_ec_cmd_xfer_status() is the only exported function that calls static function cros_ec_map_error(). Add Kunit test for cros_ec_map_error() through calling cros_ec_cmd_xfer_status(). Signed-off-by: Tzung-Bi Shih <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-20platform/chrome: cros_ec_proto: add Kunit tests for cmd_xfer_statusTzung-Bi Shih1-0/+42
cros_ec_cmd_xfer_status() calls cros_ec_cmd_xfer() and cros_ec_map_error(). Given that there are already test cases for cros_ec_cmd_xfer(), only add basic Kunit tests for cros_ec_cmd_xfer_status(). Signed-off-by: Tzung-Bi Shih <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-20platform/chrome: cros_ec_proto: return -EPROTO if empty payloadTzung-Bi Shih1-0/+5
cros_ec_wait_until_complete() sends EC_CMD_GET_COMMS_STATUS which expects to receive sizeof(struct ec_response_get_comms_status) from cros_ec_xfer_command(). Return -EPROTO if cros_ec_xfer_command() returns 0. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-20platform/chrome: cros_ec_proto: add Kunit test for empty payloadTzung-Bi Shih1-0/+31
cros_ec_wait_until_complete() sends EC_CMD_GET_COMMS_STATUS which expects to receive sizeof(struct ec_response_get_comms_status) from cros_ec_xfer_command(). Add Kunit test and expect to receive an error code when cros_ec_xfer_command() returns 0. Signed-off-by: Tzung-Bi Shih <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-20platform/chrome: cros_ec_proto: return -EAGAIN when retries timed outTzung-Bi Shih1-0/+3
While EC_COMMS_STATUS_PROCESSING flag is still on after it tries EC_COMMAND_RETRIES times for sending EC_CMD_GET_COMMS_STATUS, cros_ec_wait_until_complete() doesn't return an error code. Return -EAGAIN in the case instead. Signed-off-by: Tzung-Bi Shih <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-20platform/chrome: cros_ec_proto: change Kunit expectation when timed outTzung-Bi Shih1-3/+1
While EC_COMMS_STATUS_PROCESSING flag is still on after it tries EC_COMMAND_RETRIES times for sending EC_CMD_GET_COMMS_STATUS, cros_ec_wait_until_complete() doesn't return an error code. Change the expectation to an error code. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-20platform/chrome: cros_ec_proto: separate cros_ec_wait_until_complete()Tzung-Bi Shih1-39/+35
EC returns EC_RES_IN_PROGRESS if the host command needs more time to complete. Whenever receives the return code, cros_ec_send_command() sends EC_CMD_GET_COMMS_STATUS to query the command status. Separate cros_ec_wait_until_complete() from cros_ec_send_command(). It sends EC_CMD_GET_COMMS_STATUS and waits until the previous command was completed, or encountered error, or timed out. Signed-off-by: Tzung-Bi Shih <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-20platform/chrome: cros_ec_proto: separate cros_ec_xfer_command()Tzung-Bi Shih1-3/+10
cros_ec_send_command() has extra logic to handle EC_RES_IN_PROGRESS. Separate the command transfer part into cros_ec_xfer_command() so that other functions can re-use it. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-20platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_send_command()Tzung-Bi Shih3-0/+289
cros_ec_cmd_xfer() is the only exported function that calls static function cros_ec_send_command(). Add Kunit tests for cros_ec_send_command() through calling cros_ec_cmd_xfer(). Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-20platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_cmd_xfer()Tzung-Bi Shih1-0/+149
cros_ec_cmd_xfer() transfers the given command and data if any. It performs some sanity checks and calls cros_ec_send_command(). Add Kunit tests for cros_ec_cmd_xfer(). Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-20platform/chrome: cros_ec_proto: add "cros_ec_" prefix to send_command()Tzung-Bi Shih1-8/+7
To be neat, add "cros_ec_" prefix to static function send_command(). Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-18platform/chrome: cros_ec_typec: Register port altmodesPrashant Malani1-11/+40
Instead of using manually managed altmode structs, register the port's altmodes with the Type-C framework. This facilitates matching them to partner altmodes later. Cc: Heikki Krogerus <[email protected]> Signed-off-by: Prashant Malani <[email protected]> Acked-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-18platform/chrome: cros_ec_typec: Rename port altmode arrayPrashant Malani1-8/+7
Rename "p_altmode" to "port_altmode" which is a less ambiguous name for the port_altmode struct array. Signed-off-by: Prashant Malani <[email protected]> Acked-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-13platform/chrome: cros_ec_typec: Use dev_err_probe on port register failNĂ­colas F. R. A. Prado1-1/+1
The typec_register_port() can fail with EPROBE_DEFER if the endpoint node hasn't probed yet. In order to avoid spamming the log with errors in that case, log using dev_err_probe(). Signed-off-by: NĂ­colas F. R. A. Prado <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Prashant Malani <[email protected]>
2022-06-24platform/chrome: wilco_ec: event: Fix typo in commentJiang Jian1-1/+1
Drop the redundant word 'the'. Signed-off-by: Jiang Jian <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-14platform/chrome: cros_ec: Always expose last resume resultStephen Boyd1-4/+4
The last resume result exposing logic in cros_ec_sleep_event() incorrectly requires S0ix support, which doesn't work on ARM based systems where S0ix doesn't exist. That's because cros_ec_sleep_event() only reports the last resume result when the EC indicates the last sleep event was an S0ix resume. On ARM systems, the last sleep event is always S3 resume, but the EC can still detect sleep hang events in case some other part of the AP is blocking sleep. Always expose the last resume result if the EC supports it so that this works on all devices regardless of S0ix support. This fixes sleep hang detection on ARM based chromebooks like Trogdor. Cc: Rajat Jain <[email protected]> Cc: Matthias Kaehlcke <[email protected]> Cc: Hsin-Yi Wang <[email protected]> Cc: Tzung-Bi Shih <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Reviewed-by: Evan Green <[email protected]> Fixes: 7235560ac77a ("platform/chrome: Add support for v1 of host sleep event") Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-14platform/chrome: cros_ec_proto: Fix spelling mistake "unknwon" -> "unknown"Colin Ian King1-1/+1
There is a spelling mistake in a dev_dbg message. Fix it. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: handle empty payload in getting wake maskTzung-Bi Shih1-10/+14
cros_ec_get_host_event_wake_mask() expects to receive sizeof(struct ec_response_host_event_mask) from send_command(). The payload is valid only if the return value is positive. Return -EPROTO if send_command() returns 0 in cros_ec_get_host_event_wake_mask(). Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: add Kunit test for getting wake maskTzung-Bi Shih1-0/+128
cros_ec_get_host_event_wake_mask() expects to receive sizeof(struct ec_response_host_event_mask) from send_command(). The payload is valid only if the return value is positive. Add Kunit tests for returning 0 from send_command() in cros_ec_get_host_event_wake_mask(). Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: return 0 on getting wake mask successTzung-Bi Shih1-1/+2
cros_ec_get_host_event_wake_mask() used to return value from send_command() which is number of bytes for input payload on success (i.e. sizeof(struct ec_response_host_event_mask)). However, the callers don't need to know how many bytes are available. Don't return number of available bytes. Instead, return 0 on success; otherwise, negative integers on error. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: handle empty payload in getting cmd maskTzung-Bi Shih1-0/+5
cros_ec_get_host_command_version_mask() expects to receive sizeof(struct ec_response_get_cmd_versions) from send_command(). The payload is valid only if the return value is positive. Return -EPROTO if send_command() returns 0 in cros_ec_get_host_command_version_mask(). Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: add Kunit tests for getting cmd maskTzung-Bi Shih1-0/+197
cros_ec_get_host_command_version_mask() expects to receive sizeof(struct ec_response_get_cmd_versions) from send_command(). The payload is valid only if the return value is positive. Add Kunit tests for returning 0 from send_command() in cros_ec_get_host_command_version_mask(). Note that because the 2 cros_ec_get_host_command_version_mask() use the same `ver_mask`. cros_ec_proto_test_query_all_no_host_sleep_return0() polluates the `ver_mask` and returns 0 on the second send_command() to make sure the second cros_ec_get_host_command_version_mask() doesn't take the garbage from the previous call. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: check `msg->result` in getting cmd maskTzung-Bi Shih1-8/+13
cros_ec_get_host_command_version_mask() should check if EC wasn't happy by checking `msg->result`. Use cros_ec_map_error() and return the error code if any. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: add Kunit test for getting cmd mask errorTzung-Bi Shih1-0/+89
cros_ec_query_all() uses cros_ec_get_host_command_version_mask() to query the supported MKBP version; cros_ec_get_host_command_version_mask() uses send_command() for transferring the host command. Returning >=0 from send_command() only denotes the transfer was success. cros_ec_get_host_command_version_mask() should check if EC wasn't happy by checking `msg->result`. Add a Kunit test for returning error in `msg->result` in cros_ec_get_host_command_version_mask(). For the case, cros_ec_query_all() should find the EC device doesn't support MKBP. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: return 0 on getting cmd mask successTzung-Bi Shih1-8/+5
cros_ec_get_host_command_version_mask() used to return value from send_command() which is number of available bytes for input payload on success (i.e. sizeof(struct ec_response_get_cmd_versions)). However, the callers don't need to know how many bytes are available. Don't return number of available bytes. Instead, return 0 on success; otherwise, negative integers on error. Also remove the unneeded `ver_mask` initialization as the callers should take it only if cros_ec_get_host_command_version_mask() returns 0. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: don't show MKBP version if unsupportedTzung-Bi Shih1-4/+4
It wrongly showed the following message when it doesn't support MKBP: "MKBP support version 4294967295". Fix it. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: handle empty payload in getting info legacyTzung-Bi Shih1-3/+9
cros_ec_get_proto_info_legacy() expects to receive sizeof(struct ec_response_hello) from send_command(). The payload is valid only if the return value is positive. Return -EPROTO if send_command() returns 0 in cros_ec_get_proto_info_legacy(). Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: add Kunit test for getting legacy infoTzung-Bi Shih1-0/+49
cros_ec_get_proto_info_legacy() expects to receive sizeof(struct ec_response_hello) from send_command(). The payload is valid only if the return value is positive. Add a Kunit test for returning 0 from send_command() in cros_ec_get_proto_info_legacy(). Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: separate cros_ec_get_proto_info_legacy()Tzung-Bi Shih2-50/+44
Rename cros_ec_host_command_proto_query_v2() to cros_ec_get_proto_info_legacy() and make it responsible for setting `ec_dev` fields for EC protocol v2. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: handle empty payload in getting proto infoTzung-Bi Shih1-0/+5
cros_ec_get_proto_info() expects to receive sizeof(struct ec_response_get_protocol_info) from send_command(). The payload is valid only if the return value is positive. Return -EPROTO if send_command() returns 0 in cros_ec_get_proto_info(). Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: add Kunit tests for getting proto infoTzung-Bi Shih1-0/+132
cros_ec_get_proto_info() expects to receive sizeof(struct ec_response_get_protocol_info) from send_command(). The payload is valid only if the return value is positive. Add Kunit tests for returning 0 from send_command() in cros_ec_get_proto_info(). Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: separate cros_ec_get_proto_info()Tzung-Bi Shih2-97/+93
Rename cros_ec_host_command_proto_query() to cros_ec_get_proto_info() and make it responsible for setting `ec_dev` fields according to the response protocol info. Also make cros_ec_get_host_event_wake_mask() allocate its own message buffer. It was lucky that size of `struct ec_response_host_event_mask` is less than `struct ec_response_get_protocol_info`. Thus, the buffer wasn't overflow. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: use cros_ec_map_error()Tzung-Bi Shih1-5/+4
Use cros_ec_map_error() in cros_ec_get_host_event_wake_mask(). The behavior of cros_ec_get_host_event_wake_mask() slightly changed. It is acceptable because the caller only needs it returns negative integers for indicating errors. Especially, the EC_RES_INVALID_COMMAND still maps to -EOPNOTSUPP. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: remove redundant NULL checkTzung-Bi Shih1-3/+0
send_command() already checks if `ec_dev->pkt_xfer` is NULL. Remove the redundant check. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: assign buffer size from protocol infoTzung-Bi Shih1-6/+2
`din_size` is calculated from `ec_dev->max_response`. `ec_dev->max_response` is further calculated from the protocol info. To make it clear, assign `din_size` and `dout_size` from protocol info directly. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: use macros for passthru indexesTzung-Bi Shih5-15/+20
Move passthru indexes for EC and PD devices to common header. Also use them instead of literal constants. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_query_all()Tzung-Bi Shih5-0/+943
cros_ec_query_all() sends multiple host commands to EC for querying supported protocols and settings. Add required mock for interacting with cros_ec_query_all() and Kunit tests. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_ec_commands: fix compile errorsTzung-Bi Shih1-2/+2
Fix compile errors when including cros_ec_commands.h solely. 1. cros_ec_commands.h:587:9: error: unknown type name 'uint8_t' 587 | uint8_t flags; | ^~~~~~~ 2. cros_ec_commands.h:1105:43: error: implicit declaration of function 'BIT' 1105 | EC_COMMS_STATUS_PROCESSING = BIT(0), | ^~~ Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_kbd_led_backlight: support EC PWM backendTzung-Bi Shih2-16/+99
EC PWM backend uses EC_CMD_PWM_SET_KEYBOARD_BACKLIGHT and EC_CMD_PWM_GET_KEYBOARD_BACKLIGHT for setting and getting the brightness respectively. Signed-off-by: Tzung-Bi Shih <[email protected]> Reviewed-by: Matthias Kaehlcke <[email protected]> Tested-by: Matthias Kaehlcke <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_kbd_led_backlight: support OF matchTzung-Bi Shih1-1/+14
For letting device tree based machines to use the driver, support OF match. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Reviewed-by: Matthias Kaehlcke <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10dt-bindings: add google,cros-kbd-led-backlightTzung-Bi Shih2-0/+38
Acked-by: Rob Herring <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_kbd_led_backlight: separate ACPI backendTzung-Bi Shih1-13/+69
cros_kbd_led_backlight uses ACPI_KEYBOARD_BACKLIGHT_WRITE and ACPI_KEYBOARD_BACKLIGHT_READ for setting and getting the brightness respectively. Separate ACPI operations for preparing the driver to support other backends. Signed-off-by: Tzung-Bi Shih <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-10platform/chrome: cros_kbd_led_backlight: sort headers alphabeticallyTzung-Bi Shih1-2/+2
To be neat and reduce conflict possibility, sort the headers alphabetically. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-08platform/chrome: cros_ec_proto: Update size arg typesPrashant Malani2-3/+3
cros_ec_cmd() takes 2 size arguments. Update them to be of the more appropriate type size_t. Suggested-by: Stephen Boyd <[email protected]> Signed-off-by: Prashant Malani <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-06-08platform/chrome: cros_ec_proto: Rename cros_ec_command functionPrashant Malani6-48/+47
cros_ec_command() is the name of a function as well as a struct, as such it can confuse indexing tools (like ctags). Avoid this by renaming it to cros_ec_cmd(). Update all the callsites to use the new name. This patch is a find-and-replace, so should not introduce any functional changes. Suggested-by: Stephen Boyd <[email protected]> Signed-off-by: Prashant Malani <[email protected]> Acked-by: Lee Jones <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]