From patchwork Tue Jun 4 17:01:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daisuke Nojiri X-Patchwork-Id: 13685699 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E549D148FEE for ; Tue, 4 Jun 2024 17:06:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717520765; cv=none; b=PT6dXQzAAgl+uLiePpZUmgrbV5MD/31GnO/RJpjbQFY3jJdJeVoQnLqxJ1hhrb1/+j0uK5TspDjqZhUx004SfHZcb3f96FvsJV/dzQxsk1HBOkCxsJBG3UGcoDYJrqlOgiHeLizAnCIM0Tt/C/mtEYyJTNSpu+s2U2Auqs+2Mys= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717520765; c=relaxed/simple; bh=rEVud8jYCenY75ArS4e4npQEZOeDDa8qDxgOauldd3U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ShuZuaheBTdwr+eBXA9yHQQUYYFwGYkvhQ0OzDat1ebJtCwInDi1js1U/i9dxs4G6lAh7JcE1dePAltFWWf1TLysKaNM+8AiOUiZ6bctIycIc2AERypnI3wwWqyF8/id7Amx0CdNOwNTwB/f7gXsI4LfmeVxv9Y5UyClAjsCdrw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=hj9+m1mq; arc=none smtp.client-ip=209.85.210.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="hj9+m1mq" Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-6f4603237e0so23401b3a.0 for ; Tue, 04 Jun 2024 10:06:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1717520761; x=1718125561; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fgJ5+iEOSgKZgq1LxXHnvCk2860Dw4BLXVAkjQni18I=; b=hj9+m1mqCYy0sil7PuGEuX85jAXzZHIz0FwmsXdl6OTFC4ZbEwyK2zRJqAG8Kr12gi AQTNekhD+COe+FjC4t8nJS5xLyt7nsFBeKAL7xOeWPg7EJYw3mcGcEmCtfc/gEWwoMxz xNjWHBMWZw0Bk50HvAsxj8Rwlf7eWPp2CNl1Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717520761; x=1718125561; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fgJ5+iEOSgKZgq1LxXHnvCk2860Dw4BLXVAkjQni18I=; b=EMZ6g2SoY9JaTJxeOzp2dTQiC4Vv/Z/FHHIseXIgtdgviiW0wD5qJr3QI7eLhVatf/ fPchZ7rEPAD9+gzccDdVO7hn25sYZsI94R+Apt4kFzQm4pE0Z39FPWz5xXkOrAs8kIp5 hQf6O9aLjR9akVNIzvRsJ5xCm5qQ9qP5fxYo8ILbBM5F0RP28pT8kwVPxtHP8a78GyAn 6dvA9ZF0SwCUydexk5JZtE+s4Qy51KoGyeM+Ii+WeU6/kcNmI4qxLZajdklkxlIq64+p /RzRqcI3t/1O9q8C3awJgS207XC4H1mX9aMxAAiIGqy1tjM5ZzQArYUWUvrGXyJi4sLF 8BJQ== X-Forwarded-Encrypted: i=1; AJvYcCUXdqfesK21qxcBArmBJldWonQj6H/SFooYTjhWQghXPemhJrlf4FJEd7cddYeRVs6wWPU++SJyMk+AXq5f+ds6zfW+p34OLCwvP2Uztu15 X-Gm-Message-State: AOJu0YxOp4bMWmd957vIrGIJ+QXeJxndY+icf2p39ffykf1XzGsglrij qooBwnz+vvTyw5MFlhpSwmka+jORUTreLBsiSaPZhNI2D2GEaN4v2Ex3GgpzgQ== X-Google-Smtp-Source: AGHT+IFGAiCt40jA5/yhChT2c5Qddf9o2Q57U/QnPJLBpXj9m7oYVO4h6NEpzDCXz6oyMA7cKGh7fA== X-Received: by 2002:a05:6a00:2d1d:b0:6f4:d5d8:e0a3 with SMTP id d2e1a72fcca58-703e4bf60cfmr331030b3a.9.1717520760886; Tue, 04 Jun 2024 10:06:00 -0700 (PDT) Received: from pc98uv11.mtv.corp.google.com ([2620:15c:9d:2:6203:d1ca:c560:52f1]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70242b0914dsm7510672b3a.179.2024.06.04.10.05.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 10:06:00 -0700 (PDT) From: Daisuke Nojiri To: Cc: Daisuke Nojiri , Benson Leung , Guenter Roeck , Hans Verkuil , Reka Norman , Tzung-Bi Shih , Abhishek Pandit-Subedi , Gwendal Grignou , Pavan Holla , Ching-Kang Yen , Lukasz Majczak , chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] platform/chrome: Add struct ec_response_get_next_event_v3 Date: Tue, 4 Jun 2024 10:01:48 -0700 Message-ID: <20240604170552.2517189-1-dnojiri@chromium.org> X-Mailer: git-send-email 2.45.1.288.g0e0cd299f1-goog In-Reply-To: <20240604005354.2294468-1-dnojiri@chromium.org> References: <20240604005354.2294468-1-dnojiri@chromium.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add struct ec_response_get_next_event_v3 to upgrade EC_CMD_GET_NEXT_EVENT to version 3. Signed-off-by: Daisuke Nojiri --- .../linux/platform_data/cros_ec_commands.h | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/include/linux/platform_data/cros_ec_commands.h b/include/linux/platform_data/cros_ec_commands.h index 070e49c5381e..fff191a8d413 100644 --- a/include/linux/platform_data/cros_ec_commands.h +++ b/include/linux/platform_data/cros_ec_commands.h @@ -3527,6 +3527,34 @@ union __ec_align_offset1 ec_response_get_next_data_v1 { }; BUILD_ASSERT(sizeof(union ec_response_get_next_data_v1) == 16); +union __ec_align_offset1 ec_response_get_next_data_v3 { + uint8_t key_matrix[18]; + + /* Unaligned */ + uint32_t host_event; + uint64_t host_event64; + + struct __ec_todo_unpacked { + /* For aligning the fifo_info */ + uint8_t reserved[3]; + struct ec_response_motion_sense_fifo_info info; + } sensor_fifo; + + uint32_t buttons; + + uint32_t switches; + + uint32_t fp_events; + + uint32_t sysrq; + + /* CEC events from enum mkbp_cec_event */ + uint32_t cec_events; + + uint8_t cec_message[16]; +}; +BUILD_ASSERT(sizeof(union ec_response_get_next_data_v3) == 18); + struct ec_response_get_next_event { uint8_t event_type; /* Followed by event data if any */ @@ -3539,6 +3567,12 @@ struct ec_response_get_next_event_v1 { union ec_response_get_next_data_v1 data; } __ec_align1; +struct ec_response_get_next_event_v3 { + uint8_t event_type; + /* Followed by event data if any */ + union ec_response_get_next_data_v3 data; +} __ec_align1; + /* Bit indices for buttons and switches.*/ /* Buttons */ #define EC_MKBP_POWER_BUTTON 0