mbox series

[v5,0/2] Consolidate ec_response_get_next_event

Message ID cover.1719531519.git.dnojiri@chromium.org
Headers show
Series Consolidate ec_response_get_next_event | expand

Message

Daisuke Nojiri June 27, 2024, 11:53 p.m. UTC
---
Changes in v5:
 - Merged changes in cros_ec_commands.h and cros_ec_proto.c

Changes in v4:
 - Change subject line: ARM:... to dt-bindings:...
 - Add description about keyboard matrix v3.0.
 - Add cover letter.

---
Changes in v3:
 - Remove CROS_KBD_V30 in Kconfig and macros conditionally set in
   cros-ec-keyboard.dtsi.

---
Changes in v2:
 - Separate cros_ec_commands.h from cros_ec_proto.{c.h}.
 - Remove Change-Id, TEST=, BUG= lines.

---
Daisuke Nojiri (2):
  cros_ec_proto: Consolidate ec_response_get_next_event
  dt-bindings: cros-ec-keyboard: Add keyboard matrix v3.0

 drivers/platform/chrome/cros_ec_proto.c       |  16 +--
 include/dt-bindings/input/cros-ec-keyboard.h  | 104 ++++++++++++++++++
 .../linux/platform_data/cros_ec_commands.h    |  34 +-----
 include/linux/platform_data/cros_ec_proto.h   |   2 +-
 4 files changed, 114 insertions(+), 42 deletions(-)

Comments

Tzung-Bi Shih June 28, 2024, 3 a.m. UTC | #1
On Thu, Jun 27, 2024 at 04:53:07PM -0700, Daisuke Nojiri wrote:

Your previous patches have been applied to for-next branch:
ba098ed9829c ("platform/chrome: Add struct ec_response_get_next_event_v3")
106d67398233 ("platform/chrome: cros_ec_proto: Upgrade get_next_event to v3")

Please send incremental patches based on for-next.

> Consolidate struct ec_response_get_next_event_v*.
> 
> Let X->Y indicate kernel X sending EC_CMD_GET_NEXT_EVENT to FW Y.
> 
> Old->New:
>    Existing kernels send a smaller container (e.g.
>    ec_response_get_next_data) which may or may not fit the last few
>    bytes. The FW copies as many bytes as possible to the container. The
>    kernel processes as many leading bytes as it can understand.
> 
> New->Old:
>    New kernels send a bigger container. Existing FW copies as many bytes
>    as it wants, leaving the last few bytes empty. The kernel knows it
>    didn't receive full size data from the returned data length.
> 
> Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
> ---
>  drivers/platform/chrome/cros_ec_proto.c       | 16 ++++-----
>  .../linux/platform_data/cros_ec_commands.h    | 34 +------------------

NACK, we don't do it: diverging cros_ec_commands.h and EC's ec_commands.h.