Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1202409lqh; Sun, 5 May 2024 23:10:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV7vjlIHx8S/aYvaOLq3nZQaAI7f2gxjO8mAxTfIH/uCGKSLPVKhBEacLR3r3ZtQ3oMnSkucNJHINPxOdTJf++9ViK4zsp3RWUSR+pQAQ== X-Google-Smtp-Source: AGHT+IFWyQULyEfGfM4cP6i5y7x2kdLbzOVwS6Xdakw4mAh3hcSw9wMxk1zzWXQWojWUXw8xDpxX X-Received: by 2002:ac8:5f09:0:b0:43a:b8e2:5870 with SMTP id x9-20020ac85f09000000b0043ab8e25870mr15222602qta.3.1714975812582; Sun, 05 May 2024 23:10:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714975812; cv=pass; d=google.com; s=arc-20160816; b=Vb670xR8N14epb1qKs5tgqXlSVBnIOC4x5+hjnycw7TXchXQfPlEN/ZCAFN4rrABnO Ac3Txf6UWaTJNCG+nRj7jGNXvGzjjUdz/Rt38PWZdToTHA/vEoz+qsvbO7gdaOAA8iWT ocbDWMwV7r5wSKc3CpJ0zzlzkOwZ7vEK8riM8KVTopnSm/YnNvewvqg0EH2/qzMbIFu+ XH7sHV+E1bHrWEco+bNXHLHsOy7v1w1uBMuEOzCUd5Gm9mo8TSY7ygw5jg13W/akQqBy W1UVsSNDMphKWWj9RuuFzfrQNjo+fLyQmwhpylmnalmhOkGQdbN/LcTBhOd2bUs2R83c r0aA== 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=mdJsL/hfg92JLVambBe/XwxmRDkpgi/4RM8ZOa0eVUM=; fh=gUMgRQgbrfb5UVK5VFpEU1Dcr3mdSpZH8lLwUjy2kzo=; b=W9McPIjp85y2YjNOHSrWhPdFbOI2KFs2l47Qp+/XsclJtWmQaC9IuOdCmc0QSSEhbv kjNJwFJXxrCp0IB5qpwpnryO2l5Ia9ndr9DxTN4AjxBjJ5n/fx5W8fG+QBidwXDFqaRS FWLKWb9qvT2iw9ENokXeVYrDIWYp3yFfAvBvcgNad4OBzuUcQioyejgSKXkZOu5idfmI iCcCaCQqJQs6eoI06gxSRXPoallSs3TSRvfvUAWb6u9ZjvHCmILLTuhsw1oZSsDd5iN8 Uk6rZ4bC9E16626kq18d8jjP3vvv3YTc9OPR134xr3FxmkjFoCPTvYMv8i/Ml9zz0RFi tbCQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=Nq7NwWfy; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-169344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169344-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id k6-20020ac85fc6000000b00437baf8407fsi8927494qta.7.2024.05.05.23.10.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 23:10:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=Nq7NwWfy; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-169344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169344-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4E0871C20A0E for ; Mon, 6 May 2024 06:10:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 494C24AEF8; Mon, 6 May 2024 06:10:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="Nq7NwWfy" 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 6D358481B1; Mon, 6 May 2024 06:10:01 +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=1714975805; cv=none; b=dpRn0fw/mnFcnu3M1J8Z8TYrpLGV2V/TYJbeAawlLo5mUmTpI4TUS9CzoBSt9GabPlrGE/E3z1nR9W5KhocatOzoHmTRseTGpLM0NK9qT/jMmPmZJ4hnsl5yekgjjhK9qkObJyBUywut8oBomL/sMzJ3VR4DI6k80la29ck80GY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714975805; c=relaxed/simple; bh=sTMZwmVGPyNKhVYaypjAEtdGkY8Q2/gSqqldEhiPQqk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ahVSeLmz/Jwcdhyx2M/DA2q6pdDvU0YgJGvujK+/WgsCH9mCn4FN/1V3CXv2JanZoCQbYqZhhDxxMSjGFLnqLOGCvKbnAhmFWwi22nGgn9j1xkbe3eDXnk7DAc6aF9Nj2GZKZh+Cf8PeJvbccWt9zcnIRWmSfaDPNdGOluGiJdg= 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=Nq7NwWfy; 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=1714975798; bh=sTMZwmVGPyNKhVYaypjAEtdGkY8Q2/gSqqldEhiPQqk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Nq7NwWfyIHEM9rx4m3EW9x7iHW5HxdwFIn3MhCb1fe4y1YRqXbJfAfMZwfHMGWH8i o43//nU43fPNTKQicGKJkjceFsXt6in8V9spgOouL5ttXQJU0/4B0B1bOYzga/KFDE 7Iurd9ZEwDVR1y70bCHQj/5yfM/X5WBu6Vk7OKK0= Date: Mon, 6 May 2024 08:09:56 +0200 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Lee Jones , Benson Leung , Guenter Roeck , Tzung-Bi Shih Cc: linux-kernel@vger.kernel.org, chrome-platform@lists.linux.dev, Mario Limonciello , "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: <613369f9-42c5-4a59-b83f-45bd1773ffe4@t-8ch.de> References: <20240505-cros_ec-framework-v1-0-402662d6276b@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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240505-cros_ec-framework-v1-0-402662d6276b@weissschuh.net> 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. > Patch 1 adds the general scaffolding and device binding. > Patch 2 implements the battery charge thresholds. > > This series is based on > https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next > > Signed-off-by: Thomas Weißschuh > --- > Thomas Weißschuh (2): > platform/chrome: cros_ec_framework_laptop: introduce driver > platform/chrome: cros_ec_framework_laptop: implement battery charge thresholds > > MAINTAINERS | 5 + > drivers/mfd/cros_ec_dev.c | 13 ++ > drivers/platform/chrome/Kconfig | 11 ++ > drivers/platform/chrome/Makefile | 1 + > drivers/platform/chrome/cros_ec_framework_laptop.c | 173 +++++++++++++++++++++ > 5 files changed, 203 insertions(+) > --- > base-commit: 2fbe479c0024e1c6b992184a799055e19932aa48 > change-id: 20240505-cros_ec-framework-10e627c46a0a > > Best regards, > -- > Thomas Weißschuh >