From patchwork Thu Jun 6 17:34:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daisuke Nojiri X-Patchwork-Id: 13688843 Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (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 4FBA319645E for ; Thu, 6 Jun 2024 17:35:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717695344; cv=none; b=la0/4bN5YcJOwELcfrx+SONyZVzrXDRRSGoQmNaegor81Wss78KwSjpGmto7MdAgyR1UpCq84XF0r9jVDyVyw9oPcqDWfyHlu3h7ay9J0LpIqNCAP8fv1R3epbLGq9qnQlGWXhHvoTK2An9TCmXt7FstJ6TPMpOst2zZNYFQ5is= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717695344; c=relaxed/simple; bh=xABQwRoV/rPfzO361kpsP71OpAjQdGoHAsuSMSpEf8U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=O4GVV3Px/YcBu1Q71bJ+ZUtTp9vZsEbF0/HgA21zLeOwDbhPGrtELy77EU8tltTsOrtp6g+ZihRxeM+Sd0Nj8N91ptL/+641EeOwN7CG49u23BcLRlULq67EZlSR916lYpVUpZgBoHoA77M3t1IIF5mVjlFh4IFte972Kb8WwdY= 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=I3C6U6ir; arc=none smtp.client-ip=209.85.210.180 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="I3C6U6ir" Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-70264bcb631so1070200b3a.2 for ; Thu, 06 Jun 2024 10:35:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1717695342; x=1718300142; 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=FhekWzHrW9NurW+RaIOThqGP3SBDgZ6s+7MlrIOk/wY=; b=I3C6U6ireXGedg63IzZH6PLqRkj9QrHa8y1fORZqcAMUFHwJ4wQDtNe+GEqEWh0izV 3xU6OUfChOR4eYZDjTmHqa35PgqzAqv/N0aMDXfofstp9X4Rmfm3ZrvzR2Zh8vEw6ihj VOOk4ozmr0NEtzupcnbCqEQVexPwfmO6lzfJ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717695342; x=1718300142; 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=ldDVk5ZUj+Q1QErR44TxZpZvI3G6/LUV/gfLG6GO8q29718DxmWIaLGqTv0OI++TDQ Vw/R1NIpUhql0Zz5yoFxMu14TEvn55qNVxZCxKP0IVvp9v9IuBvRK6vNxyQXpaamzUlG GqmJWn6yTu4J03pGasyMtwyIl//24iGBP3yTwy3TnHY6/0zhHbBM3wxH/aaTjNqUw1tr EnVrhwhwdM9bhePn7GVNuh956Nf6KIMcTkpY42sfx5R+yd0doxlNlpDg29j/+xaFwgM5 yDBlHd405NMBKWB2IHWlTVUJurlUyllA3HWN2fmNhMk5jK+NujWQUAjZb3nzpxhvP3yI c6gA== X-Forwarded-Encrypted: i=1; AJvYcCV0HIZgxqAKGz1NV3SwEHesoSZ8/rT5seZyIGlElFrP+or3XBRegQSB2KUd3bjKUOvNJ74tL9HBmVgDrj7tYQ1Qxfsr5wHccBr2Li+JUKyF X-Gm-Message-State: AOJu0YyqA8tlkUxvildQZGPaYXTIoTcvjVdaNBrE5X9GkJboJLvuDw7p Bt1nKaf0W8wdeNDEMjrmONUR7BRqj1WSVzOOZurKKShcGMDSrU6UgBvC54MW+g== X-Google-Smtp-Source: AGHT+IGqky3MNy6C2rzmt/288+9Xbb/3YZaZphiKwa4B9QhEBIhCOCT7QnAC/sV7qoLsAhgL5gCPbA== X-Received: by 2002:a05:6a20:7f8c:b0:1af:fff9:30dd with SMTP id adf61e73a8af0-1b2f9bd93c6mr270327637.35.1717695342540; Thu, 06 Jun 2024 10:35:42 -0700 (PDT) Received: from pc98uv11.mtv.corp.google.com ([2620:15c:9d:2:3fe9:f321:712c:442f]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-703fd375503sm1334904b3a.42.2024.06.06.10.35.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 10:35:42 -0700 (PDT) From: Daisuke Nojiri To: Cc: Daisuke Nojiri , Benson Leung , Guenter Roeck , Hans Verkuil , Reka Norman , Tzung-Bi Shih , Gwendal Grignou , Abhishek Pandit-Subedi , Pavan Holla , Ching-Kang Yen , Lukasz Majczak , chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 1/3 v4] platform/chrome: Add struct ec_response_get_next_event_v3 Date: Thu, 6 Jun 2024 10:34:28 -0700 Message-ID: <20240606173509.243739-2-dnojiri@chromium.org> X-Mailer: git-send-email 2.45.2.505.gda0bf45e8d-goog In-Reply-To: <20240606173509.243739-1-dnojiri@chromium.org> References: <20240604005354.2294468-1-dnojiri@chromium.org> <20240606173509.243739-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