From patchwork Wed Nov 13 17:54:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13874061 Received: from OSPPR02CU001.outbound.protection.outlook.com (mail-norwayeastazon11013024.outbound.protection.outlook.com [40.107.159.24]) (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 697B820262B for ; Wed, 13 Nov 2024 17:55:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.159.24 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731520510; cv=fail; b=BMdUeH3gILWWQlb2dTudX9BNjUaLFrDRM1Ie/8kNqYlTD/1OT3CZvG/MmuSoO2nYrP7wzesT7UIPxiBPs0FD2yDSUcPPKZu5cfctsRjqY9FMNvgLClZs081GH2YCylKbRhZXCk/oqHz5KwTEvbsystXQVGTpEbeFkqOwldpAGgk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731520510; c=relaxed/simple; bh=7/2wRa3n5CBWkt6bMkDSJRlp1PjVLsjIYahkqDJh+I4=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=Y97LxoXTNaZAcajL+FdQzjoypki0PMAUiANcPrLz25TfX3gu9sHBQaO0o1zYCrgLm/JB6O9WyuK1LFAD/gvVV+bhvZ/PNrrQ7j4H2uaan7gWo/ZDx51ly0jQlmjIsxXPVG2NjsApl+HBncSLMD8R2gzk+5AQUhb/FeMLMZtnoII= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=FYgt1R3y; arc=fail smtp.client-ip=40.107.159.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="FYgt1R3y" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XH/rH0q0PVRO+rCy8tIpHdlEgsvZxW1VlI0OKNnr+YGJNrJi6VP8EAdHhhzU/6c7TdzcN6a6txnLyH5ihAFL3hGCfZZri2iKsfCN89LJ5skG5DfNNjXd4XytJnOMle4JMWqzNYZRIwo33MQKJKXe0HfDEm/hgrSXlRysDPzEMRwWZlC6OSWzRxQjTvTwZ5NPt63XCt5m4rwzjMlnQyVTK2ElGvAHbXQ9pn8EyB1yDiUpbVzdRVid7oAiVrg1yoabKFp9+fim2JDtQMQczt9m4929Coh8Ej73hf8gdfKMiDHsqD0votqYGKZeboCozGP7MZDcXXJl6FvSLU4Gn4VR3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=I0u3yXU+87xe0r3eWOM2iIaTyB3qz+j+auxb314LVEo=; b=e1tpFJBfSKcJrKoW9tyGbKIzKG3M3PKKxaA8n1eJbkZWCjEaU095z427vE2uCJpsSrylpgFB6ZrRnyHROrl/J+badNpGQbj1/e7aYQpxIiMIVovRgQdVVf+yFpydDFvAYIeQQTLafl2QwDXGJxvfAQ62gUUCKxVEoUYVmwpCJzgeTNBL61QimwIQbD8/5ugU7Fsc601SzEmmvwGTuVfS/Tdtxe0ovmMS278hetCTJEYm5DE4oF6MXcTsknpJPlzNbExM9N6tx0nmCaVfyTmbxJtC4Ka5x2Jlt72+Ub8On5hoecbRep/1fS6UdNZM3njK7mM+cftPBuvNOyqCysy84g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I0u3yXU+87xe0r3eWOM2iIaTyB3qz+j+auxb314LVEo=; b=FYgt1R3y8lVxZSNpEOfUhELDzWXPprBf8DB6G8fiUsgzZ0+ISByW89Wa2AkzIi47ABrsmEukpYmz84SW4Cj+JydhOZvZrabYmnaYIv+c76CCy7ZJx+OYzF+BmQSnCjLOd1h2RUWAL4rIq9IzScOg+Sd6oPuNXA33ar3HZlIzba0boxwf6ZiiJDGuEmf3+KT+8JsIEBd4oqc/oxsPdhALsKbS/qSNkF419KaZ/pixGOBg42llJ10pBchmCvROnuIrIyK1BzQE6ZFWzh+zr9wl7DV7wQDgfPd2Q0mwcgEiQZsqc+LlfcOLWQr7r8pOzZbpDlFo1unn2/CPOchig2H2gw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by AS1PR04MB9656.eurprd04.prod.outlook.com (2603:10a6:20b:478::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.17; Wed, 13 Nov 2024 17:55:05 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.8137.027; Wed, 13 Nov 2024 17:55:05 +0000 From: Frank Li Date: Wed, 13 Nov 2024 12:54:41 -0500 Subject: [PATCH 3/4] iio: accel: fxls8962af: add fxls8974cf support Message-Id: <20241113-fxls-v1-3-5e48ff1b1fb8@nxp.com> References: <20241113-fxls-v1-0-5e48ff1b1fb8@nxp.com> In-Reply-To: <20241113-fxls-v1-0-5e48ff1b1fb8@nxp.com> To: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sean Nyekjaer Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, Frank Li , Haibo Chen , Clark Wang X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1731520491; l=2456; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=E66YWas5Sj7BQ4tT26bgS8Wmo9L9GqNR5+YF5ZSo02M=; b=nkumHMYOHT29li46WPffg62boSHizUmIq8gxGggoTADHATKchmZNCN6mmxn1AW/QzPydPePr8 Lfv8TsOKMbPAHI2maFvyqa4IXV5TpP27F3vOPaKRfp+E4Jrzv6MiwdG X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR03CA0300.namprd03.prod.outlook.com (2603:10b6:a03:39e::35) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AS1PR04MB9656:EE_ X-MS-Office365-Filtering-Correlation-Id: 3e3e1bf6-1aa2-4452-81b1-08dd040c4e10 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|52116014|7416014|376014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?orpHHLoGD61FBRpWSdFKgYDKka7O+rK?= =?utf-8?q?uzwO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HRn/OqRFr4ac5A9sDwJMV6qSUiDut0ZE74ikzmnTJrOosg?= =?utf-8?q?Efoe3+P3EjatyiwyxUYt1u6b/A4sL1IGJluB3UkMtQ/fgK07I0lDwfQyCuXsL/v3G?= =?utf-8?q?oZgSJSAMT+4z4/YIibwhtNORZdqChHPHFmmf+7Gs6hwoovZ/Lmnv1nndhkyMqxdnD?= =?utf-8?q?ZltZmhXZ+RdjxHjnjYN0DtPjGpYe0CgZgx7yjuLoM7c6mLJd4HjYqq3xGxuXBTtPa?= =?utf-8?q?4K2yfqV5ToVBH6rNd2Pm7dqjA78kszwqQAdxWf3/YL+3JIprgtdd69cE5/rAVUqY4?= =?utf-8?q?NqWQs9l623CBtxZvoOiD9KSweTqleHmzRZTtnWrMGJNkzB8TOg44PhtU7c658RnMp?= =?utf-8?q?JxrXld2D5N6kupWkaqujOilb87W6hxrxMq3Kq2cOMjEUz+HNExHeElj4=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(52116014)(7416014)(376014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?YeYFcc0sOldayqT7oIw4ISHlCuT0?= =?utf-8?q?KgQRlsPBXjTJ5V5xbFiMKKAVgJv5j0kim//D82hiCNH3fdlWypUKRf3xFQ/7bXs9S?= =?utf-8?q?Jp0eKdNioF4F+24zcsQX69lhx4Q5T5YmKrKQ4xL+6B8Nd+5ARq4N66F2mEIYSyeip?= =?utf-8?q?unviWlRyy6ikks5NT7XFc1etAoZ3CWsP7BLeR1bWVltl0if6jcsMZJ/7n/tdU1vhc?= =?utf-8?q?10Jn4cOIwRySIaS6Hegi6KFtxQ3RD6zj2oIuVbaQd6gIBuAKEuGRWJrPmecG7LX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q?5WZxkls6qhwPuAMADF0BSvGUFjCI/ZSxCYeNbo5G1XyzrkHUAlfTeInVcoQ+O14G3?= =?utf-8?q?rHSRIbz7v6LR5zk1v6crknEc0GYb1IUHeKy39ofxfP0+LT668su0WX7nzCLV+bNiQ?= =?utf-8?q?uIqtP7rrpT0ueZrKhdtw9sN417rq6YGyFBnWCyh11eS54qDQwvNrGm9HACkqkllCu?= =?utf-8?q?b++Z7bjmH+3JNjXLUpwn24FLVGQCN0Fs5VBnyyEpt15hyJxGGT5O3raLoKRKDfZ4f?= =?utf-8?q?HGA5WdGV9F+hdkNKXVDXhn9+fxvBtMgtt/rS9+OGFrpkkQR2jkfpnmmifCDX+STac?= =?utf-8?q?6ShiMXbWSPbadXGabvQcwoSnf78GUrH9JBcu+Ul+rk8PxsMDXIaTYZ8EeoxirLa3l?= =?utf-8?q?we60phVVDscX?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3e3e1bf6-1aa2-4452-81b1-08dd040c4e10 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2024 17:55:05.3437 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LnUc+RvvWYc/+4sokDG00G3RL3Rf9JmQkKTKnsvSRh2xs/noneQVm9DInU0iputCXCpvxJhDn1upaLfdONaqnA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9656 From: Haibo Chen fxls8974cf is similar with fxls8962af, the only difference is the device id change to 0x86. Signed-off-by: Haibo Chen Reviewed-by: Clark Wang Signed-off-by: Frank Li Reviewed-by: Sean Nyekjaer --- drivers/iio/accel/fxls8962af-core.c | 7 +++++++ drivers/iio/accel/fxls8962af-i2c.c | 2 ++ drivers/iio/accel/fxls8962af.h | 1 + 3 files changed, 10 insertions(+) diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c index f07fba17048e7..b5607e753a7db 100644 --- a/drivers/iio/accel/fxls8962af-core.c +++ b/drivers/iio/accel/fxls8962af-core.c @@ -129,6 +129,7 @@ #define FXLS8962AF_DEVICE_ID 0x62 #define FXLS8964AF_DEVICE_ID 0x84 +#define FXLS8974CF_DEVICE_ID 0x86 /* Raw temp channel offset */ #define FXLS8962AF_TEMP_CENTER_VAL 25 @@ -766,6 +767,12 @@ static const struct fxls8962af_chip_info fxls_chip_info_table[] = { .channels = fxls8962af_channels, .num_channels = ARRAY_SIZE(fxls8962af_channels), }, + [fxls8974cf] = { + .chip_id = FXLS8974CF_DEVICE_ID, + .name = "fxls8974cf", + .channels = fxls8962af_channels, + .num_channels = ARRAY_SIZE(fxls8962af_channels), + }, }; static const struct iio_info fxls8962af_info = { diff --git a/drivers/iio/accel/fxls8962af-i2c.c b/drivers/iio/accel/fxls8962af-i2c.c index 1601246733083..ebdf6926db0a7 100644 --- a/drivers/iio/accel/fxls8962af-i2c.c +++ b/drivers/iio/accel/fxls8962af-i2c.c @@ -30,6 +30,7 @@ static int fxls8962af_probe(struct i2c_client *client) static const struct i2c_device_id fxls8962af_id[] = { { "fxls8962af", fxls8962af }, { "fxls8964af", fxls8964af }, + { "fxls8974cf", fxls8974cf }, {} }; MODULE_DEVICE_TABLE(i2c, fxls8962af_id); @@ -37,6 +38,7 @@ MODULE_DEVICE_TABLE(i2c, fxls8962af_id); static const struct of_device_id fxls8962af_of_match[] = { { .compatible = "nxp,fxls8962af" }, { .compatible = "nxp,fxls8964af" }, + { .compatible = "nxp,fxls8974cf" }, {} }; MODULE_DEVICE_TABLE(of, fxls8962af_of_match); diff --git a/drivers/iio/accel/fxls8962af.h b/drivers/iio/accel/fxls8962af.h index 6eaa2803b26f0..733b69e01e1cc 100644 --- a/drivers/iio/accel/fxls8962af.h +++ b/drivers/iio/accel/fxls8962af.h @@ -11,6 +11,7 @@ struct device; enum { fxls8962af, fxls8964af, + fxls8974cf, }; int fxls8962af_core_probe(struct device *dev, struct regmap *regmap, int irq);