From patchwork Mon Jul 24 08:04:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilles Buloz X-Patchwork-Id: 13323515 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54EA8C001DE for ; Mon, 24 Jul 2023 08:04:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230338AbjGXIEt (ORCPT ); Mon, 24 Jul 2023 04:04:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229826AbjGXIEs (ORCPT ); Mon, 24 Jul 2023 04:04:48 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2102.outbound.protection.outlook.com [40.107.20.102]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00939113 for ; Mon, 24 Jul 2023 01:04:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gPy9tu+vnRkBD5ip5h0OUJKu7DP8JyfsfesGRrpdYUzrWnXvFxPQ6vXs+2vftT/4rnZhZY/87IchPNv8Dawvwr/LOx6Fs+oXRrmDWwi3fLAF55xAzf6XjUw8CtzxmRd0ZnqCKs7tk31bYB1wfo0m9R21bz7MtL4q/ihnwPI2brzWaMPlK6J1BSjyZZssLYXfWbAAZiZ394KruMZfdnqRsw9/iHYN8C9RHrug+GlLGUz776Rg6lD8cikwD94UsczYlje3DeVr1rYA5XR1y6mrDZ+uHf35+ZyXPXAnt6NPuLe7suBgsEYGiYMs7eGherrx9eka0X7FBmHObO75+5+S4A== 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=NmnzyhanW+2Ca8l14PecNoGz1vLCSIQ45aF800tNdJM=; b=H7S6xCSDcFn/BA9S/IZQdBoieUQs+noyiq5048MakmAoOezHThMYXQu4ZrwMkhoS51+nR1n2Pyw1V/dTTPyRW/HSpi31h9ZeWyka/D2h+XkLOz4vNFPVghwr8DKVvlaFGGN9KkmUrNmifm1JItojkSo0boWG+xPOXoubE+mkRUDIkiQPziig2CF0onGWkh75I8lEd6koqDvRb5Vm73ySJl0KXpUB6WiyjYZKmSnHOTpIPRWd5ELTOJG8pLTQGLrNg5GRAKKstuYJ/QuPgCT/mEqVq4wQmUO2FGjIrPlFAsaHeNA37uOXW/xyvct2Ap2N4A6Q5+xrPiO8SHpBMAEQgw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kontron.com; dmarc=pass action=none header.from=kontron.com; dkim=pass header.d=kontron.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mysnt.onmicrosoft.com; s=selector2-mysnt-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NmnzyhanW+2Ca8l14PecNoGz1vLCSIQ45aF800tNdJM=; b=iQ0MExpww1MU4U8efGxQ0Ztysbbz8gXtp+pOJ4KGl4/EBXLsjviteYKEQzsK5KMyG6kaTuC+yMG/MeCHZbBZ53QTA5d6+AqSnMV+FScY+ZBObOoQJ1GU+9xkf8FtmYx9GEvsV7cRAeRZ0QTfifeJaHazg3q7LReYCWvc7RDVjzY= Received: from DU0PR10MB6252.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:3ef::11) by AM8PR10MB4036.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:1c9::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.32; Mon, 24 Jul 2023 08:04:44 +0000 Received: from DU0PR10MB6252.EURPRD10.PROD.OUTLOOK.COM ([fe80::4478:3f61:306b:21e5]) by DU0PR10MB6252.EURPRD10.PROD.OUTLOOK.COM ([fe80::4478:3f61:306b:21e5%4]) with mapi id 15.20.6609.032; Mon, 24 Jul 2023 08:04:44 +0000 From: Gilles Buloz To: "linux@roeck-us.net" CC: "linux-hwmon@vger.kernel.org" Subject: [PATCH v2 1/1] hwmon: nct7802: Fix for temp6 (PECI1) processed even if PECI1 disabled Thread-Topic: [PATCH v2 1/1] hwmon: nct7802: Fix for temp6 (PECI1) processed even if PECI1 disabled Thread-Index: AQHZvgS5pEJghVK4TUW6lpftdOvQJA== Date: Mon, 24 Jul 2023 08:04:44 +0000 Message-ID: Accept-Language: fr-FR, en-US Content-Language: fr-FR X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=kontron.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DU0PR10MB6252:EE_|AM8PR10MB4036:EE_ x-ms-office365-filtering-correlation-id: 7e1a8af4-3ad3-41b3-90db-08db8c1ca433 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: YcYrPrdtVy22zMs+lneZuB5Gkg8J0Pcn/2bkcgnYAW5+m4gVr3p5QfRtpupheTgaCuxNSPIl4q2f027V+gNxX++H/C16KlD73exK4HS0pZzxjlObnLiIc4+NXiciiSoIitqKMvIartpWV/ehlpCcUAONJx6qRJRJLcOJYKZ9wxI6oaG/DasMTuGaHetbwJDlz5Lw0V1WRXSFL4nsjCwkTCRxGiFBCpz5cRjxsScFJVIx2tp94wFStdKbcwjjZg+zEdiW4RmpglrWxbkmBHhfvNSSSRWVglv5njWqrj1I7lNYpLTkur+VprFCQyLDY7MCe/KXy04ns0Ot8LE+lPOf30tdx+Yvjou2jFuAfbEkSA5RR9eHHD5mCTP94UC3OE31RIGnlYL6L1BRNo9tuHiF4SRC056ycMjcklV2MQ2JnTNlzDWZ3BdsUt6s0zx6ZNFhOV+9x3jtpBnqfPnuWOaXGjs4ktghh8zKC/S2kg20Fa3IryGJl32IxjDpP2yn4U5YgmI0ptKSYr1x4tlUMskNjA7sSADlGM2cy3+aBtrf432yBvWXqW4Ti//tpNrOBIAivGz4bwj3h73RvAP6pQQFbPAnrL3TR2aNg6HyUc8S2XrB3hD8lORwze9M7wBI6+M1 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR10MB6252.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(376002)(366004)(346002)(136003)(39860400002)(451199021)(7696005)(478600001)(91956017)(71200400001)(9686003)(186003)(6506007)(4744005)(2906002)(316002)(41300700001)(76116006)(64756008)(6916009)(66946007)(66556008)(66476007)(4326008)(66446008)(5660300002)(52536014)(8676002)(8936002)(38100700002)(122000001)(33656002)(38070700005)(86362001)(83380400001)(55016003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?prU/1LX4o/ox2bhSgn9Acm5?= =?iso-8859-1?q?dNqmPkCQ5t2k4JDIbif/GkP2724zIfJnnbcDcXI1Ncbf79+9vPMo/v84+Ux0?= =?iso-8859-1?q?iEHDugF2SWAKYBf7LdAoAWaJON0e7zoWnbupaR/zTuEKlhRhHDzcqm7IOpde?= =?iso-8859-1?q?0pI5vekAKndWiioJlAG8PyyEwHDEllPrZB68tTiR/W2T49qR8+iNJGD1UmlL?= =?iso-8859-1?q?aQO+h5Q0WYV8PyQ4JD4daqyCYrV4z7wZzMN2tasN1/mAnixu6pCMeiI6XjvU?= =?iso-8859-1?q?N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kH5z9K35m7wSaUP1axQZx5t6R8GBUs?= =?iso-8859-1?q?O+mLWBzZBqjL4MfVf7RgyC7/HcR6U1vPTls5P5BV8PNC4/HtTNK/GKjq/yre?= =?iso-8859-1?q?ykJiCOka9z50u191fXt5DY2yusfZzo+reME3rEFTayPmNHpK5Oye3K/7z96O?= =?iso-8859-1?q?trDmbnHgaF6IPvFySPb1UJ5cm8Vda1aEpvxh4AE9F7a+En12ZYUHeSZppcEx?= =?iso-8859-1?q?B6zf40CVcaET3/cnxFR37wN8NnHJwauR99BWcXVcH/AG9YrV9IUkhLv/bah1?= =?iso-8859-1?q?sC+A7uSbcx/Jhmu4VZ/4i7yGCgSzDJ5YKT6GWUtPUqSyjFlSnkOV8oc6QBqm?= =?iso-8859-1?q?NMyD1vcX9lh4hE0qwZHO3AQISjITxjcjksndS6/S3Wzyac22YfvWo5nE5f4H?= =?iso-8859-1?q?XG4peb2fGVLCRuzytEad4aAzc03zOkATp2ZX8/sfIgPqJq7vNRVNwgrjCC7m?= =?iso-8859-1?q?2sX/H3lmh18XtopLc0GBft/HJeXkJRorCZuxWwzqbimdEeYtEAZftQEoJyUO?= =?iso-8859-1?q?RQs1ZbDAYfk7YHyiKOFJN?= MIME-Version: 1.0 X-OriginatorOrg: kontron.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DU0PR10MB6252.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 7e1a8af4-3ad3-41b3-90db-08db8c1ca433 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2023 08:04:44.4436 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8c9d3c97-3fd9-41c8-a2b1-646f3942daf1 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: hRSwPsnWsUkTBfK5LFOpCsE199vrAqFXph1Qh7LXnzYlVkO6laFhlBKm77mByCO6P9Vq5/1yoBQc5ZClgv64gz0HGBmiLRy6z2q+LS1B5mQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR10MB4036 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Because of hex value 0x46 used instead of decimal 46, the temp6 (PECI1) temperature is always declared visible and then displayed even if disabled in the chip Signed-off-by: Gilles Buloz --- V2 : - Same patch resent with another mailer because context lines were corrupted by extra spaces --- drivers/hwmon/nct7802.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/nct7802.c b/drivers/hwmon/nct7802.c index 9339bfc..024cff1 100644 --- a/drivers/hwmon/nct7802.c +++ b/drivers/hwmon/nct7802.c @@ -725,7 +725,7 @@ static umode_t nct7802_temp_is_visible(struct kobject *kobj, if (index >= 38 && index < 46 && !(reg & 0x01)) /* PECI 0 */ return 0; - if (index >= 0x46 && (!(reg & 0x02))) /* PECI 1 */ + if (index >= 46 && !(reg & 0x02)) /* PECI 1 */ return 0; return attr->mode;