Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1394263lqh; Mon, 6 May 2024 06:37:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWWKab8mPIDP5tADU79Vw8OqZDnGIUd962AoXHdLMzJ678NSnYXnE2/4kfrB3RG4le8zGRaJTtPhYab1d1fHjNd8IqcUOBJqiBIzeXotg== X-Google-Smtp-Source: AGHT+IESBpNtBm5qarmbVGCZtsaww/sduuucmPbVn1j/4HiFWVYtSpeQPkkqA4m3w3t8dW8uTBfP X-Received: by 2002:a05:6358:7f02:b0:18d:8ef1:e77c with SMTP id p2-20020a0563587f0200b0018d8ef1e77cmr11388744rwn.15.1715002660932; Mon, 06 May 2024 06:37:40 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id s68-20020a632c47000000b005f8008f3c8asi8234230pgs.370.2024.05.06.06.37.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 06:37:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169869-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=2HfSu3eO; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-169869-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169869-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id EB77AB22475 for ; Mon, 6 May 2024 13:11:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B0299763F8; Mon, 6 May 2024 13:11:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="2HfSu3eO" Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2043.outbound.protection.outlook.com [40.107.244.43]) (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 4595D15A5; Mon, 6 May 2024 13:11:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.43 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715001065; cv=fail; b=Q2xE047qhmfuP0DkjNk9xKdgHwga/Z+x5VGhRZyAWEOZ+majL6fM+8mzXGpHvqGSWaFirbVxXVzANybu9lwL/ZhRftfi5PH+AogFmRpm97Ax+aMHqpaZWLmJDQK3DL4UL9Hc/GaEtQaRRmXLp8OsqCf5qWdJlDmzUacDvw9++ek= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715001065; c=relaxed/simple; bh=I2WZx05G43wpMpGhtNvK45mTlTVdRySVeR3zh3m9Evc=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=lTcgV+MoUbuoMDQJXn9fA8MExFRzpKQCyDkI3ZGd/nQ5aKFchcxsTNu91i4g+fla/NxJq98jIQ7D/IhKg3FwGqN8jU6rRYg9Dk34LYntJHQdqh3YosVBwuok0QR/uRBrFjqXn2fsbrYswlieDOjIVl5IKTsLZtxCnF4pAjT/7k8= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=2HfSu3eO; arc=fail smtp.client-ip=40.107.244.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BrNG5xAFmJaM+FNETJRtIDDhijNkpxcRfjlps1QlE4UCYtKRlNPYxbN5gskZLdgTl0QHSiHX/jRbzet8JWrTLTE9t9urIDBaXUPJtgNxsDeA/2B8CHV4IZajPQSKvES5yr5ZdSYuHk2dwtaJ1/Ugffs8ZbyX2ZvgcWA8c7Y2/Ew3KPofBXwOaWyy8yQTskdkLQz2JQxncmI6VxRhYD/mJ3jsf6foZTf4rbtuKW8y9ljqsTFf/qYSZeXtHUM+UUX665J7KaJSjWdLP616NUM96t5N79HNf70NZUu9HVn/rOdwyiDtXVEr0WfKPYyh1lgk5DQXtSQQO8f2AN731VlVcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aS7/e5ZXiGxR9u7yL12xU0hnIRnwCAC4NSddNp0uWQk=; b=kvppR1bToCuiOkxJ+byKUF5dWcZIvPif35DsXitHp5EyNyTzZ55kG4970+iagGVPAqasVqTPpkSpPDSXvQcgaFu/4ddtZz24l61aXfUif6Oh+wQjESxOZoDznz1clCu9s3rvH1lWtCGwmX34LCP4mHdWGBBF4iCTdOJ6uF40W2Ki4TGE/wG0veF6ywNc/ElNewH39amudVsn9Nr6mreen8ewGxX45+mCM9/3v5DwrjHz+0hk/HIIV3jQ0Z8aDAtNA4QsuBASHEzQ7qKAntXTtBEOPZDLjaAfsqefhMe9zisWilHw1y8yEQ70jeeVOLw9m/n9UrROXzox+YV+Bvw0+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aS7/e5ZXiGxR9u7yL12xU0hnIRnwCAC4NSddNp0uWQk=; b=2HfSu3eOxCQe9hXG34OUOqkDqOnLbuFCjiukach0g1EDQfgVKnUTK277tJKLLy9Omp0tCPlzP4Dw83JsDnQIJsccMh/RxBNMqc8Pc+sxISwirWK/U9nanKcMp5PTdhJ3AUm5+3EnY5zr9IoEeXY+fGaKm+qjz/rqWMWq4hSeJiQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) by SJ0PR12MB5609.namprd12.prod.outlook.com (2603:10b6:a03:42c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.42; Mon, 6 May 2024 13:11:00 +0000 Received: from MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::37ee:a763:6d04:81ca]) by MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::37ee:a763:6d04:81ca%6]) with mapi id 15.20.7544.041; Mon, 6 May 2024 13:11:00 +0000 Message-ID: <84c58078-93a4-406a-8abb-9054854e54a0@amd.com> Date: Mon, 6 May 2024 08:10:58 -0500 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] platform/chrome: cros_ec_framework_laptop: introduce driver To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , Lee Jones , Benson Leung , Guenter Roeck , Tzung-Bi Shih Cc: linux-kernel@vger.kernel.org, chrome-platform@lists.linux.dev, "Dustin L. Howett" , Sebastian Reichel , linux-pm@vger.kernel.org References: <20240505-cros_ec-framework-v1-0-402662d6276b@weissschuh.net> <20240505-cros_ec-framework-v1-1-402662d6276b@weissschuh.net> Content-Language: en-US From: "Limonciello, Mario" In-Reply-To: <20240505-cros_ec-framework-v1-1-402662d6276b@weissschuh.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SN4PR0501CA0018.namprd05.prod.outlook.com (2603:10b6:803:40::31) To MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN0PR12MB6101:EE_|SJ0PR12MB5609:EE_ X-MS-Office365-Filtering-Correlation-Id: 4a950818-c05b-4b43-894e-08dc6dcdf99d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|7416005|366007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?WWZoTFdWVENhUGVLSk1sMEZkQlFacldWZWZmNzI5RUtRek90NXRKQUExUDd3?= =?utf-8?B?aFQ1VzVLS0FMOFNJVlExYUxoM1haMmpkMTZSbVB2SEUyc3EyWXJ4eW1UUXRS?= =?utf-8?B?cXhkWnZLcUhwUDJ5bUltcjZTWnhhL0hvMzJrNlJjNGhiNUxvMXY2cUE3RFRS?= =?utf-8?B?ZEFVMVRIQnFDUStMbnpRQ2pCWmdoMHc0aUFmRkNOc3R1R1BRRm5PSVlmVHVJ?= =?utf-8?B?SHkrb0tMRmcrSUxYVldqV2xZNmduNXk4MlJGMkkzN2JmNlpRdm5KTzl2eCtL?= =?utf-8?B?MzNQUmJmdWxpNFFiZkZ5QTZDdkt1blNjTGZOZ0NFblkvbnQ5NENNeUwrV0xv?= =?utf-8?B?N3hvQ0duK3N5a0RuQW55cFVZWW8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B?WlJNbmM1bFJkM2c1NUpFOVIwZ0dHVUQ1RlVCQjJtcFAxZ25Ub0Z3NTQrd0t5?= =?utf-8?B?TGpuaXFNRUxmWS9UTWhxRzc3Tm8xOS9lQXVnT0NtcWFobWhjaTV6LzF6cm1t?= =?utf-8?B?ZEtuWDdQa0dSeXNpNkhsZnQ0Q3NlOVVrUVY0ZjE0eThUaE16TDgwSWNzTWRl?= =?utf-8?B?SG54bWo2ZFRpQ0xRaGs1R1VmOHJFY3k1N01NUmxaNnRyVnorOUQ3L2k1bSth?= =?utf-8?B?RC9QbDVIOTJ4dTZTejI5MWdRbG9lMzU0N000K0N6Nm9iY0wvaTJVZkRtdGxj?= =?utf-8?B?OUVMRk5FTTBjMzZVcVVVNGZiOVZXTkdNMExkYlNYNnFmMzFjWjlVKzhqVTdC?= =?utf-8?B?NUlqM0JKZ0orNzM5L3BRTkE1NW5mUmRJQTlqVmpmbHpSM3BZL2NObGs0MklP?= =?utf-8?B?U0hTYVh5ZGhxSExvVHFoTE9JdHZJUGxMZmtaREh5R1hsN3FxRWpSZExBPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN0PR12MB6101.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(7416005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cVNvVEt6dEMzYjJrSHg3ZG1QRXVEd29UaFI2VVZkTU5ZUDV1dm00WUpBVGor?= =?utf-8?B?V20wOXZ4V3NNNzVGaGduNDVLaGsrWHR5R2ZaTEtxQ1E3c2hwbDU3ME9QYjFL?= =?utf-8?B?YkZ0ajU4L0pETCtrVnJKZkk1QkE2NktpaVBCQUpXdmRYZWw2Z1RPa2tRM0JH?= =?utf-8?B?MnlVSmVJZWxad0ZlMkZ4RElxQklDUHl2YTMyN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0QzQjNWcWY2MjFFVmVuaWJwdVlFM2RUOEM4OXoxZ1lqSXgzMHpqdXhn?= =?utf-8?B?Y2ZWNUNHVS9RWmw2QkdsWmsvbFlVSnNTS0lEOU51Z3pHQ3NrYlJscDMwaVpE?= =?utf-8?Q?g0fNKeFKk/AelA5aoeUQpHMeZ?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4a950818-c05b-4b43-894e-08dc6dcdf99d X-MS-Exchange-CrossTenant-AuthSource: MN0PR12MB6101.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 13:11:00.4991 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4CpCdjcunnMgg8p+rZV7Hs9S5lC8iETWtXdcZtCGmx29+tbWqHx0Mxk/1S0Ic1G4t/pUVoPtySgqtq24s+mV9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5609 On 5/5/2024 3:56 PM, 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 > ones are implemented. > > Add a driver for those custom EC commands. > > At first, provide an empty driver that only takes care of scaffolding and > device binding. > Further patches will add functionality to the driver. > > Signed-off-by: Thomas Weißschuh > --- > 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 | 53 ++++++++++++++++++++++ > 5 files changed, 83 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index c23fda1aa1f0..60699c289757 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -4988,6 +4988,11 @@ S: Maintained > F: Documentation/devicetree/bindings/sound/google,cros-ec-codec.yaml > F: sound/soc/codecs/cros_ec_codec.* > > +CHROMEOS EC FRAMEWORK LAPTOP EXTENSIONS > +M: Thomas Weißschuh > +S: Maintained > +F: drivers/platform/chrome/cros_ec_framework_laptop.c > + > CHROMEOS EC SUBDRIVERS > M: Benson Leung > R: Guenter Roeck > diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c > index a52d59cc2b1e..0a36e77e5039 100644 > --- a/drivers/mfd/cros_ec_dev.c > +++ b/drivers/mfd/cros_ec_dev.c > @@ -145,6 +145,10 @@ static const struct mfd_cell cros_ec_vbc_cells[] = { > { .name = "cros-ec-vbc", } > }; > > +static const struct mfd_cell cros_ec_framework_cells[] = { > + { .name = "cros-ec-framework", } > +}; > + > static void cros_ec_class_release(struct device *dev) > { > kfree(to_cros_ec_dev(dev)); > @@ -299,6 +303,15 @@ static int ec_device_probe(struct platform_device *pdev) > retval); > } > > + /* The EC on Framework laptops implements some nonstandard features */ I don't think there is a spec really for cros_ec is there? I think it will depend upon what features you're talking about if this is the right way to go. The reason I say this is that maybe some of the same kinds of features will make sense for chromebooks that use cros_ec in the future and thus they should be "generic" cros_ec mfd cells to probe for in some way. > + if (dmi_match(DMI_SYS_VENDOR, "Framework")) { > + retval = mfd_add_hotplug_devices(ec->dev, cros_ec_framework_cells, > + ARRAY_SIZE(cros_ec_framework_cells)); > + if (retval) > + dev_warn(ec->dev, "failed to add framework laptop devices: %d\n", > + retval); > + } > + > return 0; > > failed: > diff --git a/drivers/platform/chrome/Kconfig b/drivers/platform/chrome/Kconfig > index 073616b5b5a0..ff69ee226606 100644 > --- a/drivers/platform/chrome/Kconfig > +++ b/drivers/platform/chrome/Kconfig > @@ -239,6 +239,17 @@ config CROS_EC_TYPEC > To compile this driver as a module, choose M here: the module will be > called cros-ec-typec. > > +config CROS_EC_FRAMEWORK_LAPTOP > + tristate "ChromeOS EC Framework Laptop extensions" > + depends on MFD_CROS_EC_DEV > + default MFD_CROS_EC_DEV > + help > + If you say Y here, you get support for using Framework Laptop-specific extensions > + of the Chrome OS EC. > + > + To compile this driver as a module, choose M here: the module will be > + called cros_ec_framework_laptop. > + > config CROS_HPS_I2C > tristate "ChromeOS HPS device" > depends on HID && I2C && PM > diff --git a/drivers/platform/chrome/Makefile b/drivers/platform/chrome/Makefile > index 2dcc6ccc2302..ce6aac620086 100644 > --- a/drivers/platform/chrome/Makefile > +++ b/drivers/platform/chrome/Makefile > @@ -10,6 +10,7 @@ obj-$(CONFIG_CHROMEOS_PRIVACY_SCREEN) += chromeos_privacy_screen.o > obj-$(CONFIG_CHROMEOS_PSTORE) += chromeos_pstore.o > obj-$(CONFIG_CHROMEOS_TBMC) += chromeos_tbmc.o > obj-$(CONFIG_CROS_EC) += cros_ec.o > +obj-$(CONFIG_CROS_EC_FRAMEWORK_LAPTOP) += cros_ec_framework_laptop.o > obj-$(CONFIG_CROS_EC_I2C) += cros_ec_i2c.o > obj-$(CONFIG_CROS_EC_ISHTP) += cros_ec_ishtp.o > obj-$(CONFIG_CROS_TYPEC_SWITCH) += cros_typec_switch.o > diff --git a/drivers/platform/chrome/cros_ec_framework_laptop.c b/drivers/platform/chrome/cros_ec_framework_laptop.c > new file mode 100644 > index 000000000000..8a8bf039fa9c > --- /dev/null > +++ b/drivers/platform/chrome/cros_ec_framework_laptop.c > @@ -0,0 +1,53 @@ > +// SPDX-License-Identifier: GPL-2.0-or-later > +/* > + * ChromesOS EC driver for Framework laptop > + * > + * Copyright (C) 2024 Thomas Weißschuh > + */ > +#include > +#include > +#include > +#include > +#include > + > +#define DRV_NAME "cros-ec-framework" > + > +struct cros_fwk_priv { > + struct cros_ec_device *cros_ec; > +}; > + > +static int cros_fwk_probe(struct platform_device *pdev) > +{ > + struct device *dev = &pdev->dev; > + struct cros_ec_dev *ec_dev = dev_get_drvdata(dev->parent); > + struct cros_ec_device *cros_ec = ec_dev->ec_dev; > + struct cros_fwk_priv *priv; > + > + priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); > + if (!priv) > + return -ENOMEM; > + > + priv->cros_ec = cros_ec; > + > + platform_set_drvdata(pdev, priv); > + > + return 0; > +} > + > +static const struct platform_device_id cros_fwk_id[] = { > + { DRV_NAME, 0 }, > + { } > +}; > + > +static struct platform_driver cros_fwk_driver = { > + .driver.name = DRV_NAME, > + .probe = cros_fwk_probe, > + .id_table = cros_fwk_id, > +}; > + > +module_platform_driver(cros_fwk_driver); > + > +MODULE_DEVICE_TABLE(platform, cros_fwk_id); > +MODULE_DESCRIPTION("ChromeOS EC Framework Laptop extensions"); > +MODULE_AUTHOR("Thomas Weißschuh +MODULE_LICENSE("GPL"); >