Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1840180lqo; Sun, 19 May 2024 00:51:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVjCzAkkC1zas2H18E1rSevP9r/uZ4En9J0XZRP+mmc42PiDeZB+Z/cRdyqzR8Eq+5dg6jklWFJXCxfVnzh0tGy3YV26ad+ShDZoJPbSw== X-Google-Smtp-Source: AGHT+IFV5MnyVSKQrQA/zcwst8DIjQ3pT/lHfLI1X4YhbxKmHz33emNaXyxNgDwTMTAJGAJmptzQ X-Received: by 2002:a05:6a21:168e:b0:1b0:2865:fc28 with SMTP id adf61e73a8af0-1b02865ff35mr11204226637.18.1716105072582; Sun, 19 May 2024 00:51:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716105072; cv=pass; d=google.com; s=arc-20160816; b=gojAG8tsFMYkKsu6slccjy9HNWsp2sGpPZXGF8l+cwbZPXkfuxEWeT2wzsFexGjhfR yXRc75XwBmht4XjIe4AySjqiXS30KGjEeoT+s3Qga1cGpmvL/fB1V+kxURAINuBkygEs GlVjZminPMj7RTVJ9LgRdx6qqXVUpQEg6p1ONF483U1BJdlng+M5SbzBgiUdfNuMkAGb 3OK99tvkP83Nc8YxLxYVJ7p4ba2SjIGTuOV0kZh5kZnqecjiHr9IoF4gVv33gE/zKgUJ rgVloGQLe3d/79wbXe9QcYFnJxJ5zmkBOUEGHL/eGpPAwS4jqHn3urMDtPtOUnTVIUKZ IuWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=iKgg1NR66mf53wNcDkTQQUNUXEy2sROvZYc/peHt/04=; fh=fjKr+z1dbCqSEb/lVi2I7saIPknUoRfIeC3fWtKjGa8=; b=ruEK4FmCq4KD8OIk3jh4zXypPu9hdcXZaYN9oqEXOTUjuJ4IOedb6SWBx56PURvUga iKw0PO6fXg8wBxbr1mJwJSpAjOLWEaUJ8O7qowOj/YyJoBo/Mc3hEk9Cs4jN2G5fRNmy sRByDbW8BQ32OJvwFTAhKlIk/A0ALvIN6PHcCrqGG03btj+PnOWqNnW6j5VzL2YJ/kuw 7iT7UYw/s6YR9wRTgtGYj/7dADyCcsMAqjptIrn9f6NztZDY+O94v9ttAW/O+8IItJjP f2axge+l68ouSxaqWq9A/RrgSk9Lew/ji3pujvWyb+IoKGtBRgtcagh89PxNus7vt79/ wxeQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=Lz6vhAyR; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-183045-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183045-linux.lists.archive=gmail.com@vger.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 41be03b00d2f7-63413d72c33si1814100a12.863.2024.05.19.00.51.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 00:51:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183045-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=@weissschuh.net header.s=mail header.b=Lz6vhAyR; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-183045-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183045-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3ADEA281725 for ; Sun, 19 May 2024 07:51:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D7DA1C68E; Sun, 19 May 2024 07:50:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="Lz6vhAyR" 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 9850F1798C; Sun, 19 May 2024 07:50:48 +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=1716105051; cv=none; b=cK6Upe99mwFGfkgPsSSpJuJVZYRdH5dnOxxpdZlDRWUZ7QccL3dZPwOXivRatLIBCnJPKZYgOSEFvdFCEnguvv6ulWLX7s0nTqhIKOG0fiupvAYWkYpydqtZWOWoGSzN21le/HSOrRb79vSOQUgfgKNJwdJh3tNj0RYIBD/AWUA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716105051; c=relaxed/simple; bh=XEvMTmyejA92HfvXwRaxygi2nQZ9IXfpiRQKTfYa1uM=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=KkiqvbAjZS6JiV8eJ18GrGdEXJ8ucAcnz5k9qRwGAJlVtWC3ODGi72/00NsTuSGU15hwvPgkdaUsH5P8FDNqlGeaTU+tLGNkaxGvNqlGsNdR+1ssfcZA2VM2jMQo4WSBAUfAv6aB/AudyOtCrKinz5aB/zeox+2n3S4tIAdNXjY= 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=Lz6vhAyR; 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=1716105046; bh=XEvMTmyejA92HfvXwRaxygi2nQZ9IXfpiRQKTfYa1uM=; h=From:Subject:Date:To:Cc:From; b=Lz6vhAyRZm7CuzS8wdtwgjMUo8XB/5KHpbUcsaSq+94dlgB4TDQqwOIKCObCim666 cTqI4w5dS+kz8j/TyqQxZ3IMS5V3wePBgH7Fomub/ypcuDJlTSzyrAmHHp1eUFKHWJ 8K2kTnOH4wDC1d413AEuGkhUQvYCy/CygfSC9jwc= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Subject: [PATCH 0/3] ChromeOS Embedded Controller charge control driver Date: Sun, 19 May 2024 09:50:18 +0200 Message-Id: <20240519-cros_ec-charge-control-v1-0-baf305dc79b8@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-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIADqvSWYC/x2MWwqAMAzAriL9drCJe+BVRERm1YJs0okI4t0tf oaQPFCQCQt01QOMFxXKScDUFcRtSisqmoWh0U2rrXYqci4jRiWWxcacTs67csE64zHgHDxIfDA udP/jfnjfD0qbOMRoAAAA To: Benson Leung , Guenter Roeck , Sebastian Reichel , Lee Jones , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Cc: chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Mario Limonciello , Dustin Howett , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716105045; l=1339; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=XEvMTmyejA92HfvXwRaxygi2nQZ9IXfpiRQKTfYa1uM=; b=bzQAuhT2HoodDD+paM1bjPmpJqZ4jNyPrci8hFaTGj9Heh/GjTuliLL9JarHQMzpFm2NMAJj9 EvS9NyxYVEKDABUcyKwKCh1rVS1gsdb52BLgON2Kvm8nHu0Ta2eLx2u X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Add a power supply driver that supports charge thresholds and behaviour configuration. This is a complete rework of "platform/chrome: cros_ec_framework_laptop: new driver" [0], which used Framework specific EC commands. The driver propsed in this series only uses upstream CrOS functionality. Tested on a Framework 13 AMD, Firmware 3.05. [0] https://lore.kernel.org/lkml/20240505-cros_ec-framework-v1-0-402662d6276b@weissschuh.net/ Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (3): platform/chrome: Update binary interface for EC-based charge control power: supply: add ChromeOS EC based charge control driver mfd: cros_ec: Register charge control subdevice MAINTAINERS | 6 + drivers/mfd/cros_ec_dev.c | 1 + drivers/power/supply/Kconfig | 12 ++ drivers/power/supply/Makefile | 1 + drivers/power/supply/cros_charge-control.c | 279 +++++++++++++++++++++++++ include/linux/platform_data/cros_ec_commands.h | 44 +++- 6 files changed, 341 insertions(+), 2 deletions(-) --- base-commit: 0450d2083be6bdcd18c9535ac50c55266499b2df change-id: 20240506-cros_ec-charge-control-685617e8ed87 Best regards, -- Thomas Weißschuh