Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp45682lqh; Mon, 6 May 2024 10:43:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXbJ/FC6x9Bs2se92+E/zmMg0olHj7VWWCOHQFknJlkCB6uNdnkAUeSWtFtIF23KMrOZGxekg/3IU4m/VXFSOS3m9AWGvC+bCm4Pl/MaQ== X-Google-Smtp-Source: AGHT+IGVX0Fyp26GPkbGIGv84D0R/bQx+NOY+Eix9Rjna615Ft2NnsIUh8rNG1F28EGq5bo+R7bT X-Received: by 2002:a17:907:980b:b0:a59:cf75:90f with SMTP id ji11-20020a170907980b00b00a59cf75090fmr2153640ejc.60.1715017423901; Mon, 06 May 2024 10:43:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715017423; cv=pass; d=google.com; s=arc-20160816; b=Y5RQ19PMsKYtOLs8MdHWnF7P4k+V/Qgl8MZB4Ni1vVGCx2LS6disHRCEGeA22FIQba SWT7oYHP2im7gRPh/MJEH0EDsB7nQlR0m5yJFQSE6a1p2kol2gl3RCzCrdZQYs1QTghl a2j8g1w5KbzCAlX+et08sxIgeTVYL+3fMlTtNzLV/VhMxR9JH4XhgEJQ9cQSL11IbfsK Fx+vXNYUyouIZxZUbSHVFIfGJKAR/LN4fsF+BZMM/2EXXKdFqPlByEqG3cK6lhheO2xa PF0rqWtd4uPg4P6TXQjmeRIscl02i24TYpMtQVBxLGHScmr0oBpaXdFuCTn393ONLTY9 z0eg== 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=cZR0T//Nck1x/qzUsICBSVx7J40TMSzbRBpjmjOeyQ4=; fh=cUvXs0l0by2Zp6rblCztSSHsHNNfSGQF8mqxNLZykBc=; b=XOqzrjah2AGpZIGIK/bJw+Izl+Rp1tlJYuXT1WdGjPHRd6KP4SdlzYKWLNjvhh1U8Y THHmHMwP/WrdV6dQuYaq/taQO5JPGSD1pXY/MnyPlca5PL7m0Hd1zNB9uu7fQiJ9IPtw zMo/c5wabQbM52G8D514FoWbR+x5vaFJnim897Am0PLJvb5uALxvqJnAa/a066v3C3VF T369H/CxWAJYpavIr8sCTIHRPHMTPp4bUIvbQePIXyx3YOVBVbuUlr4iNrvlSdHl2aY4 gLqjsJbl9rEOp90tBOiUcTMVBdbvpMYzQxBVZvx94B4NmU7ZlLCQeIqPYtmmlCs2UMSl 9F9Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=H2AsBzTH; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-170240-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170240-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id w20-20020a170906d21400b00a58e2b1947bsi5148255ejz.406.2024.05.06.10.43.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 10:43:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170240-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=H2AsBzTH; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-170240-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170240-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 91A4D1F218FB for ; Mon, 6 May 2024 17:43:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D5EB8157E7A; Mon, 6 May 2024 17:43:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="H2AsBzTH" Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 93FDC1F19A; Mon, 6 May 2024 17:43:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715017414; cv=none; b=ShjB850D+kS5TH96hQ/mFG/3dY7i/eKbR7uYRKLkpIq0b9FFzK8XKCMHymmS6zmxa22b9MPD1vhNkPSho500octTomuEMroGMEfQcRpeqaOIKTU2RkD2fFFwmsQSWKtINAbac8u3foDBMjPSI7m2Nvbe/qdew+Jf7i50hvcwOYQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715017414; c=relaxed/simple; bh=i3HUuCZX9m/2gBCCOy4OI5YZMvQOTnUrERxRlGeDnbM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ow3mZj70BPeZb+6UsvhZ6nZ9AlCGuHKrv+CRGHN9y3s3TfAEYugUftb4jFskFk8IDHACSAuV0Vmko3TMu85r3rIlV+r7H3HpMbtQzrb4XuV2evNBhwFqBWlLyw0RmHMdry/DEVVKOCvaaCAVXOE0Z6V4qyZ2s9vrZdA3IR0mrho= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=H2AsBzTH; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1715017410; bh=i3HUuCZX9m/2gBCCOy4OI5YZMvQOTnUrERxRlGeDnbM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=H2AsBzTHkaZcXzgt/JDQfmrsQAjTfV7J5THSVYd4VDTan9vQQlPM/Vf/aCVQHyQCz V6blYP+LSUQ3pHyp/rOhQVHCYz/5bdFQPr3XjSIkj4s5UBT3XyCk+CQKvoFce9okmQ xwqQTIzmKXuS5CQfHEOLLL9v2w5Z74eprETEX2rg= Date: Mon, 6 May 2024 19:43:30 +0200 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: "Limonciello, Mario" Cc: Lee Jones , Benson Leung , Guenter Roeck , Tzung-Bi Shih , linux-kernel@vger.kernel.org, chrome-platform@lists.linux.dev, "Dustin L. Howett" , Sebastian Reichel , linux-pm@vger.kernel.org Subject: Re: [PATCH 0/2] platform/chrome: cros_ec_framework_laptop: new driver Message-ID: References: <20240505-cros_ec-framework-v1-0-402662d6276b@weissschuh.net> <613369f9-42c5-4a59-b83f-45bd1773ffe4@t-8ch.de> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On 2024-05-06 08:09:07+0000, Limonciello, Mario wrote: > > > On 5/6/2024 1:09 AM, Thomas Weißschuh wrote: > > On 2024-05-05 22:56:33+0000, Thomas Weißschuh wrote: > > > Framework Laptops are using embedded controller firmware based on the > > > ChromeOS EC project. > > > In addition to the standard upstream commands some vendor-specific > > > commands are implemented. > > > > > > Add a driver that implements battery charge thresholds using these > > > custom commands. > > > > It turns out that standard ChromesOS EC defines EC_CMD_CHARGE_CONTROL. > > The kernel headers however only define v1 of the protocol, which is very > > limited. > > > > But in the upstream firmware repo there is a v3 which is much better. > > > > The Framework laptop only implements v2 which is also fine. > > Given that v3 was only introduced late last year, it seems better to > > stick to v2 anyways for now. > > > > So please disregard Patch 2, I'll see on how to use this via a normal > > cros_ec driver. > > > > There are some other Framework-only features that will use Patch 1, > > so feedback for that would still be good. > > What other kinds of features do you have in mind? There are at least fan and privacy switch reporting in which im interested. But fan reporting also has a standard command which I'll try to use first. And then there are many others I'm personally not interested in: Fingerprint LED configuration, Intrusion Detection, "Standalone mode", some diagnostics, etc. Especially as they can also be handled from userspace. > Considering your above finding I think it's better to put patch 1 into the > series of "other framework only features" that will use it so it's clearer > if it's the best way or not. Agreed, that is what I tried to express. > [..] Thomas