From patchwork Fri Jul 21 17:29:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilles Buloz X-Patchwork-Id: 13322417 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 33FCCEB64DD for ; Fri, 21 Jul 2023 17:30:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229668AbjGUR3e (ORCPT ); Fri, 21 Jul 2023 13:29:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231175AbjGUR31 (ORCPT ); Fri, 21 Jul 2023 13:29:27 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2133.outbound.protection.outlook.com [40.107.104.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02FB919AD for ; Fri, 21 Jul 2023 10:29:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lW2taDb0Rc8RUmmAIQkX9vBIIJjkMS4u/4Md9p/quRAmnOFtM7xn8Z8ibXfNShYoDU/zF+yygKClIHHHeZdJBSND1UH+bHpdt2PNI43whOb2A2Pk8+I+P8IF3wTdKgsKds5UdQ8Qw+7q00Udn/g15mUwTyE3ia/tNZj821lYYmvAGQDjp/ULdGxYQyy7cCDhQQhRTBcnPrB/EzT24JBmJ9kSLxRhr2Tynwcw6oML0pdNjXm+Fpwsn3ndlDlscO4uDClrEPElePkySQSPyBpAzAK863Eh3E7vdtzq1JrieJJrTEoPiifKygC48XoSHz94WJfzLbaBejvDvEUDpHGJXw== 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=z+qiFu7BKiAdVR6bk3G4A+CuSHxeI6Bmpri3o9KXLV8=; b=N2CX2klGS9uEGJSCHZDVtFHuafsLqiFlOILOtCjHQYq15Sa3VqMM52h81tyCWzigHeC0e5JvLrifhlslbCcXH3cxdkiJ/FkmhlqZVvSztuizc2Ds2YAbp6eBZ0kqIqtOqVftX0KJfXX7XWr7iSyeEu61DUF8xPZR/vDXyQ+2IrdmAf1jNtoZ7rEInRureHURqyZi0v+/JG9ZjgRzJyJ1vnmJHKBqsgFgmlU1U8PnW8z2f2iFCjeZs7LF6/MmxPw3N4XCddIBIoJ1ADdvsHVrNFi+72fbW3IMy2SDmT4v1QUE6judy4IqlFg7bL1aGVsoPKVqCSGcmq1fvHym4+wh5A== 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=z+qiFu7BKiAdVR6bk3G4A+CuSHxeI6Bmpri3o9KXLV8=; b=nhFzefL/C0mFxIRhF/X2wQhkI3/UMwvZpw9YA54cz+JyZfz7UjuCZ+DqkPku0pZLXytZlvtZkBYzv64WqCH60HMwyW5rIbqOTyT8OiGK/rs3Mum+71FseK0L3sbq2Z4S40w6lu9TklKTUHCHDNbNx0y1ZdJrhPolA1FKzDDZXCw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=kontron.com; Received: from DU0PR10MB6252.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:3ef::11) by GV1PR10MB5889.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:150:55::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.28; Fri, 21 Jul 2023 17:29:21 +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.026; Fri, 21 Jul 2023 17:29:21 +0000 To: linux@roeck-us.net Cc: linux-hwmon@vger.kernel.org From: Gilles BULOZ Subject: [PATCH 1/1] hwmon: nct7802: Fix for temp6 (PECI1) processed even if PECI1 disabled Organization: Kontron Modular Computers SA Message-ID: Date: Fri, 21 Jul 2023 19:29:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 Content-Language: en-US X-ClientProxiedBy: PA7P264CA0039.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:34b::8) To DU0PR10MB6252.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:3ef::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR10MB6252:EE_|GV1PR10MB5889:EE_ X-MS-Office365-Filtering-Correlation-Id: c0c28515-4cbb-4754-909e-08db8a1004fb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /ydjQzkKT1NBIT3Wv20C2ZykzXYT6r129CkNS0DZMk0Xv2cQDI7Kh443xbRRhYF5cgPMFFHxwgNyjqO98QPyHANCW3zVNgC0YQUpozMjt1vfbfGhd47MEDtJ42x8n7/6rfCGh18dXn/mEi5Ky3ds5nyftyw60hpXo5NyGhZNQSH7kR07cxIv4V4M/AsGp/S2gW/7sBw3sqwmAGprYby9+YO2/9cJlTcdj7dVseS+jlPOBymMGqyJKsJwgy+fui75GykWzSbVxIwHoE9uB7Bo5RH7dUAzdxK940/vcHJvR1NT4LzCqqYwx0JMjkMozGYxFS0YCR22qxC/QtKJI28IDQXtuy1/eBx5pywGdCXlgl17BwAbZ4G5muRUcmFH1JIz1oJnU3q/LeSJizAaR9r2vwJYudNtaSviQf3g6gVjtGfdoemHV65o64uu/0d+8Gu4Q9BpAzxl5LEXYF5l359M8dkJMEsd63cIVV9ghc/QdIXAgB40l4R0LPb4SGYMARyN2K4nCAI2WEPpPhi3cG1iEnzctSwV7zo1zehNJ0yeWc4WQB7qdVgbHM5Ur7zRB5POS9WeWShQ68Z9APlfEL1x4IQTEyJNuOw1oIv+mARPisf9UHls7Et9CvKWoDTtTsAqV5BYplDaw8HzIf3GI8yZ5Q== 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)(366004)(346002)(39860400002)(396003)(136003)(376002)(451199021)(6512007)(38100700002)(83380400001)(186003)(2616005)(6506007)(26005)(4744005)(2906002)(8676002)(8936002)(5660300002)(36756003)(478600001)(36916002)(6486002)(316002)(4326008)(6916009)(41300700001)(66476007)(31696002)(86362001)(66946007)(66556008)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?4+xpa64h6isio7+nb7zMAPRHOdiz?= =?utf-8?q?fXF6baK+M93U3KivueufMJcUPu7yp9fH2dfJEz+jqieq88EcdwFrbJYpLfwl8pnkY?= =?utf-8?q?5h43IQt4kjTlznCPfAizBAW9butK5xnzd4dmA+ph+7bYGUc25U5sN4gNf6UQzWaH3?= =?utf-8?q?JLx50HuFgfh3Zn7og6FzvuncYDPmea+nlPiEn1Fme8LYiXZnriIASE+E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X1J6S/gt0iHiF1Z?= =?utf-8?q?q0qgeoC72eJeXmLVv6R2i/LKZL0Mz4vgevwlPD5Q2s+md3mVNcQBlZyG08lyYNQb6?= =?utf-8?q?kW7RMFV2hwLZeZbfC/KKg54bMgxSFUKUKdl+EOcjwNDEAMkVFoziHWCp2VZt5s+l+?= =?utf-8?q?P41WZEhSaYIPPhyCrZ6jmliDs9LUxERDaChwJ3FwUyh63VCNg8Q9owmpu2twEmlhi?= =?utf-8?q?XJc3hufRy3ELXScf2E/DCecYslillXK9ZsK6voPgDUJPtjNKr3NvV4albAnNlpFH7?= =?utf-8?q?M3Sb+L/edJb4spOau5et78IQcYR4Y/SUj40sCnd4L6V6K7t+nJvJnN33eH0VMYdzT?= =?utf-8?q?4UY6gWMpnWp/9JilzAQlsrS2WJ+XlK8TjnSe3FtIkKLMhBpre0LpFIkMG4jvVexcT?= =?utf-8?q?KOAa4znBbVQJh5cuuKFDgsim/i9iM1Xqs1OwFQWvCGJXAS3jFncqvDvIjvIljEJUT?= =?utf-8?q?F7WLe4FoaE9Vw5qhlMlZOblchAnAPFDpZg=3D=3D?= X-OriginatorOrg: kontron.com X-MS-Exchange-CrossTenant-Network-Message-Id: c0c28515-4cbb-4754-909e-08db8a1004fb X-MS-Exchange-CrossTenant-AuthSource: DU0PR10MB6252.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2023 17:29:21.2199 (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: I8UF8zYPG5iI1CR7/vi0hAXhCoGX5mL1nN/pQULC1LYU+By4axjmQAWtzUcS4vgE+c5XcA541QJdRojF0pFAPGSfvuYar/4JQF6+MhxAVjE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR10MB5889 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 --- 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;