Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1178035lqt; Fri, 7 Jun 2024 10:04:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVwQsF3I4S0DQug21Y5bT2bBgC4qcMZYOsOFdS+dJTkPggqj+bjGRboezg9TjICI+PLVqh7NIOjRzRfdGBOr4RSs90ZLm3E/84Rp1DnZQ== X-Google-Smtp-Source: AGHT+IHVGDgkt2fNLW9FLVpCMLzs3PZdCcHxtWG+nVpEApqmZdU+fUXQVv5bSiHj9ovptedJ63e6 X-Received: by 2002:a17:902:dac2:b0:1f6:7de8:6643 with SMTP id d9443c01a7336-1f6d030668fmr38757885ad.38.1717779852385; Fri, 07 Jun 2024 10:04:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717779852; cv=pass; d=google.com; s=arc-20160816; b=r5qlTVScyy0J/ZMdGwS6fO/AzVegquDKMWPNEI9cYO5y3BHo7ZTGJWabhkt9Hn7zDm Gg6Cae94EWT9TmdTEh5MSflY+JE8FPmgFzQIuUoruUw76fNJfFASrhnXP6guBGxIzvbC wFP+0+kmoskca4e8UTy0aXxR3ktNwiwGtMZDK5qUkNCHwd3wV7cqcbfBJ5tX+3znb8Ew Oj2EKwTGHmTZuE9x8tkDY7cTE9RWUf3aRZ17+7cmZH+Bs8V9YizlYht5eHal3yH75tdh UZHOjw+UrJWa3ZrmidDVTAkt7Zc4iRR6WXZRbxe28GQxujIjQ1xp4DhXcU+3qcExRqxT M4Ow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=FhekWzHrW9NurW+RaIOThqGP3SBDgZ6s+7MlrIOk/wY=; fh=Kw9/ZdFFVB0JLIPRfsoszwSBNmzpWdaTy9y0rayA2tE=; b=eol0vBPj8YnwN2I1d5wtzxkZdWXPI60UFrifFml0wQRnW/6mPynjRnYAk7c3idXMdV LyWbLcDZ/yvICxfCaOtSom+vufpSYKjOiYZA+thJBj6v+r9IfQLP2/3lJprWJJQQasaM Kckdsv+Hn3QmdxLraONRDBARa//hzQc3OuzkGwbKkHhZDOd/Qqy3DqdGVp8XCBOu13Z7 aSemlGnqwGEvHuDlZ3snJPhthgO1ZWXS5VVR/pCihFMJY0AmceGzpsYHesAPGN5N95iA S/3isV2kORx4lGBOqrDyhFWa1Ptn9fcXzcWs7+wIiVnUCzFjnQKe2lXuCm/bkLHBfZAU 1SLw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hFpamCYt; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-206523-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206523-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f6ed63dda9si2437175ad.516.2024.06.07.10.04.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 10:04:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206523-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hFpamCYt; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-206523-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206523-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7D6F028658D for ; Fri, 7 Jun 2024 17:04:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 50D8119923C; Fri, 7 Jun 2024 17:03:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="hFpamCYt" Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) (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 178DB19ADAC for ; Fri, 7 Jun 2024 17:03:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717779820; cv=none; b=X8d8W4dWtG1Tl+tfUb/SY4Z+BdEQEMmqM30mo0vDptTWWibHB/dTtYPQl/P3oW7U24endBJnhpGt5T2oO4DIuJ3a+6lIRgpoYT057eQd52ZQQaSWbt6Ihp4CSOLr1ONxGIqUMH9fKkEhNFp+iPpDigy3/cb39gBh88VKlwMYcG8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717779820; c=relaxed/simple; bh=xABQwRoV/rPfzO361kpsP71OpAjQdGoHAsuSMSpEf8U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eBAzcLb1QPMqRQZTMpTFqYr9JpkhK0SYgFYYe2dlGCz3Dn6cR2z4CWRojD+Qs/PfCHoHjFBWr6w5PVuA8nqHWP9mk8xmNVpoHT3q3ZgjKSj2SC5+pBUV2ZHcrDokOHjKdmrxT1LN/+OMQ8pTsXdJObcPNGH+K33IpljR/gpOH2s= 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=hFpamCYt; arc=none smtp.client-ip=209.85.210.182 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 Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-702342c60dfso1901451b3a.2 for ; Fri, 07 Jun 2024 10:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1717779818; x=1718384618; darn=vger.kernel.org; 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=FhekWzHrW9NurW+RaIOThqGP3SBDgZ6s+7MlrIOk/wY=; b=hFpamCYtw/N3mIMaagyv2r/1WB8Ikv0oXO6hrq2HeR63PlpVcWwGjGhUak482wh8n0 YhJLuDFocjoKsJPf1xPDZ2h8qFYOgmwTNfDlJObeR6AiO+B9L+QPt3uleAP8pjOvU1Sw FpMI1u6/sb+MRL9J2SHAuDQMpiCDpQbsjwPDs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717779818; x=1718384618; 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=FhekWzHrW9NurW+RaIOThqGP3SBDgZ6s+7MlrIOk/wY=; b=e4rREnn2lFJCSrLnJ9AZaeIPvZ0g5cXUGml6ylri+iosjRjFcxY7pMlX4ibL7LI85S xiTlTUk647t+q4uwZ+7ZwjqNYzamYGOc9k9g7v1Np4rzUCMPSTXvOjQyMBraJIy4wpSd b4l9zCcDVYC4xUaKzpglQoksQHUGjFUGlpx4PUqcifgIjYOe2QGOna3kgZa/DLdW2eE/ Dle4f/y65RqPO7KQij2LXHkNjTi0rDmzD2ot5qnlIhc0fK1d/pssAqhwmUNZJz/I4xQa OtdzFPxfZLPOFwyJCa51CndeEW50fvp1DWHMZG6CiIRCMv1td2KVCHb79cayEsJR3Z8S gFDw== X-Forwarded-Encrypted: i=1; AJvYcCWGJ6Vr4HadHxUNeEaYqLV8Axe3VzMhXW4Ry6EfP2z3q/rY767l1Sk44nXqpkc+JlpaeJ9rB6J5FJjnei/JeakxlfdZ8cq3//tTm6kO X-Gm-Message-State: AOJu0Yw2jjmKjUf+kQA+bYFOl60rtWQ89hMLJbqwt9dzokoQEv3I6VcM fFL/GLw1t6U/gOg+Gii/UVxzr+NtPzMEYBgehXsBxNIkNkzKgYOpcSucSUPt+w== X-Received: by 2002:a05:6a20:3d8b:b0:1b0:14ee:3b1c with SMTP id adf61e73a8af0-1b2f97f05a0mr3495750637.22.1717779818345; Fri, 07 Jun 2024 10:03:38 -0700 (PDT) Received: from pc98uv11.mtv.corp.google.com ([2620:15c:9d:2:98ef:4953:160:1c67]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-6e439d12cf5sm970705a12.67.2024.06.07.10.03.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 10:03:38 -0700 (PDT) From: Daisuke Nojiri To: Cc: Benson Leung , Tzung-Bi Shih , Guenter Roeck , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Reka Norman , Hans Verkuil , Pavan Holla , Gwendal Grignou , Lukasz Majczak , Daisuke Nojiri , Ching-Kang Yen , Stephen Boyd , Prashant Malani , chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v4 1/3] platform/chrome: Add struct ec_response_get_next_event_v3 Date: Fri, 7 Jun 2024 10:02:56 -0700 Message-ID: <979b1fdaa5b3d3165e53f5429470c42581394d14.1717779167.git.dnojiri@chromium.org> X-Mailer: git-send-email 2.45.2.505.gda0bf45e8d-goog In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 -- 2.45.2.505.gda0bf45e8d-goog