From patchwork Tue Nov 12 16:51:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13872556 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AC170D42BAF for ; Tue, 12 Nov 2024 16:56:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RTxUcGEWHvp7e9+sBMtLPKUzbzbsN2et/K/W1RTGWtc=; b=C89qx68MwRRflhXoME8+ga1ZFx y6wn8hq9uKayPRQF6ssgWR9wz3ZpXu1TL0P9uMm6o18ZyXyRmr+g8tPx3FmFJGErTRqPe2I44rHm/ JHaO1kqAi4QkZcAXqYfz7K1mH5Fzae1GFiZ61UeQRGUyBXqTk1nDwGL6Du9M49r3A9F1sU5Fc7JQE isO3fWT5hwYFDSNhFva7v+cLiuUCtE6KpIrEpCwj9aAP/CyS54eVpoN+OOA9LUpZsFydr2z+JwrdZ DV/AxMv6TPK1/Cea4jDI6PE8L6n0zT4esQ1I9dWYoQbGnT+iIGK5rOZ8Cd7/t1vjgI6JapaVGrRIo piXmiF2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tAuBU-00000004F7C-1dUk; Tue, 12 Nov 2024 16:56:08 +0000 Received: from mail-norwayeastazlp170130007.outbound.protection.outlook.com ([2a01:111:f403:c20f::7] helo=OSPPR02CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tAu7w-00000004ENi-0Wfa for linux-arm-kernel@lists.infradead.org; Tue, 12 Nov 2024 16:52:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hxXQMxT7s5oPgrhSPWogO9vzXEbQD9bw/lacePggg1WK2PXyHLJBuNy8JOsIz2vh55Itth2aiszF1t7ie3RM3H7z33TSxNjI/0Xug67k+zKXK+TnzMhYEmpRN9v1rUtIJBgEB6dY4eMSa+woMEgNTAeAZijyHS6vTvtLPnNyo74zPnnqM1DxII4dz/z/yKxRSC8psI16aLi+2eb1e5uIOcJB5U7+y14FuQtKoKLHSC7nfL5jLUdCv9amqs9zlIlzciilbrZB9xcmISOwCLSfKtdDYo5FNN7C3E93ringum2d/HGAIhE284JKjNrVftPCOa7qN87pqyS+XM94xHhieA== 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=RTxUcGEWHvp7e9+sBMtLPKUzbzbsN2et/K/W1RTGWtc=; b=cPi5iVjeG8MSjljjHkdiK22vAnLi/LAx53ZZ1IaMETMxeOLE0qb+cVKSEnOQzmfMJF+3MWIAey8skNos13K29FRXjeuyCnwuUmdXS3EjtiU2N12xyx7OYaxHlqtSOknkJ7k9x/yUN84I4Q0r1bdIqvMoMlaSDR4i+cDMouLLi+FpeCTWw6XqTdb7S5tOdj+ycUd9wCwXaao/Va3YTxtzFos8dr8rXQR7n7mlCkcEZLDpU482zYdvoIIocAWYnhkQkfb4FaxUiJVuHWVytDDtgbCbJWZKARg8b1AYL70ILVk69+3tS6Bta96XUq2xl3AZfGgapqBJEFj/kZCypxMR/Q== 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=RTxUcGEWHvp7e9+sBMtLPKUzbzbsN2et/K/W1RTGWtc=; b=kgA8mlbpCqF1UyV3SC9YYQCp1w32xN6QpVl6kl8NAPvYuMryiGT+Kf0R0FmWSrxpgy1FA4mod5X8gCMAe/xMwjEQ6EjZsJPwGNsSObs1hnBi8vO5S61S6/0KT684r9a3a0y31Aee8Zr+RFCqTr2ou5mWG9Gws0SSwQtcaRUd+TP4gT+qNcfmI5acojHt7doGqqXHeweR43a3AMr0jc7YWI+KZeKx+7CPyLoYF3YB4VsA7s/FIAmhPkhW90L6OvnwYaCFdK25r12a+Hat2P3cU2yVOvMYN/YhNm0fNzQBzgZ4jO1I4XyI/sfTU5TQPDhtSzCxwXH7IeT4xTM8Oebsng== 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 DU0PR04MB9562.eurprd04.prod.outlook.com (2603:10a6:10:321::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28; Tue, 12 Nov 2024 16:52:23 +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; Tue, 12 Nov 2024 16:52:23 +0000 From: Frank Li Date: Tue, 12 Nov 2024 11:51:59 -0500 Subject: [PATCH v4 1/3] hwmon: tmp108: Add helper function tmp108_common_probe() to prepare I3C support Message-Id: <20241112-p3t1085-v4-1-a1334314b1e6@nxp.com> References: <20241112-p3t1085-v4-0-a1334314b1e6@nxp.com> In-Reply-To: <20241112-p3t1085-v4-0-a1334314b1e6@nxp.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Cameron , Lars-Peter Clausen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Jean Delvare , Guenter Roeck Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , linux-hwmon@vger.kernel.org, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1731430334; l=2743; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=pHdcouA8YK+jThZXHKLq4J7wOSdvJ4TG+3dUQln/lGc=; b=GFJW+KjOb1j/+ltPPomYrHhu6LX5ffVbhLVaAmVEsdL4tbyj6INmTjSJqfRN1QYkLoDrwEJNC XF/2EGOIqMfCt7rKh6h/Pzv7ie9odDH1JOjw816ELdoW+gVYDKXguT2 X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR07CA0066.namprd07.prod.outlook.com (2603:10b6:a03:60::43) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DU0PR04MB9562:EE_ X-MS-Office365-Filtering-Correlation-Id: 2ca5d2d9-f579-4ef0-37a0-08dd033a6156 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|52116014|376014|7416014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?u6kcYnNF/SZzE3Fh8DPAWuUGj/3Da9B?= =?utf-8?q?m6rCtBuPxRRmC1ou4yGYHQ8TeqWMf2E6jr0Gt9nksu93vmAE4uVxkArAzztVbLI3u?= =?utf-8?q?7ffxIKpEDttoI3/HkmdYLCpk9CYyPy7UCYmt6wcS9gl4KiUWz8MUYPAiBA9GsI9VD?= =?utf-8?q?tLhxGlqkK71TqcO7xyJgNmbpGNLgbKfRMfDuTWrbNixLKuWDoU1CvhOw3p9/yts2g?= =?utf-8?q?qylGdb3ihSoq15jGhThQnpOjZdkD4dAlZFOHKC0LtuG13ydjeeqGhE68VHPY4bF5Z?= =?utf-8?q?4tTQKKLuHiZcTISA0tYrB3ShHfhHE98UoNi/qm+VeFMfzanMzfuSBwey6R5WL/Hjo?= =?utf-8?q?/m9uFw3GqXTukdMXOjCW2TGDK1Nz9XWQyewjrFY/a4rXuTkl6/jw0a2zVbez+re/o?= =?utf-8?q?5oDSbAES4FBpON6ibXCNDANLNSekoZPigQ9W13U1H1cBRHXaEL1GAj5WhLTl8kFzi?= =?utf-8?q?H/YxdK6XttjsBOevBXOqOqZlG2hn4ycLF++G1ZtK1+flz9o+2t/GG61mFEPO2gzwe?= =?utf-8?q?daJ0pCVpdCQwhsSIpIjk4mwALk/tSbUYxN69A7Q2zia099jBxbi/seoqwdeqf/Hkk?= =?utf-8?q?1aNu7pE/aYvr1G17d9be/BpIf3XZzoK+Jf53h9zMKFsaVkiFI9++zyLlXLU5kch6t?= =?utf-8?q?7LsUvC2UVfNV2k8qq37qVqHOyox1wxk7QG9oOWHZbgGBA4+X4ErBGoWXdcIk1gAWn?= =?utf-8?q?5gYMc3DXbyIKoSZrCgKP0AqWHDiq8nw4Jca+oscXoVrCh2kGujKTxMrKwblffRbHt?= =?utf-8?q?2j/8XWtTnk9uY6HlyZ7QQ6poRdsir5YFEGmmcmL0qVRalU85AQGi5QgbYaAF2Wz/v?= =?utf-8?q?lGGK7t8uHN0TXtI3btZ5AiRFoFMJYAH7c0bPNAa3LG+e77kwgrFlahHpZymnunRQ1?= =?utf-8?q?qs2hFC1kk5+T0b0nul9FU+WF30N4UK6UQBb0/+1L8ZMw2Pqy0V4nMSflop3nu7MYw?= =?utf-8?q?Bhgsuqzd942zqvXkyuXRRhAAct23zpeBIRgq2EMOFPeA9/M1HGAatXqLWSM7om9re?= =?utf-8?q?fBq6Z8VvuS8Vr7buCFEMNfYxQTJQ21TPTLQUSYBdPvVUhllSONAeuhtut5ncXC3AQ?= =?utf-8?q?jAUcrjLYZJTGmM8xaTzmrq5A5xraqgJSyvVggNY5qwcAC+yk/b33zJWly2CWKU4lB?= =?utf-8?q?q8F0jxqLYLcB4rNOgHP1rUhYu9bTVZtK6muwoVAxXyiI8zKX6UKtKXHaJc9RMz6aE?= =?utf-8?q?Q+dmNWT5ofPk5yLv74iAAOfn2NUCSQ0eSe4EgWGLeUk2bd5BDByvOTGOwAmPKbg1S?= =?utf-8?q?SZVLrUq7A25xShmAdaOd6HDkm6kjtzBer7AG6dvOlBWZ8fAxHiaxBXCdWEgaXl1oq?= =?utf-8?q?64rrwPmzYGDF?= 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)(376014)(7416014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?CoKojSWh8LY8MEtGkGwwROVatJsY?= =?utf-8?q?tEnu7xQiuYYlcshiM+HDpLFNqb5YHTBJxyhJhsQfpPZQCwID5ouPyhwvG5GXvXJ2H?= =?utf-8?q?UFzzq851ZCUXOUhMTb+fXlomBwQ0RYX0HPL+x6t3a3OwPlXnANVMU7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XAc6Rwk9?= =?utf-8?q?H775RMpniwFc1ko1dIuU1FQqVFTGXdp4iedmO+VD0q6o9Vq35KWX/OtVTtzcdxzoY?= =?utf-8?q?GTcfwShsLrZVbEc3W7o/RMhzpPlPPsfh3/PKOT3xg4vlfAMDYZE5RdnGB2v4Cx8gk?= =?utf-8?q?Ika//11Bs/auAB2CVJOzWibtE72DbcqExq8nPHm/cNus3ecForfSzzwju++ZvMIDl?= =?utf-8?q?Ymed6gyHe68k30G1J/QUMLBE6CsgB0ZBURlZZQxKA4wHhjBFJuulyYhRMWOvHtzO0?= =?utf-8?q?FUAzqj3SV9FZtRpG82NriQ0mD7SYSSSn0MOmRxSvo+AZZ63sT1ca9uZ9rzAxbmlv0?= =?utf-8?q?QkLniAdd4FhnnXOVt3uoGuLWAR7LPiy3YtemnVMZ3MP/caOG7kkIzEsawnLA5IalF?= =?utf-8?q?z1GuQgtAWh8p/6GlyR3FqmXZ5/UeCJ5ppB3EgGZKY17xlgtMy0kmEprLI9bHHDJzy?= =?utf-8?q?oQZ2TwqJKdxfnhYDX9eUqMlxuH51MLvmde1vEjQ9xvs+A/tRuACxNv5egPR/c7cmj?= =?utf-8?q?f5STK+L+WIok?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ca5d2d9-f579-4ef0-37a0-08dd033a6156 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Nov 2024 16:52:23.3821 (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: bAH1C+i38ypPZnvxGO0S9/Pr8EZ6KTj9VBaP7Lr1MdmsLkNa6BKTLZFvv8CAzYL+yUMLgJLQZKVRBls3tfkDjg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR04MB9562 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241112_085228_182388_2AD249F7 X-CRM114-Status: GOOD ( 16.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add help function tmp108_common_probe() to pave road to support i3c for P3T1085(NXP) chip. Use dev_err_probe() to simple code. Signed-off-by: Frank Li --- dev_err_probe() have not involve addition diff change. The difference always list these code block change regardless use dev_err_probe(). --- change from v2 to v3 - update subject by add prepare I3C support" --- drivers/hwmon/tmp108.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/drivers/hwmon/tmp108.c b/drivers/hwmon/tmp108.c index b561b452d8d39..bfbea6349a95f 100644 --- a/drivers/hwmon/tmp108.c +++ b/drivers/hwmon/tmp108.c @@ -323,33 +323,19 @@ static const struct regmap_config tmp108_regmap_config = { .use_single_write = true, }; -static int tmp108_probe(struct i2c_client *client) +static int tmp108_common_probe(struct device *dev, struct regmap *regmap, char *name) { - struct device *dev = &client->dev; struct device *hwmon_dev; struct tmp108 *tmp108; - int err; u32 config; - - if (!i2c_check_functionality(client->adapter, - I2C_FUNC_SMBUS_WORD_DATA)) { - dev_err(dev, - "adapter doesn't support SMBus word transactions\n"); - return -ENODEV; - } + int err; tmp108 = devm_kzalloc(dev, sizeof(*tmp108), GFP_KERNEL); if (!tmp108) return -ENOMEM; dev_set_drvdata(dev, tmp108); - - tmp108->regmap = devm_regmap_init_i2c(client, &tmp108_regmap_config); - if (IS_ERR(tmp108->regmap)) { - err = PTR_ERR(tmp108->regmap); - dev_err(dev, "regmap init failed: %d", err); - return err; - } + tmp108->regmap = regmap; err = regmap_read(tmp108->regmap, TMP108_REG_CONF, &config); if (err < 0) { @@ -383,13 +369,30 @@ static int tmp108_probe(struct i2c_client *client) return err; } - hwmon_dev = devm_hwmon_device_register_with_info(dev, client->name, + hwmon_dev = devm_hwmon_device_register_with_info(dev, name, tmp108, &tmp108_chip_info, NULL); return PTR_ERR_OR_ZERO(hwmon_dev); } +static int tmp108_probe(struct i2c_client *client) +{ + struct device *dev = &client->dev; + struct regmap *regmap; + + if (!i2c_check_functionality(client->adapter, + I2C_FUNC_SMBUS_WORD_DATA)) + return dev_err_probe(dev, -ENODEV, + "adapter doesn't support SMBus word transactions\n"); + + regmap = devm_regmap_init_i2c(client, &tmp108_regmap_config); + if (IS_ERR(regmap)) + return dev_err_probe(dev, PTR_ERR(regmap), "regmap init failed"); + + return tmp108_common_probe(dev, regmap, client->name); +} + static int tmp108_suspend(struct device *dev) { struct tmp108 *tmp108 = dev_get_drvdata(dev); From patchwork Tue Nov 12 16:52:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13872557 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 551A5D42BB0 for ; Tue, 12 Nov 2024 16:58:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=BjnOm9DtrWDtfEbRBI7BNxeeiqhv9ulpfh970Uk//hA=; b=hm1Zi9GQz94q8+WtjL3Yx2w705 c/+fth09OtC2uCvP6G/v0dhM6n/YxuU3pCNjL2UtL3GOu01BUq2cvL88X4R7oF6cTZUMssuUKWLW/ GiQVnLwXqrP9DvW9z10lmetCvtoL9xg1hdD9RYRy5xdWWAg6eWEZ/WujifITLDsM3yojWsQp4E+9y prCSaStsbOEADONWSrRgzCEjjooa/F9KqIYKowiRD9Mdd+cMfow1Bf84YwrVvaFIWqrzDSJwIadHo c8IqtbjDoZj0h2/HdA3YidwMQVjcaZEKtiOCNkQnhbbfzPVN98T6TWh/sz5sSJ76M6hdd/0gjW3uv ui3FQKGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tAuDH-00000004Fam-1uOE; Tue, 12 Nov 2024 16:57:59 +0000 Received: from mail-francecentralazlp170130007.outbound.protection.outlook.com ([2a01:111:f403:c20a::7] helo=PA4PR04CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tAu80-00000004EOb-00Pb for linux-arm-kernel@lists.infradead.org; Tue, 12 Nov 2024 16:52:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PpmWm6l04moXBed8Z+gpjAlaXKtleJluJVm3eFJde39a6mDj7mrhUyIFJwV32QtrDbQYqOOlDT7LhNyABzr7oMfaegbqmzTQNnFxHSlZheUwhClnTxSnB1Dr2fEISCbeagNml95Lh+7W/xEYwMpK+3IidHvXcmFbx8xqr3Yf36oAdT5zkiN1y2jb9OuTkp0Wl+0wQovfDsNMY/bJr0pASYdr8BJ7NLuYNsxiTK84jWX8w64A66BQOw2xzAq5sRdxaCOI7yspBm6u+OFuXCHvrUcrhl/7TJmSOSAaQHhy06uhUgUi/1JSCPVPKV7qqiOvou/LlVVTd878qtc9q6+u/g== 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=BjnOm9DtrWDtfEbRBI7BNxeeiqhv9ulpfh970Uk//hA=; b=qDGQjf/a3HpjdziSIJQ4xBLuJQgPvpSmaj3uh7iqo5rtnD11RBydaUz9r8hG3naLGW5ILvvnYLiL2JsXNANZX8ZTFXFF3+OM5ZxX2Rbddd0swPbuIBI2RNrCUosPpUKGtUAiL2P3ATkQgpzpLv4482xdAZJVHSp+9Qm/OcSo/g+bhy7ycPl3npkCAX7GIkr+OVaoICaVG5YhzgGqxcS4tkPHyBF6ZJ60FcARb3E/BS8ZSQP8SgXYYvn7dSFzHbFnTMCWdtGAJkIUtrnDB1BvoCyB+KxgZG7oYBQ/+/TAGVIb600299gr5fgt8AFN257SnapB5fu4B8M22u9BrNygHA== 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=BjnOm9DtrWDtfEbRBI7BNxeeiqhv9ulpfh970Uk//hA=; b=SBcnmAwJuFVRzmJIrFmYdRPQ7iBXaTp593xwadYQ78VoLnZ8qwcaRLNKR3gqfDs8MSAT8Rjuwt4ASagpG8BLzt0kk5Puqpuh5JAvn9VixXbMX+a4eoqOMRXJXuLNdmEMNF9QJhULt7/XYZ/C2Ip8R4M66Y6HP4BqI8zF9/GTAWw+nAW09lXj36RLaIXMXfvD2yxqCYNsG/+0uCq0QbhOLbt5sbR0ZH991knqrFlhjN9PPlhQKIJa1CpS2VI86R2Kc1QZxGVlWwCdASKfR2qP3IpV5LpsGWRG89+tLQaVTlXN+s5F7YWF2eI7AJrfZow0JyioVpKGoGYPkSVtQgNh+g== 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 DBBPR04MB7897.eurprd04.prod.outlook.com (2603:10a6:10:1e7::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.29; Tue, 12 Nov 2024 16:52:27 +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; Tue, 12 Nov 2024 16:52:27 +0000 From: Frank Li Date: Tue, 12 Nov 2024 11:52:00 -0500 Subject: [PATCH v4 2/3] hwmon: tmp108: Add support for I3C device Message-Id: <20241112-p3t1085-v4-2-a1334314b1e6@nxp.com> References: <20241112-p3t1085-v4-0-a1334314b1e6@nxp.com> In-Reply-To: <20241112-p3t1085-v4-0-a1334314b1e6@nxp.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Cameron , Lars-Peter Clausen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Jean Delvare , Guenter Roeck Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , linux-hwmon@vger.kernel.org, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1731430334; l=2704; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=JAPK3bGdhfGqrsoR9koYophADpQ1m2fjbRKgX4s6sn0=; b=lytpmW9PjE3AkoFvOTWvM3IbqWbrv1N7NfI/qTCQWlF1CE4LMKyXOmZwRtpM/cw4IQmXbMMBd 1XjbgdgZLbNAfsAhSK4FQd1yjk4d890ThdOdV5K7mWlF8CbUa4tXCFP X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR07CA0066.namprd07.prod.outlook.com (2603:10b6:a03:60::43) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DBBPR04MB7897:EE_ X-MS-Office365-Filtering-Correlation-Id: 596a0b0f-e4ec-466f-3144-08dd033a6404 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|7416014|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?QKarmznPkxjHfMfsN2XcN0I2TMJ+WcV?= =?utf-8?q?627k7Y90ysD/I3Kz8uLQlyEkGXs6e7uvepNGQFLtJ2KFiG4gQj6DIzDLYK0Bp0mPb?= =?utf-8?q?qzIEvUFRzN6LqzjU36RHcSVJUPGfh4HmOhy+IZwaqLlRETXMFQnuvFSpfkVP0uImz?= =?utf-8?q?df45R8OHfFMGfWPiNaGM0Z4gFaeh6M2IthvFQUYfkIUCeqe4Oi5F4lCNizAIqABqh?= =?utf-8?q?qjAXuM726qnDzItrO/f4XsNgaPH9v7+Y3XlfjADMJ5IvvCex6U6FkACKvrq4NXp+t?= =?utf-8?q?l6UYYO4ako/8hPPlfIjeH5SvQfLTKYEXSuQFJQy7XxGngiSxZYCZM5bHS8zZrvVTk?= =?utf-8?q?v3/mX2aU0i1posejOQgOTz2hotTdyn3cBgx3C+FcH/PTa2ytU7/Kf7Xl/6c9IugAE?= =?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f-8?q?2rmgKl3apJOMK+7wllKCFpXwIZFr4+zyaQ1hcDlMTPbddnknKrqkPP9XcSH3I+9UN?= =?utf-8?q?i6sY6YM/3GLx?= 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)(1800799024)(366016)(52116014)(376014)(7416014)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?fstmQaoV3WeuVhozrB2n+arZkzGp?= =?utf-8?q?dMv55Sj247YNYZojGeHsqeh0MGUFvQKje3Z4gwoZrQk/WCwzESxehkCLeDLwn2Oj9?= =?utf-8?q?eBp4Rd7GvMj8pIcA7YsBFJEPd9P177aHiM8DGiKiFAad0/zoR65+UTQoD6FDmjoEN?= =?utf-8?q?i+oEI79C90bw9Tzu/o2m7d4HLJpX4WxxzS5Jit9NjR53zBQ9aA00TDfkzZy7MELMD?= =?utf-8?q?WN81jhq6WAJvNEjYu6TiXFE/cnzXI2HDOLvyAVorBM6l0zMoan17ozLDj6s1LpME/?= =?utf-8?q?qk2UPsWTKctp+XLx8XRQQafZ8l0e/qe1p4vv2SvhqgLVj+bsaiDBefVFPr6KZ097P?= =?utf-8?q?9a8/MJBBwsg3Vl2T24M8Hg9oHDhJLRPjrvJevFK69ta4SoEMpGULgdF37DthzTAMh?= =?utf-8?q?NaWbabvkGp87bzjugyn3Mohq1usMlvnXve2EDUMqfutbPFbqeoUNEJBN1qrJ19e3y?= =?utf-8?q?yabMzrMJGdxmc6oV6aGi7dLZqUT/EEEbSs4YvFzg4UWVV/UPxPLZB6tDJV3RkENyS?= =?utf-8?q?w6to0E+s0s2LNPUR5Bd6cixTtf46x4J8miiBsL6y7FY8nW87AWxMjWySd2EEIUZ81?= =?utf-8?q?Ct9ZavM3p33KQoD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KjgWmEMGpMPYgmk3yESu5LZkRcInHj3QDhRJr88dSfLT+Ddbpc2?= =?utf-8?q?J3J/u2ZMgHCL?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 596a0b0f-e4ec-466f-3144-08dd033a6404 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Nov 2024 16:52:27.8568 (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: X59XdbkZSIbi55LLe40AMkfV/nBSIbVHIlvs+8cGMHdMpF2+/ib/zQ2f72g6/QvG9tlCUzmjzDCI9Dllp/LquQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7897 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241112_085232_086267_FD5EC7CE X-CRM114-Status: GOOD ( 18.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support for I3C device in the tmp108 driver to handle the P3T1085 sensor. Register the I3C device driver to enable I3C functionality for the sensor. Signed-off-by: Frank Li --- change from v3 to v4 - use module_i3c_i2c_driver change from v2 to v3 - change kconfig to select REGMAP_I3C if enable i3c - remove i3c/master.h - remove , after {} - use #ifdef CONFIG_I3C about i3c register code I2C I3C Y Y support both Y N i3c part code will not be compiled N Y whole TPM108 will not be compiled N N whole TPM108 will not be compiled --- drivers/hwmon/Kconfig | 1 + drivers/hwmon/tmp108.c | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index d43ca7aa4a548..9579db7849e1f 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig @@ -2298,6 +2298,7 @@ config SENSORS_TMP108 tristate "Texas Instruments TMP108" depends on I2C select REGMAP_I2C + select REGMAP_I3C if I3C help If you say yes here you get support for Texas Instruments TMP108 sensor chips and NXP P3T1085. diff --git a/drivers/hwmon/tmp108.c b/drivers/hwmon/tmp108.c index bfbea6349a95f..1f36af2cd2d94 100644 --- a/drivers/hwmon/tmp108.c +++ b/drivers/hwmon/tmp108.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -440,7 +441,39 @@ static struct i2c_driver tmp108_driver = { .id_table = tmp108_i2c_ids, }; -module_i2c_driver(tmp108_driver); +static const struct i3c_device_id p3t1085_i3c_ids[] = { + I3C_DEVICE(0x011b, 0x1529, NULL), + {} +}; +MODULE_DEVICE_TABLE(i3c, p3t1085_i3c_ids); + +static int p3t1085_i3c_probe(struct i3c_device *i3cdev) +{ + struct device *dev = i3cdev_to_dev(i3cdev); + struct regmap *regmap; + +#ifdef CONFIG_REGMAP_I3C + regmap = devm_regmap_init_i3c(i3cdev, &tmp108_regmap_config); +#else + regmap = ERR_PTR(-ENODEV); +#endif + + if (IS_ERR(regmap)) + return dev_err_probe(dev, PTR_ERR(regmap), + "Failed to register i3c regmap\n"); + + return tmp108_common_probe(dev, regmap, "p3t1085_i3c"); +} + +static struct i3c_driver p3t1085_driver = { + .driver = { + .name = "p3t1085_i3c", + }, + .probe = p3t1085_i3c_probe, + .id_table = p3t1085_i3c_ids, +}; + +module_i3c_i2c_driver(p3t1085_driver, &tmp108_driver) MODULE_AUTHOR("John Muir "); MODULE_DESCRIPTION("Texas Instruments TMP108 temperature sensor driver"); From patchwork Tue Nov 12 16:52:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13872572 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EB41ED42BB0 for ; Tue, 12 Nov 2024 17:00:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pC9IS6hnaMg8q2h5PuNaWDtU19rB1dExXzbSlG/8fkI=; b=k/fsHQGQQ19ZehYtN5JUzaodSu 1vfAvOExFoIKX02Z8P4mnqmDeT5wU3QkcY8j6XR7Vb3k9N/MPz0XASdwlceiGY2C7UK2h0QbVgCQb 4QnVWn2UMfR3xMYSDOMoO1mVNyBItDiRWQ6WsGO19fsg10vnOVJIuv2Pw1aucZFfd1F00+ASo+lT6 2YCOvYmDEGUYQSFJtmCfKTeLc3NtMB7PeHxbLSYxVHgT8PFSo1BI/bBp1AtBeLEMJZnFYRCKuXIL7 Z0CBeeRxQC1YkJGFBns5h64zPyKEt919u/cZNHohjfYWxi+0uR63uWgaUEaCnflo6D+WNiUlSKQb2 oCPNKcYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tAuF3-00000004Fzt-1ucp; Tue, 12 Nov 2024 16:59:49 +0000 Received: from mail-northeuropeazlp170120003.outbound.protection.outlook.com ([2a01:111:f403:c200::3] helo=DU2PR03CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tAu87-00000004EPs-0raD for linux-arm-kernel@lists.infradead.org; Tue, 12 Nov 2024 16:52:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WYb5BLRoGrcJlkvr8nJRd1BjitlKwZ+/xNRtTIxeevxKfJwG2Fr2wPFQYlIARDJjiwFyvO6XB9vh0fwWqNFUFPuiFhm4wcckuLNl/zTZr41LbzYNVZmQZMNvRQZljsS8UrtewSU7PJWS+SL0jvz8AueQAUg4deJwL8sLT7BW8P5dwNaHb89sAuSKcC+MBLJw/J4RHhankRRPQRNXH8KnsZPj7pNwGakmHa97ul2gnXF4Q7PTWr1CzbdM13KZ++sI/P14SL8hZqFiom2AYmCniBJOoEjHMeBTBbZGt3DN8+ZryruWJ9obxbzoHQw/703ydRhT5bhpIpuLA+PFyEZ40w== 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=pC9IS6hnaMg8q2h5PuNaWDtU19rB1dExXzbSlG/8fkI=; b=HjWlxOSi229v9c+pw8ocC6XFuZ/JojYgHM/ynpofEBXj5TSyD2Co6LFbUjve2NKvA7+6BpecE7S1NcJRygrSLrSNFY0CotQ6+fu7OEtBuBcaw1Zc54xA3q492vdxx2GaOoLlSEZTn+05Ec/DeTstjPM0li09G0EodrGDnRXKNNDGegp1O221uGF0MHu7PqrNOVzfLxNHDa0pWQTMcI+L7zb9BIctXdYI8bjufp/OHJTQ83tr/fS91jpcCDyU+DC78LDXfhLczoDN6SckwjQvR5XfoVV+QWmTIJ9pIET1DWtelOqS5vQ2cWrF7S5BfAmuaYq+oBeZyRd2Wrvvz1VEUA== 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=pC9IS6hnaMg8q2h5PuNaWDtU19rB1dExXzbSlG/8fkI=; b=XZknItbCZSCi9EpY2tPjmnSfIC3OZp5Hj72riMRp0n/9f/T6lFJsCkgbGANzdCJLXyZ++Fy1ixh7PXqhmn3gW6Nv3bGQI53sile/TjfGsbXzX14j17xLVZrBpnfwv9cguGgffsLBw4ewXKbsk8lPK/3QZt2W1WQmG+niSXsgdb9QJ1GXkHAroluP9JyvZtZF6wK3nJvSsV3lSjoku49rNNtPqjpnZJzoFytsOWktC86orw13wOwuCyxaeVlTm8h3fYE688Jm6rcnoSXXd5QX3RMtrOlLJyFzO+IAB/nAHhiQFtZk3mhzfPl2zub4n9mL6K5NDw4yRJudnUfvNliLpw== 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 DBBPR04MB7897.eurprd04.prod.outlook.com (2603:10a6:10:1e7::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.29; Tue, 12 Nov 2024 16:52:32 +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; Tue, 12 Nov 2024 16:52:32 +0000 From: Frank Li Date: Tue, 12 Nov 2024 11:52:01 -0500 Subject: [PATCH v4 3/3] arm64: dts: imx93-9x9-qsb: add temp-sensor nxp,p3t1085 Message-Id: <20241112-p3t1085-v4-3-a1334314b1e6@nxp.com> References: <20241112-p3t1085-v4-0-a1334314b1e6@nxp.com> In-Reply-To: <20241112-p3t1085-v4-0-a1334314b1e6@nxp.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Cameron , Lars-Peter Clausen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Jean Delvare , Guenter Roeck Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , linux-hwmon@vger.kernel.org, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1731430334; l=756; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=kFxt9dtkDU0Y3RY9oVvdu1BMstpufdDdNMTqBmUK6g8=; b=pIiZiLd0SarijBCnVJARYnej6K5kNxNDMSGQqnFXss4iws/Crn5cMGaAtaWAaMF0PJnHeb9Ay WI6XGdv1tKwAJ/7wrEzW5x2JO7tiL57GVtBe/czl7Lp7irLw7EOLG5a X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR07CA0066.namprd07.prod.outlook.com (2603:10b6:a03:60::43) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DBBPR04MB7897:EE_ X-MS-Office365-Filtering-Correlation-Id: 396d72bb-7e20-4437-62d7-08dd033a66b1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|7416014|38350700014|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i58xyb6C4gIM7wbTe3ffIUwzijFoaDR3QV1HcKr2pvrMQTf6biaXrEYaUNdoknXpK?= =?utf-8?q?+otmI5VbBqDyYSn06cHAyos618uB5GUEPID4ExVuYSUe8GDTOFcP0jRyKnEybPg5x?= =?utf-8?q?O1bp3NHWzumohEEtaiNI9kaopJqQzVhROQQ/RSFXaCs+qpjO9n77qFFw3Rdr3iy1G?= =?utf-8?q?8bRVmvD7L8zOpR+7XeQ3mK+sgcAAQsrwPueY9h8KHHGrSnVC4R8XmnAPpKTndOUvi?= =?utf-8?q?xKR2r8PysMFlspDpzvTz9He3SIwHHxegZAvtdWt4pPjMIThAt1KDrWqz3Nz64lnVn?= =?utf-8?q?mSQsNib6U9ifcWKQrzN+WGyVl8WnEcNFRvcFTN8eqYR7ZPBw7+Jac8pBbs6yEL082?= =?utf-8?q?vQOKNi8qtdLspWpgaj7LkJfrZWK3Z+/Jo9c4RyF1iE+TMcnXidFrdkz74QC2qzRFH?= =?utf-8?q?QXve2on4WI1K5i2wOaBe96vDCJtmcmjLj7A7ovc2YW/rC+6pBrT3gVGYNDPrdO4uE?= =?utf-8?q?2SucIt91bq6s?= 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)(1800799024)(366016)(52116014)(376014)(7416014)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?T9YkoEF0pYFVAvc1R4QCqDGabnIz?= =?utf-8?q?eGgRxrXvDvC+N3xg3PQFqiKhUgsvdH7FTbkq6Hmw867ad/VbZ15BfDA/MPECw2Zeh?= =?utf-8?q?H42+DLG8MEgZqHzSV6sNU3jmWve/0Hi6aSlE0/hDZevHNvboXjX8BgTG0/GSRvBvs?= =?utf-8?q?i3ElOPLg52Wqt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bMFLXs4XD8uBoswkS2s+8e7ifVjqsjgFCH4ET59EgYF/qM/xeYRUj4NV4U?= =?utf-8?q?O/eBMgZ6yjuxVABfi0OHaNB4h4EMu7FyL3Ixe5eMJLz/0oB535KBovWahThr14MBU?= =?utf-8?q?UpgRXkSddNosDE9fUsW6GpplqHO5JJHpQAFZv69bHesCGL5Ky3fBmpanUZZT1zNbe?= =?utf-8?q?Yi3JzM3fFJlGAL0Srh73R4MnHgVex5QYXo7AG/AeajwH3VRYYUfBYP8fmtZSwi3HV?= =?utf-8?q?owNo6MjOqnIobr9ioL9sRxj++cHu7z7YH04RQg6lCokUtJw9dwuE6zH7CrCsTgsS4?= =?utf-8?q?abqdMhjDUpsdMG0JRexL9FJyYZxxH7kMshRZ7/qCmks1Uii9BftCjNFLMxZdkwLsS?= =?utf-8?q?46xkRZ7WgiCqwzgl+tl0jnC9CHdszgbfaUqe+Jw804iwbcciczLhCLEWUlXOL15Sp?= =?utf-8?q?XDtW40HLXG/t4E+R39bHqSELEYA3+d6MOVmR+K4WeElkYGGsD0+XipT7PH4IwAso0?= =?utf-8?q?6jw7+wZEiMy1?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 396d72bb-7e20-4437-62d7-08dd033a66b1 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Nov 2024 16:52:32.3381 (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: sSKQDXwhZhw41+feJrTRVRxqQ6BltWBXTOwUfLXiwxurcZvixmInyhbAtgFzsBVwkqeQ+4MOdQdZ3zeibPeTtQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7897 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241112_085241_211208_409B2F94 X-CRM114-Status: GOOD ( 10.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add temp-sensor nxp,p3t1085 for imx93-9x9-qsb boards. Signed-off-by: Frank Li Acked-by: Guenter Roeck --- change from v1 to v4 - none --- arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts b/arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts index 20ec5b3c21f42..36f2995acbe29 100644 --- a/arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts +++ b/arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts @@ -221,6 +221,11 @@ wm8962: audio-codec@1a { >; }; + p3t1085: temperature-sensor@48 { + compatible = "nxp,p3t1085"; + reg = <0x48>; + }; + ptn5110: tcpc@50 { compatible = "nxp,ptn5110", "tcpci"; reg = <0x50>;