Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp281591lqp; Tue, 11 Jun 2024 04:38:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUkMVTh407FWk98Uvv0N2IE00EXNTrXsXovbHLxIkGRjAQhU96kLosKt9kKBq27Nth/8HxlaJTcFAtmQpWtC2SOpZNEmEPsZcZN/YQsig== X-Google-Smtp-Source: AGHT+IFYQzrcDBhEmudZJUqMDstoFWHnlE/WlncXxb/lE/HX8cXPlXoaDbrUB/YP2BYw686v/tel X-Received: by 2002:a05:6870:32d3:b0:254:b9d5:a31d with SMTP id 586e51a60fabf-254b9d5a637mr7271320fac.30.1718105895548; Tue, 11 Jun 2024 04:38:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718105895; cv=pass; d=google.com; s=arc-20160816; b=a0ElQI9Q1YYXJYVyb+lO7YffF+tqfnf50rFKkDVQotRFXSObnG0gzTwRAWIlAOR5bJ jb5BvYsAUBeWz8PwSXZWVqwpnkOwlzA5zqBMhAvB300ZoxyTiiDZDb+Yt9HkOLF+YlL0 3YU3IghnZ4iXewoLMwu06izTM91GHmShLS5FwMmaSrfsDdzt5oumVAPEmouv8NK68qDs EW20SaSQQwNa2/S6dBfSzjdanGUXHg6KqshQXCAgyHC9wj1xGFrx5nwcvZPWA+Ofzgb/ ccJKH10G42bHFPdumgLyCl1YemqVM4HPCBDt+4vVxuGcRajtSfyGPGwg01rywS0xZS6W Nikw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=62GAZfpz5G9oK84rjWFQBNXt7OqclnrMm0eEBx4Iqhs=; fh=peWqeJXZLp/mOVG4U3hKXPfBS4ktLRHiZTGhBH00Fbw=; b=ntJyc2wLumImHg4FmcdsYM/eo60ps8w+gYfxI2ykoZVkCdutwQF1qcWEt5OJo78+2v v+lfhNGFIOyTEJSl1/5Bz9+dYtTUkAzNCxBJzpt/IF2PZ3DSo9LidgoPyqwo73/Z3p6n R/Vrgf4Del6mRO4xbY46GNmtcwnKW83OdB60AUFUW5YDKuTWT6N886e83IAYhG0xkb2m DYsQ/9vGg73vUOXN9yRLhTR5sCO4AB0DkEtN308RueCd5VcTwa/O8XL/LfTYNZqtFN/s CL5KhVjlezhm+NnIlFfYCZBEf5Da6FZjtiwfX7Vkiom1Q3ul+WgiT8zk3MkLw7fX2GsR LC4w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eGeAbiLO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-209765-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209765-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-70426469c07si5531975b3a.154.2024.06.11.04.38.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 04:38:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-209765-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eGeAbiLO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-209765-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209765-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 3CA24284965 for ; Tue, 11 Jun 2024 11:38:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62B5017B43F; Tue, 11 Jun 2024 11:35:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eGeAbiLO" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CF8717B4E5; Tue, 11 Jun 2024 11:35:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718105744; cv=none; b=cjg+TJpVOEUiYNK2VLgS7Mb0Zpr1qwwJriKGTAJdDERXwVfxwXmGamFmCNGX26uc7kTJnvrlEDyvaarMSjshjR0KPpKfnD76LlRNwMYkTi5JIpBFw3YfTOzsr5BBjJ59xOtn3ufZFp3RQrLDvUnx4uiVa3Jto2EqkTg9GDPkpxE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718105744; c=relaxed/simple; bh=vIaLVeSYJywYPlUcMLIYwb/jAbrcLibb815/nDIAGBU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SLeH7/Nq8LWZqsefIL5As4tLCMqXK8NILm93hrwlej/Lov8QRbQ4Jy3iGnzcHjfFPAl1gNtcUWdsbAIgT5bsOKVuPY76UIwWtVs+PJQnxD5nKNtqLnrngjOblbdMhdFuMlsgYgbMrx3GRwOjKv2HbuvGHMbR+gpvMhSG6b2VJNs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eGeAbiLO; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54F19C2BD10; Tue, 11 Jun 2024 11:35:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718105744; bh=vIaLVeSYJywYPlUcMLIYwb/jAbrcLibb815/nDIAGBU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eGeAbiLOO3DqDwHlEs/APyA1y1dEWYbCwpzafcNR/tGNz0bvVdTtqhVi8kncr81HZ 8fljverjE72HAzzi4aT9b0MUf5vh3gRejleNYPLm7LcjrpWV0PgWYxmtWScT8Z34dH wMmo+HziDKICuEUmC/GXseLNJ3IwLldp+iiwKM6WkND+++R45Lob56f/8IrwsJCFMT Jp1iWn2909ijRn81+K9hpvAOkGYwejKopGBHAND/lOT0kAci83ubIGgSyEl9gf8XiJ Tex3N45V4jv8d0EJnnsFMKkQNefyYEBpPsXJRk0XmREr/QxSTeoQQ823C17TPHU4gG P7yucmuEf+gTg== Date: Tue, 11 Jun 2024 11:35:39 +0000 From: Tzung-Bi Shih To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Benson Leung , Guenter Roeck , Sebastian Reichel , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , "Rafael J. Wysocki" , Len Brown , Robert Moore , chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Mario Limonciello , Dustin Howett , Stephen Horvath , Rajas Paranjpe , linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, Matt Hartley Subject: Re: [PATCH v3 3/5] platform/chrome: cros_ec_proto: Introduce cros_ec_cmd_versions() Message-ID: References: <20240610-cros_ec-charge-control-v3-0-135e37252094@weissschuh.net> <20240610-cros_ec-charge-control-v3-3-135e37252094@weissschuh.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240610-cros_ec-charge-control-v3-3-135e37252094@weissschuh.net> On Mon, Jun 10, 2024 at 05:51:08PM +0200, Thomas Wei?schuh wrote: > +/** > + * cros_ec_cmd_versions - Get supported version mask. I guess we would like to call it something like "cros_ec_get_cmd_versions". > + * > + * @ec_dev: EC device > + * @cmd: Command to test > + * > + * Return: version mask on success, negative error number on failure. > + */ > +int cros_ec_cmd_versions(struct cros_ec_device *ec_dev, u16 cmd) Could it support a "version" parameter as existing EC_CMD_GET_CMD_VERSIONS usages use both versions? An `u16 cmd` parameter and down-cast to u8 for v0 should be fine. (ec_params_get_cmd_versions vs. ec_params_get_cmd_versions_v1)