From patchwork Sat Jan 28 06:03:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Crawford X-Patchwork-Id: 13119693 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 3E4CAC61DB3 for ; Sat, 28 Jan 2023 06:04:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230306AbjA1GEK (ORCPT ); Sat, 28 Jan 2023 01:04:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231496AbjA1GEJ (ORCPT ); Sat, 28 Jan 2023 01:04:09 -0500 Received: from ipmail06.adl3.internode.on.net (ipmail06.adl3.internode.on.net [150.101.137.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6F4107C70D for ; Fri, 27 Jan 2023 22:04:08 -0800 (PST) IronPort-SDR: meiESD1APBckwnL4LGBmVcJpS6ScejMTXFFjcTRhKWi18Mq7bGM809Dnl1UPSUZPxLQTXIgD44 /RU62pZfA+/w9xQ80H4qf0T1WEqY1qQ9UkVP/RASSsYo3vUOpxcgL/kU+d3Kk4HKAagFATlL1q O/f/N9Nb0r0Ruk27R6KMScOa729XJoxJfyZK+E3zyEQYanU6gZ4lwTfWrnx9EKbu+yvW7N3oJS GO5PEvEUQhXSl7Ic6frY5/tMcoaCdRt4Mw35kne1/OUuo3mba26kA5Z4f/PXJrspf5XvjWlRwS LxxnWZlxVWJ8PmEMw65NwJx3 X-SMTP-MATCH: 0 Received: from 60-242-28-244.static.tpgi.com.au (HELO bits.crawford.emu.id.au) ([60.242.28.244]) by ipmail06.adl3.internode.on.net with ESMTP; 28 Jan 2023 16:33:31 +1030 Received: from agc.crawford.emu.id.au (agc.crawford.emu.id.au [IPv6:fdd2:7aad:d478:1:0:0:cb10:cc07]) (authenticated bits=0) by bits.crawford.emu.id.au (8.17.1/8.17.1) with ESMTPSA id 30S63Ch92973396 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 28 Jan 2023 17:03:27 +1100 Authentication-Results: bits.crawford.emu.id.au; arc=none smtp.remote-ip=fdd2:7aad:d478:1::cb10:cc07 DKIM-Filter: OpenDKIM Filter v2.11.0 bits.crawford.emu.id.au 30S63Ch92973396 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crawford.emu.id.au; s=s1; t=1674885807; bh=xjv0PrvDFugp3Xa6stTohRT1XaShoZVbSrBrTOCs7U8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IPGPCWWIBDA4w3xBzXwuVZ0dLzB69Y/FJr4uf6h982bV2J8WPrfRm8YluDKcW95ss gaM2NSN/VpgnmulX0s0Nqsma+9+gZ0vKXOdxPY2BX2q27Knm0c5pV4a9un0WidfoAj whEg+XSdXj8ajOViNJuQiFbts5EYvzSBV4PaEDedS/txjDA1S8hjSkENisOWQzdIEA FGYB9VzJqmPneJkSBlDUXNSMSAsOzCGOXAhqzmFxQdqtv/tdCzRqWlNZEyas3qP+0/ IdCsGzOSAZEoAsKMxOOzk0GO+nJ244vcVLO/MadZDT59ZdZmOxA6bkjZr9AEcrpGsP QtCS9oRR8ZW2w== From: Frank Crawford To: Jean Delvare , Guenter Roeck Cc: linux-hwmon@vger.kernel.org, Frank Crawford Subject: [PATCH v3 1/7] hwmon: (it87) Allow disabling exiting of configuration mode Date: Sat, 28 Jan 2023 17:03:02 +1100 Message-Id: <20230128060308.1549707-2-frank@crawford.emu.id.au> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230128060308.1549707-1-frank@crawford.emu.id.au> References: <20230128060308.1549707-1-frank@crawford.emu.id.au> MIME-Version: 1.0 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (bits.crawford.emu.id.au [IPv6:fdd2:7aad:d478:1:0:0:cb10:cc01]); Sat, 28 Jan 2023 17:03:27 +1100 (AEDT) X-Virus-Scanned: clamav-milter 0.103.7 at bits.crawford.emu.id.au X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Disabling configuration mode on some chips can result in system hang-ups and access failures to the Super-IO chip at the second SIO address. Never exit configuration mode on these chips to avoid the problem. This patch should be applied in conjunction with a previous one to initialise the second chip for certain mother boards. Signed-off-by: Frank Crawford --- v3: * Correct possible uninitialised pointer issue. v2: * Convert to use feature flag and related macros rather than a separate field, as suggested in review. * Reverse sense of flag in superio_exit to simplify feature macro. --- drivers/hwmon/it87.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index a8a6a0ffee82..923a9563be92 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c @@ -128,10 +128,12 @@ static inline int superio_enter(int ioreg) return 0; } -static inline void superio_exit(int ioreg) +static inline void superio_exit(int ioreg, bool noexit) { - outb(0x02, ioreg); - outb(0x02, ioreg + 1); + if (!noexit) { + outb(0x02, ioreg); + outb(0x02, ioreg + 1); + } release_region(ioreg, 2); } @@ -300,6 +302,13 @@ struct it87_devices { #define FEAT_PWM_FREQ2 BIT(16) /* Separate pwm freq 2 */ #define FEAT_SIX_TEMP BIT(17) /* Up to 6 temp sensors */ #define FEAT_VIN3_5V BIT(18) /* VIN3 connected to +5V */ +/* + * Disabling configuration mode on some chips can result in system + * hang-ups and access failures to the Super-IO chip at the + * second SIO address. Never exit configuration mode on these + * chips to avoid the problem. + */ +#define FEAT_CONF_NOEXIT BIT(28) /* Chip should not exit conf mode */ static const struct it87_devices it87_devices[] = { [it87] = { @@ -493,6 +502,7 @@ static const struct it87_devices it87_devices[] = { #define has_pwm_freq2(data) ((data)->features & FEAT_PWM_FREQ2) #define has_six_temp(data) ((data)->features & FEAT_SIX_TEMP) #define has_vin3_5v(data) ((data)->features & FEAT_VIN3_5V) +#define has_conf_noexit(data) ((data)->features & FEAT_CONF_NOEXIT) struct it87_sio_data { int sioaddr; @@ -2404,7 +2414,7 @@ static int __init it87_find(int sioaddr, unsigned short *address, { int err; u16 chip_type; - const struct it87_devices *config; + const struct it87_devices *config = NULL; err = superio_enter(sioaddr); if (err) @@ -2489,6 +2499,8 @@ static int __init it87_find(int sioaddr, unsigned short *address, goto exit; } + config = &it87_devices[sio_data->type]; + superio_select(sioaddr, PME); if (!(superio_inb(sioaddr, IT87_ACT_REG) & 0x01)) { pr_info("Device not activated, skipping\n"); @@ -2508,8 +2520,6 @@ static int __init it87_find(int sioaddr, unsigned short *address, it87_devices[sio_data->type].suffix, *address, sio_data->revision); - config = &it87_devices[sio_data->type]; - /* in7 (VSB or VCCH5V) is always internal on some chips */ if (has_in7_internal(config)) sio_data->internal |= BIT(1); @@ -2827,7 +2837,7 @@ static int __init it87_find(int sioaddr, unsigned short *address, sio_data->skip_pwm |= dmi_data->skip_pwm; exit: - superio_exit(sioaddr); + superio_exit(sioaddr, config ? has_conf_noexit(config) : false); return err; } @@ -3213,7 +3223,7 @@ static void it87_resume_sio(struct platform_device *pdev) reg2c); } - superio_exit(data->sioaddr); + superio_exit(data->sioaddr, has_conf_noexit(data)); } static int it87_resume(struct device *dev) From patchwork Sat Jan 28 06:03:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Crawford X-Patchwork-Id: 13119691 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 8397AC636BD for ; Sat, 28 Jan 2023 06:04:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231496AbjA1GEL (ORCPT ); Sat, 28 Jan 2023 01:04:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbjA1GEK (ORCPT ); Sat, 28 Jan 2023 01:04:10 -0500 Received: from ipmail06.adl3.internode.on.net (ipmail06.adl3.internode.on.net [150.101.137.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CBBB17C31E for ; Fri, 27 Jan 2023 22:04:08 -0800 (PST) IronPort-SDR: 8iyiRMRH7CmGWWsbgXgldHTOHujMgD8EsaMiwgoWUY492xGpgc+RLdpC1BwX00nc6ZZtkOahcZ 39LexIY8M/ZOqScD9//pkPM0mUsF9yWI3t+HdacfcWn2mXBQUiSbgTqG6fGJljIk5TOVKeweDs nQnfvdpEaNnXyG4SWi3zN5JY6ZG+1txA6qDM2wlvDld3Gi2wzVDO6aI6GLGMOHyxWCaq5eQ6Bj A1R5wxLjPUA0V3BMh69iV8Da/u/V8emcjltzgmnIknHWW0Y2O6s8Gs4vpeU7VUi9rRszCprttr VlUw8/Y/f2IfQU3iqwtbEu1J X-SMTP-MATCH: 0 Received: from 60-242-28-244.static.tpgi.com.au (HELO bits.crawford.emu.id.au) ([60.242.28.244]) by ipmail06.adl3.internode.on.net with ESMTP; 28 Jan 2023 16:33:35 +1030 Received: from agc.crawford.emu.id.au (agc.crawford.emu.id.au [IPv6:fdd2:7aad:d478:1:0:0:cb10:cc07]) (authenticated bits=0) by bits.crawford.emu.id.au (8.17.1/8.17.1) with ESMTPSA id 30S63ChA2973396 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 28 Jan 2023 17:03:31 +1100 Authentication-Results: bits.crawford.emu.id.au; arc=none smtp.remote-ip=fdd2:7aad:d478:1::cb10:cc07 DKIM-Filter: OpenDKIM Filter v2.11.0 bits.crawford.emu.id.au 30S63ChA2973396 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crawford.emu.id.au; s=s1; t=1674885811; bh=dg1dAC8dD4EckFsTst6KvtVKV8v6tNTzYnVpwBZwiYw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CUdApOC7F1e8ttVptTP52P2KqBLHocL0bKHLUHnPYZpBPV8zdjxKGcFOzq1F8oDqA tm+lIt2UHSNKs/w0Ci4VXnF4+OESdVZRLrTJBfcBwXTnI1ZjjDwXfM621N+X1maaoU IN5OZGYb4kn9+ciTKvz+QbT7qj/1S1UFS83qHHcxRvpqxKCA0mUH82AZ3xb8DhV6sy Oo8AIaCvImghzhqU7xKbxvrP4iNvUNQKPtQsoRCrOKr9VdYsuOCCiNToLf3NLWPhoU 7taLm+d7yxsKiWptrvzvqIeY5CjoEpU6UvYoGr3syE5IgErmKTddT+9SiDT48AKxzL pWi0zJTz9n1VQ== From: Frank Crawford To: Jean Delvare , Guenter Roeck Cc: linux-hwmon@vger.kernel.org, Frank Crawford Subject: [PATCH v3 2/7] hwmon: (it87) Disable configuration exit for certain chips Date: Sat, 28 Jan 2023 17:03:03 +1100 Message-Id: <20230128060308.1549707-3-frank@crawford.emu.id.au> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230128060308.1549707-1-frank@crawford.emu.id.au> References: <20230128060308.1549707-1-frank@crawford.emu.id.au> MIME-Version: 1.0 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (bits.crawford.emu.id.au [IPv6:fdd2:7aad:d478:1:0:0:cb10:cc01]); Sat, 28 Jan 2023 17:03:31 +1100 (AEDT) X-Virus-Scanned: clamav-milter 0.103.7 at bits.crawford.emu.id.au X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org IT8790E and IT8792E/IT8795E have been identified as chips that can have issues when disabling configuration mode. Set to never exit configuration mode. Signed-off-by: Frank Crawford --- v3: * No change. v2: * Make use of new feature flag rather than separate field. --- drivers/hwmon/it87.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index 923a9563be92..45d4b5ee3701 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c @@ -429,7 +429,7 @@ static const struct it87_devices it87_devices[] = { .suffix = "E", .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_IN7_INTERNAL - | FEAT_PWM_FREQ2, + | FEAT_PWM_FREQ2 | FEAT_CONF_NOEXIT, .peci_mask = 0x07, }, [it8792] = { @@ -437,7 +437,7 @@ static const struct it87_devices it87_devices[] = { .suffix = "E", .features = FEAT_NEWER_AUTOPWM | FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_TEMP_OLD_PECI | FEAT_TEMP_PECI - | FEAT_10_9MV_ADC | FEAT_IN7_INTERNAL, + | FEAT_10_9MV_ADC | FEAT_IN7_INTERNAL | FEAT_CONF_NOEXIT, .peci_mask = 0x07, .old_peci_mask = 0x02, /* Actually reports PCH */ }, From patchwork Sat Jan 28 06:03:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Crawford X-Patchwork-Id: 13119695 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 6B842C38142 for ; Sat, 28 Jan 2023 06:04:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229562AbjA1GEQ (ORCPT ); Sat, 28 Jan 2023 01:04:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231902AbjA1GEP (ORCPT ); Sat, 28 Jan 2023 01:04:15 -0500 Received: from ipmail06.adl3.internode.on.net (ipmail06.adl3.internode.on.net [150.101.137.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E8A7388F33 for ; Fri, 27 Jan 2023 22:04:13 -0800 (PST) IronPort-SDR: 3SXw8OffwzkTqydqY8/vFmXDZH19N2wtNnVY/G8znFpZ3tDlRRLs9KI8KP1OpBCC91h2wO5dZR B7AYp2WdOwKI9xXguhuaE6F8VBJ7WkQzd+wSOPUmYyQ7Enfj6y6SMoeaDup0Yt/maM1GOItXNh tEbH6ikY763KXkeDOx15aOOfAXRpTTUx38gc5JPpGwjpUEPRWz4eyNZ1sQe+/TSh/tGfyc+K68 JhrkUMPWm/9XW9WnXNzk/5rNmIMxxMcVHrX/o4jjZP4wOs5TJBtOLDOQh6o9d2+SrXsnVyvhWt dz++v8lvb5Z+enRF8q1BPann X-SMTP-MATCH: 0 X-IPAS-Result: A2BtAABJutRj//Qc8jxaHQEBAQEJARIBBQUBSYEyCAELAYIsgmCMbaZAgX4PAQ8BAUQEAQGFBwKFJSY0CQ4BAgQBAQEBAwIDAQEBAQEBAwEBBgEBAQEBAQYEgSoHC1IHC1gHB4FBC4FhEwsDMQ2GVgIBAycLAQ0BATcBDxk4VwYBEoJ+gyOqbjOBAYIIAQEGgmKaZ4FeCYFAAYthgRSDNnpDP4FOhH2LA5tzCoE5d4ElDkx6gQ8CCQIRdHkDCQMHBUlAAwsYDRYyChMsNQsLShAbGhsHgQYqKBUDBAQDAgYTAyACDSgxFAQpEw0nJmkJAgMiXwUDAwQoLQk/ByYkPAdWNwYCDx83BgMJAwIfUHEvEhIFAwsVKkcECDYFBhw2EgIIDxIPLEMOQjc0EwZcASkLDhEDUEYZbgSCDAoGKSaeTnEBgQ6VXo5YoWODfoFSnn5MgUSna5dPIKMchCsCCgcWgWKCFU0fGTuCZ08BAgEBAQ0BAgEBAwECAQEBCQEBAQGOHYIskUthOwIHCwE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ifZqxz/FICMwqTNOftWrdyQ2Vxf9ZnOnfKlTbckWUygce79 YGT0EUMr3N5DZB4/oTb2SDYq4dKaG8gcWVbP/lvgtQpB9RGtxdBthCe32m+pwffng9OaYE X-IronPort-Anti-Spam-Filtered: true Received: from 60-242-28-244.static.tpgi.com.au (HELO bits.crawford.emu.id.au) ([60.242.28.244]) by ipmail06.adl3.internode.on.net with ESMTP; 28 Jan 2023 16:33:38 +1030 Received: from agc.crawford.emu.id.au (agc.crawford.emu.id.au [IPv6:fdd2:7aad:d478:1:0:0:cb10:cc07]) (authenticated bits=0) by bits.crawford.emu.id.au (8.17.1/8.17.1) with ESMTPSA id 30S63ChB2973396 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 28 Jan 2023 17:03:34 +1100 Authentication-Results: bits.crawford.emu.id.au; arc=none smtp.remote-ip=fdd2:7aad:d478:1::cb10:cc07 DKIM-Filter: OpenDKIM Filter v2.11.0 bits.crawford.emu.id.au 30S63ChB2973396 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crawford.emu.id.au; s=s1; t=1674885815; bh=M2MVaha1xLw9k0+IL2I0shECySHA7DuKZiKIFVRIjkE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NpqK9ibpR4r69g+SxPn2Ev/pcYENxcaMQvD55437z3iYx8Gz1/crtRM6A1YJGa7uc Aqi8LWmDXxGcCRK7bE+1VIh2V9w8TvDRqqVT+OLhoFkg8cLoF/0cBmsVbAhj8c3hzC scBFJKSZcLJnzEa2REp7rHSnk2iLmGykZ+jmveKy4QDAeTZ2ECbpQCZztmBArR1OMb Lq6ofYsGECUQR1tpWJR5tnZ8dcAB1Qp4jKGSzP2P5BJrl1c6O+C2iXTSlN0VY2HXfO xeAfi/RIVhOG70iYTt6D0kx+Gdm7m8xwfB95vwzXzbPX27u/vH+wsNkLqxETBi7weW 90Ii7NNP0+PoQ== From: Frank Crawford To: Jean Delvare , Guenter Roeck Cc: linux-hwmon@vger.kernel.org, Frank Crawford Subject: [PATCH v3 3/7] hwmon: (it87) List full chip model name Date: Sat, 28 Jan 2023 17:03:04 +1100 Message-Id: <20230128060308.1549707-4-frank@crawford.emu.id.au> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230128060308.1549707-1-frank@crawford.emu.id.au> References: <20230128060308.1549707-1-frank@crawford.emu.id.au> MIME-Version: 1.0 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (bits.crawford.emu.id.au [IPv6:fdd2:7aad:d478:1:0:0:cb10:cc01]); Sat, 28 Jan 2023 17:03:35 +1100 (AEDT) X-Virus-Scanned: clamav-milter 0.103.7 at bits.crawford.emu.id.au X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org ITE model names do not always match the chip ID. Convert from just adding a suffix to specifying the full model name. Signed-off-by: Frank Crawford --- v3: * No change. v2: * No change. --- drivers/hwmon/it87.c | 46 ++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index 45d4b5ee3701..1d9f0c6dfeb9 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c @@ -277,7 +277,7 @@ static const u8 IT87_REG_AUTO_BASE[] = { 0x60, 0x68, 0x70, 0x78, 0xa0, 0xa8 }; struct it87_devices { const char *name; - const char * const suffix; + const char * const model; u32 features; u8 peci_mask; u8 old_peci_mask; @@ -313,24 +313,24 @@ struct it87_devices { static const struct it87_devices it87_devices[] = { [it87] = { .name = "it87", - .suffix = "F", + .model = "IT87F", .features = FEAT_OLD_AUTOPWM, /* may need to overwrite */ }, [it8712] = { .name = "it8712", - .suffix = "F", + .model = "IT8712F", .features = FEAT_OLD_AUTOPWM | FEAT_VID, /* may need to overwrite */ }, [it8716] = { .name = "it8716", - .suffix = "F", + .model = "IT8716F", .features = FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_VID | FEAT_FAN16_CONFIG | FEAT_FIVE_FANS | FEAT_PWM_FREQ2, }, [it8718] = { .name = "it8718", - .suffix = "F", + .model = "IT8718F", .features = FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_VID | FEAT_TEMP_OLD_PECI | FEAT_FAN16_CONFIG | FEAT_FIVE_FANS | FEAT_PWM_FREQ2, @@ -338,7 +338,7 @@ static const struct it87_devices it87_devices[] = { }, [it8720] = { .name = "it8720", - .suffix = "F", + .model = "IT8720F", .features = FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_VID | FEAT_TEMP_OLD_PECI | FEAT_FAN16_CONFIG | FEAT_FIVE_FANS | FEAT_PWM_FREQ2, @@ -346,7 +346,7 @@ static const struct it87_devices it87_devices[] = { }, [it8721] = { .name = "it8721", - .suffix = "F", + .model = "IT8721F", .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_TEMP_OLD_PECI | FEAT_TEMP_PECI | FEAT_FAN16_CONFIG | FEAT_FIVE_FANS | FEAT_IN7_INTERNAL @@ -356,7 +356,7 @@ static const struct it87_devices it87_devices[] = { }, [it8728] = { .name = "it8728", - .suffix = "F", + .model = "IT8728F", .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_FIVE_FANS | FEAT_IN7_INTERNAL | FEAT_PWM_FREQ2, @@ -364,7 +364,7 @@ static const struct it87_devices it87_devices[] = { }, [it8732] = { .name = "it8732", - .suffix = "F", + .model = "IT8732F", .features = FEAT_NEWER_AUTOPWM | FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_TEMP_OLD_PECI | FEAT_TEMP_PECI | FEAT_10_9MV_ADC | FEAT_IN7_INTERNAL, @@ -373,7 +373,7 @@ static const struct it87_devices it87_devices[] = { }, [it8771] = { .name = "it8771", - .suffix = "E", + .model = "IT8771E", .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_IN7_INTERNAL | FEAT_PWM_FREQ2, @@ -385,7 +385,7 @@ static const struct it87_devices it87_devices[] = { }, [it8772] = { .name = "it8772", - .suffix = "E", + .model = "IT8772E", .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_IN7_INTERNAL | FEAT_PWM_FREQ2, @@ -397,28 +397,28 @@ static const struct it87_devices it87_devices[] = { }, [it8781] = { .name = "it8781", - .suffix = "F", + .model = "IT8781F", .features = FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_TEMP_OLD_PECI | FEAT_FAN16_CONFIG | FEAT_PWM_FREQ2, .old_peci_mask = 0x4, }, [it8782] = { .name = "it8782", - .suffix = "F", + .model = "IT8782F", .features = FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_TEMP_OLD_PECI | FEAT_FAN16_CONFIG | FEAT_PWM_FREQ2, .old_peci_mask = 0x4, }, [it8783] = { .name = "it8783", - .suffix = "E/F", + .model = "IT8783E/F", .features = FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_TEMP_OLD_PECI | FEAT_FAN16_CONFIG | FEAT_PWM_FREQ2, .old_peci_mask = 0x4, }, [it8786] = { .name = "it8786", - .suffix = "E", + .model = "IT8786E", .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_IN7_INTERNAL | FEAT_PWM_FREQ2, @@ -426,7 +426,7 @@ static const struct it87_devices it87_devices[] = { }, [it8790] = { .name = "it8790", - .suffix = "E", + .model = "IT8790E", .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_IN7_INTERNAL | FEAT_PWM_FREQ2 | FEAT_CONF_NOEXIT, @@ -434,7 +434,7 @@ static const struct it87_devices it87_devices[] = { }, [it8792] = { .name = "it8792", - .suffix = "E", + .model = "IT8792E/IT8795E", .features = FEAT_NEWER_AUTOPWM | FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_TEMP_OLD_PECI | FEAT_TEMP_PECI | FEAT_10_9MV_ADC | FEAT_IN7_INTERNAL | FEAT_CONF_NOEXIT, @@ -443,7 +443,7 @@ static const struct it87_devices it87_devices[] = { }, [it8603] = { .name = "it8603", - .suffix = "E", + .model = "IT8603E", .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_IN7_INTERNAL | FEAT_AVCC3 | FEAT_PWM_FREQ2, @@ -451,7 +451,7 @@ static const struct it87_devices it87_devices[] = { }, [it8620] = { .name = "it8620", - .suffix = "E", + .model = "IT8620E", .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_SIX_FANS | FEAT_IN7_INTERNAL | FEAT_SIX_PWM | FEAT_PWM_FREQ2 @@ -460,7 +460,7 @@ static const struct it87_devices it87_devices[] = { }, [it8622] = { .name = "it8622", - .suffix = "E", + .model = "IT8622E", .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_FIVE_FANS | FEAT_FIVE_PWM | FEAT_IN7_INTERNAL | FEAT_PWM_FREQ2 @@ -469,7 +469,7 @@ static const struct it87_devices it87_devices[] = { }, [it8628] = { .name = "it8628", - .suffix = "E", + .model = "IT8628E", .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_SIX_FANS | FEAT_IN7_INTERNAL | FEAT_SIX_PWM | FEAT_PWM_FREQ2 @@ -2516,8 +2516,8 @@ static int __init it87_find(int sioaddr, unsigned short *address, err = 0; sio_data->sioaddr = sioaddr; sio_data->revision = superio_inb(sioaddr, DEVREV) & 0x0f; - pr_info("Found IT%04x%s chip at 0x%x, revision %d\n", chip_type, - it87_devices[sio_data->type].suffix, + pr_info("Found %s chip at 0x%x, revision %d\n", + it87_devices[sio_data->type].model, *address, sio_data->revision); /* in7 (VSB or VCCH5V) is always internal on some chips */ From patchwork Sat Jan 28 06:03:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Crawford X-Patchwork-Id: 13119689 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 5A6FDC27C76 for ; Sat, 28 Jan 2023 06:04:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231648AbjA1GEJ (ORCPT ); Sat, 28 Jan 2023 01:04:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231496AbjA1GEI (ORCPT ); Sat, 28 Jan 2023 01:04:08 -0500 Received: from ipmail06.adl3.internode.on.net (ipmail06.adl3.internode.on.net [150.101.137.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 79EF47C31E for ; Fri, 27 Jan 2023 22:04:02 -0800 (PST) IronPort-SDR: 5GJXiDvZ7Ga4AQoHhMbAYtDDSLKCRvEI228wpHiwhVYLbxnj08iyo4SK+xbN4HSXLThKOHd6SY rVwLlBQXgRs2KA0ia4o0Duj0mZb2Dsfw/0X3QfSkb+kYDDTkBD7/RxxZbaa27MhIVoN3IE2JA3 Agvh0u09ZU6AuKcQaapkoNNd9B0m/lSazxobMuoA1e88whx6F7EbOyHc67aQGdfe4gdR21In++ P3UHBfTVpU7J6LZIMauTkYEaXGQUYWuoag4eEo0eMOqeSKvV/IdvfEmKmg0JQYDK0dXBx3iat0 cF9Eo+MGl4z4yGoczhf7NVt3 X-SMTP-MATCH: 0 Received: from 60-242-28-244.static.tpgi.com.au (HELO bits.crawford.emu.id.au) ([60.242.28.244]) by ipmail06.adl3.internode.on.net with ESMTP; 28 Jan 2023 16:33:43 +1030 Received: from agc.crawford.emu.id.au (agc.crawford.emu.id.au [IPv6:fdd2:7aad:d478:1:0:0:cb10:cc07]) (authenticated bits=0) by bits.crawford.emu.id.au (8.17.1/8.17.1) with ESMTPSA id 30S63ChC2973396 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 28 Jan 2023 17:03:38 +1100 Authentication-Results: bits.crawford.emu.id.au; arc=none smtp.remote-ip=fdd2:7aad:d478:1::cb10:cc07 DKIM-Filter: OpenDKIM Filter v2.11.0 bits.crawford.emu.id.au 30S63ChC2973396 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crawford.emu.id.au; s=s1; t=1674885818; bh=NWIca1sbonD927niJfu24oqRgmA86E1zonOsi8DPSKQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M0u5js9o3fFVSQlzFvp/Ls766HYiGvHa2lvUG0JCWKvT5oanWVuFov/JbXluGEBdW GUZ9kyNzGAxeS+sGXzJmP78HZC5vbSdDCuEOtF2sqIL7c/BFZkHfS3mUKxDzr4zIOt g2fnz0An2Ws0aSICU8vvL7znxLdKCUVB9lY3KQoGjPYjfb/xdHUrUROAa6fdmo7TM/ QIDhaIDLYvo8KZV0DZ6qtQUWY5T4e43EcE2E8nyObfa7QCB01qLuFAU3oUb+UAoT1v q5ZN9IXtVAqgm1bgOtmOVUr7JSIkYhVRQ3EjHT4DI2Hui/4vmxHAM9c/XzxVU4eT1K 51BmcFuB4Rq8w== From: Frank Crawford To: Jean Delvare , Guenter Roeck Cc: linux-hwmon@vger.kernel.org, Frank Crawford Subject: [PATCH v3 4/7] hwmon: (it87) Add chip_id in some info message Date: Sat, 28 Jan 2023 17:03:05 +1100 Message-Id: <20230128060308.1549707-5-frank@crawford.emu.id.au> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230128060308.1549707-1-frank@crawford.emu.id.au> References: <20230128060308.1549707-1-frank@crawford.emu.id.au> MIME-Version: 1.0 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (bits.crawford.emu.id.au [IPv6:fdd2:7aad:d478:1:0:0:cb10:cc01]); Sat, 28 Jan 2023 17:03:38 +1100 (AEDT) X-Virus-Scanned: clamav-milter 0.103.7 at bits.crawford.emu.id.au X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org In cases where there are multiple chips, print out which chip is referred to, in the informational message. Signed-off-by: Frank Crawford --- v3: * No change. v2: * Improved chip description following review. --- drivers/hwmon/it87.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index 1d9f0c6dfeb9..450f0bfec328 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c @@ -2503,13 +2503,15 @@ static int __init it87_find(int sioaddr, unsigned short *address, superio_select(sioaddr, PME); if (!(superio_inb(sioaddr, IT87_ACT_REG) & 0x01)) { - pr_info("Device not activated, skipping\n"); + pr_info("Device (chip %s ioreg 0x%x) not activated, skipping\n", + config->model, sioaddr); goto exit; } *address = superio_inw(sioaddr, IT87_BASE_REG) & ~(IT87_EXTENT - 1); if (*address == 0) { - pr_info("Base address not set, skipping\n"); + pr_info("Base address not set (chip %s ioreg 0x%x), skipping\n", + config->model, sioaddr); goto exit; } From patchwork Sat Jan 28 06:03:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Crawford X-Patchwork-Id: 13119692 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 2FE93C61DA4 for ; Sat, 28 Jan 2023 06:04:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232284AbjA1GEK (ORCPT ); Sat, 28 Jan 2023 01:04:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231902AbjA1GEJ (ORCPT ); Sat, 28 Jan 2023 01:04:09 -0500 Received: from ipmail06.adl3.internode.on.net (ipmail06.adl3.internode.on.net [150.101.137.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6F4977D29D for ; Fri, 27 Jan 2023 22:04:08 -0800 (PST) IronPort-SDR: t+NROiXVzhvtnhvh3kBwGkCMFL5c0WCfl3eWlqTP2R3UloNEyfdJhuF6R2a1Qwsq+ni5jcmJsB yzu/De/T3KNr9YK1Qs9UIoTTCQV52MVnbQeT6JwDNSQe7nzIPeEkX9HuIF+UHVIEd7qMGTbluM X83oNeMBrZI7+mYpB8YvWEH/dyZKlXo7VPAvPbtpadBfFB9puaR1FwpQ5EEVJtz3rY+T7LqEdR PLs3kNzEcqdWqOLCfHi/iDw/Hr/Pn+ENGPvXu4Wt5BUzuA5NzFGOBbNmMdtf1olfp/nRwpxE35 XlA3UYJkA2H/PhQEnsgxAN9J X-SMTP-MATCH: 0 Received: from 60-242-28-244.static.tpgi.com.au (HELO bits.crawford.emu.id.au) ([60.242.28.244]) by ipmail06.adl3.internode.on.net with ESMTP; 28 Jan 2023 16:33:47 +1030 Received: from agc.crawford.emu.id.au (agc.crawford.emu.id.au [IPv6:fdd2:7aad:d478:1:0:0:cb10:cc07]) (authenticated bits=0) by bits.crawford.emu.id.au (8.17.1/8.17.1) with ESMTPSA id 30S63ChD2973396 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 28 Jan 2023 17:03:43 +1100 Authentication-Results: bits.crawford.emu.id.au; arc=none smtp.remote-ip=fdd2:7aad:d478:1::cb10:cc07 DKIM-Filter: OpenDKIM Filter v2.11.0 bits.crawford.emu.id.au 30S63ChD2973396 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crawford.emu.id.au; s=s1; t=1674885823; bh=i2XGXabeeiO+pdS/NSVl7gpDwA49NN/JXqrhvG0Iwds=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o8KLiu7V8YNyU6e/cr7L9pBSF4yYNq1QgCJldAQsUJGj3Lqwb/1HCaN5r9cDKIlw5 UUy5EV+7akA4Bhkqr2ZBwUrsWKrBxs7FedFwZSrCZPH3cITrLU4/sseymK69rQ+jsc Zy7eK2DXMhQPttShGNbOLnEed4Sd/KWFKJlfbDFd3h6dhuwgPEVyxRCw2ny4ttZRXK bvdFRHHuiYAQ2+6BZ0r96COpWOl9cnWqe6J0mNgsBdShbXqrflXdZpVzeK/oPKVHOE alTqmHls1K1NTUZobGgL5my+xZEiJehXE2xqjyvv8zxtvMS6AIeG4YvbbSELtnMu2x 1+Rm/vc/pAc1g== From: Frank Crawford To: Jean Delvare , Guenter Roeck Cc: linux-hwmon@vger.kernel.org, Frank Crawford Subject: [PATCH v3 5/7] hwmon: (it87) Allow multiple chip IDs for force_id Date: Sat, 28 Jan 2023 17:03:06 +1100 Message-Id: <20230128060308.1549707-6-frank@crawford.emu.id.au> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230128060308.1549707-1-frank@crawford.emu.id.au> References: <20230128060308.1549707-1-frank@crawford.emu.id.au> MIME-Version: 1.0 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (bits.crawford.emu.id.au [IPv6:fdd2:7aad:d478:1:0:0:cb10:cc01]); Sat, 28 Jan 2023 17:03:43 +1100 (AEDT) X-Virus-Scanned: clamav-milter 0.103.7 at bits.crawford.emu.id.au X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Extend the force_id module parameter to allow specifying one or both chip IDs separately. If only a single parameter is given it defaults to using that value for all chips, similar to previous usage. Signed-off-by: Frank Crawford --- v3: * No change. v2: * No change. --- drivers/hwmon/it87.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index 450f0bfec328..83de34119d74 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c @@ -175,8 +175,9 @@ static inline void superio_exit(int ioreg, bool noexit) #define IT87_SIO_VID_REG 0xfc /* VID value */ #define IT87_SIO_BEEP_PIN_REG 0xf6 /* Beep pin mapping */ -/* Force chip ID to specified value. Should only be used for testing */ -static unsigned short force_id; +/* Force chip IDs to specified values. Should only be used for testing */ +static unsigned short force_id[2]; +static unsigned int force_id_cnt; /* ACPI resource conflicts are ignored if this parameter is set to 1 */ static bool ignore_resource_conflict; @@ -2410,7 +2411,7 @@ static const struct attribute_group it87_group_auto_pwm = { /* SuperIO detection - will change isa_address if a chip is found */ static int __init it87_find(int sioaddr, unsigned short *address, - struct it87_sio_data *sio_data) + struct it87_sio_data *sio_data, int chip_cnt) { int err; u16 chip_type; @@ -2426,8 +2427,12 @@ static int __init it87_find(int sioaddr, unsigned short *address, if (chip_type == 0xffff) goto exit; - if (force_id) - chip_type = force_id; + if (force_id_cnt == 1) { + /* If only one value given use for all chips */ + if (force_id[0]) + chip_type = force_id[0]; + } else if (force_id[chip_cnt]) + chip_type = force_id[chip_cnt]; switch (chip_type) { case IT8705F_DEVID: @@ -3419,7 +3424,7 @@ static int __init sm_it87_init(void) for (i = 0; i < ARRAY_SIZE(sioaddr); i++) { memset(&sio_data, 0, sizeof(struct it87_sio_data)); isa_address[i] = 0; - err = it87_find(sioaddr[i], &isa_address[i], &sio_data); + err = it87_find(sioaddr[i], &isa_address[i], &sio_data, i); if (err || isa_address[i] == 0) continue; /* @@ -3468,8 +3473,8 @@ static void __exit sm_it87_exit(void) MODULE_AUTHOR("Chris Gauthron, Jean Delvare "); MODULE_DESCRIPTION("IT8705F/IT871xF/IT872xF hardware monitoring driver"); -module_param(force_id, ushort, 0); -MODULE_PARM_DESC(force_id, "Override the detected device ID"); +module_param_array(force_id, ushort, &force_id_cnt, 0); +MODULE_PARM_DESC(force_id, "Override one or more detected device ID(s)"); module_param(ignore_resource_conflict, bool, 0); MODULE_PARM_DESC(ignore_resource_conflict, "Ignore ACPI resource conflict"); From patchwork Sat Jan 28 06:03:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Crawford X-Patchwork-Id: 13119694 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 727C1C27C76 for ; Sat, 28 Jan 2023 06:04:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231918AbjA1GEQ (ORCPT ); Sat, 28 Jan 2023 01:04:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbjA1GEO (ORCPT ); Sat, 28 Jan 2023 01:04:14 -0500 Received: from ipmail06.adl3.internode.on.net (ipmail06.adl3.internode.on.net [150.101.137.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 502E7834A5 for ; Fri, 27 Jan 2023 22:04:13 -0800 (PST) IronPort-SDR: SUu1bswPxTaKfMf4SXUUqn2NIDWVdAabOdaLWj3YhB13EOchm5I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cgtRdiVhbXwIg5EGLLbaSuaZJI3RI6SJmuN7Id0Nc1V9iv/Ht nC7RkJCzlfj7UAr2i3UAk2OqdrHA/5CkJ7MFXVyZgb4hyR/P9zHAWV2X8JfQITLPddLlZZcJ 8Tpse3ZX5yjkxzLpGYQa4fTtotneEj5jA6CJXP1MjMldoFuQBbFvNLhY03u+G8HE3Pv58c5p rSh0CLdQIYCHlo9VpyHM6L0l17h72IAnO9SXlfTJocBckvb8L9sd377gMgocpMFJhj0zzeH0 xqbXEUDru7Xro5rrNTE3PjWr4qgH+ZkMFBdGm3XseS/OSXApzrxypVJT+iPZzybWWbpvqSuI +xIlqmuPPoClVdMkox9D7cyk/1kvYq09+QCw109TnvRblmtBrdxGVW83JFC5v9X27tUmQqqQ UbRqNNUDrW+Pp+3GlAmO1t3Z+uO4vgYhz3O4KlnO079/iJ2ouaKXEgObRmBjCtRcOl8PI8/m 7xzss8K8Eq0kBM1PNGcgmZZ8nnKL3BGWrh+7sMWB4riiwwKzFBeYMWCVXWsscrfMI1BYhswP zuZpKvenLAClEDMRHoEEySf1+RqmsVcsR9H+1YOOlCVl4eXnfQwxhBQr2g6Q1gH1BlByO4va GFnO1cuf/fQp3Iy2JIGBTDpQV0dQgaF81DwwB0VjGLYCUKvUyrEMTRla+qK+UkY9UNafyRap e/Hkjy0CmaxJMyhjDEvXUNFquD4SYAj/AP1npH1FsuIKJA2fD75j/L8fmEPsRbmX588iUCvS TOGJwqshXAX7RItnpA= IronPort-HdrOrdr: A9a23:k+qo96turc6dU0D9ben1SJrL7skDrNV00zEX/kB9WHVpm6yj/f xGUs576faSskdpZJlD8ersBEDkex/hHPFOkOos1NuZMzUO/VHYSL2KjrGSpQEIZReOlNK1vJ 0IG8ND4Z/LfD9HZK3BgDVQfexP/DEJnZrY/ds2t00dKD2Cc5sQkzuRFDzrb3GemzM2fqbQxf Knl7B6mwY= X-IronPort-Anti-Spam-Filtered: true Received: from 60-242-28-244.static.tpgi.com.au (HELO bits.crawford.emu.id.au) ([60.242.28.244]) by ipmail06.adl3.internode.on.net with ESMTP; 28 Jan 2023 16:33:50 +1030 Received: from agc.crawford.emu.id.au (agc.crawford.emu.id.au [IPv6:fdd2:7aad:d478:1:0:0:cb10:cc07]) (authenticated bits=0) by bits.crawford.emu.id.au (8.17.1/8.17.1) with ESMTPSA id 30S63ChE2973396 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 28 Jan 2023 17:03:46 +1100 Authentication-Results: bits.crawford.emu.id.au; arc=none smtp.remote-ip=fdd2:7aad:d478:1::cb10:cc07 DKIM-Filter: OpenDKIM Filter v2.11.0 bits.crawford.emu.id.au 30S63ChE2973396 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crawford.emu.id.au; s=s1; t=1674885826; bh=19grbD9CHxWwx1gqWLdWJwdaLqN//6Gte74Urgo9rwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sWUZd1TxAA5SOgAUEpO9hq9b10vcPynD6nbwKbMjKgOzS1OPBNdjdTUShhcRk5/yA lkgYu8+Hn7/NpkHoPpGjYDxPjmnDbGK5nhAhrIQsVZRipXaMEBOLpTajZo0irr1Rtu jYpAfeUPagFysxu8Kuj6jzxkhMnaNNFysIxWwNj3qG8AMPZ4O6hjLcNzW3anARW9HC L73edngsj8S7bcDZrq5GacI+WKc2cyEIEC5ncouevrLD6WLCyouMQfOTp72+pbtnR8 QRsBYzFBWcdBNO47FEU9eKCChLSzEW/B0e53J3xa/4ex0vaErl796qPiWLHX6Ejv7A dytfzRjoAgguA== From: Frank Crawford To: Jean Delvare , Guenter Roeck Cc: linux-hwmon@vger.kernel.org, Frank Crawford Subject: [PATCH v3 6/7] hwmon: (it87) Add new chipset IT87952E Date: Sat, 28 Jan 2023 17:03:07 +1100 Message-Id: <20230128060308.1549707-7-frank@crawford.emu.id.au> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230128060308.1549707-1-frank@crawford.emu.id.au> References: <20230128060308.1549707-1-frank@crawford.emu.id.au> MIME-Version: 1.0 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (bits.crawford.emu.id.au [IPv6:fdd2:7aad:d478:1:0:0:cb10:cc01]); Sat, 28 Jan 2023 17:03:46 +1100 (AEDT) X-Virus-Scanned: clamav-milter 0.103.7 at bits.crawford.emu.id.au X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Add IT87952E, a new chip ID (DEV ID 0x8695), which appears to be an updated version of the IT8792E and takes the same configuration. The model name comes from the model name printed on the chip. There is no datasheet publicly available. Signed-off-by: Frank Crawford --- v3: * No change. v2: * Make use of feature flag for definition. --- drivers/hwmon/it87.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index 83de34119d74..6b2b2776d8c2 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c @@ -34,6 +34,7 @@ * IT8786E Super I/O chip w/LPC interface * IT8790E Super I/O chip w/LPC interface * IT8792E Super I/O chip w/LPC interface + * IT87952E Super I/O chip w/LPC interface * Sis950 A clone of the IT8705F * * Copyright (C) 2001 Chris Gauthron @@ -63,7 +64,7 @@ enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8732, it8771, it8772, it8781, it8782, it8783, it8786, it8790, - it8792, it8603, it8620, it8622, it8628 }; + it8792, it8603, it8620, it8622, it8628, it87952 }; static struct platform_device *it87_pdev[2]; @@ -160,6 +161,7 @@ static inline void superio_exit(int ioreg, bool noexit) #define IT8622E_DEVID 0x8622 #define IT8623E_DEVID 0x8623 #define IT8628E_DEVID 0x8628 +#define IT87952E_DEVID 0x8695 #define IT87_ACT_REG 0x30 #define IT87_BASE_REG 0x60 @@ -477,6 +479,15 @@ static const struct it87_devices it87_devices[] = { | FEAT_SIX_TEMP | FEAT_VIN3_5V, .peci_mask = 0x07, }, + [it87952] = { + .name = "it87952", + .model = "IT87952E", + .features = FEAT_NEWER_AUTOPWM | FEAT_16BIT_FANS + | FEAT_TEMP_OFFSET | FEAT_TEMP_OLD_PECI | FEAT_TEMP_PECI + | FEAT_10_9MV_ADC | FEAT_IN7_INTERNAL | FEAT_CONF_NOEXIT, + .peci_mask = 0x07, + .old_peci_mask = 0x02, /* Actually reports PCH */ + }, }; #define has_16bit_fans(data) ((data)->features & FEAT_16BIT_FANS) @@ -2497,6 +2508,9 @@ static int __init it87_find(int sioaddr, unsigned short *address, case IT8628E_DEVID: sio_data->type = it8628; break; + case IT87952E_DEVID: + sio_data->type = it87952; + break; case 0xffff: /* No device at all */ goto exit; default: From patchwork Sat Jan 28 06:03:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Crawford X-Patchwork-Id: 13119696 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 ABC23C61DA4 for ; Sat, 28 Jan 2023 06:04:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229530AbjA1GER (ORCPT ); Sat, 28 Jan 2023 01:04:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229883AbjA1GER (ORCPT ); Sat, 28 Jan 2023 01:04:17 -0500 Received: from ipmail06.adl3.internode.on.net (ipmail06.adl3.internode.on.net [150.101.137.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2B7737C70D for ; Fri, 27 Jan 2023 22:04:14 -0800 (PST) IronPort-SDR: 9Kq2EQKYxMi4CC/lWREMh+xXZBc4nmkN7jhh4KpIkG4jgL3FQyEunTXrJDgH+r5oK6nobeUBSs vcpbBQV1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V9iv/Ht nC7RkJCzlfj7UAr2i3UAk2OqdrHA/5CkJ7MFXVyZgb4hyR/P9zHAWV2X8JfQITLPddLlZZcJ 8Tpse3ZUpyjkxzLpGYQa4fTtotneEj5jA6CJXP1MjMldoFuQBbFvNLhY03u+G8HE3Pv58c5p rSh0CLdQIYCHlo9VpyHM6L0k17h72IAnO9SXlfTJocBckvb8L9sd377gMgocpMFJhj0zzeH0 xqbXEUDru7Xro5rrNTE3PjWr4qgH+ZkMFBdGm3XseS/OSXApzrxypVJT+iPZzybWWbpvqSuI +xIlqmuPPoClVdMkox9D7cyk/1kvYq09+QGw109TnvRblmtBrdxGVW83JFC5v9X27tUmQqqQ UbRqNNUDrW+Pp+3GlAmO1t3Z+uO4vgYhz3O4KlnO079/iJ2ouaKXEgObRmBjCtRcOl8PI8/m 7xzss8K8Eq0kBM1PNGcgmZZ8nnKL3BGWrh+7sMWB4riiwwKzFBeYMWCVXWsscrfMIlBYhswP zuZpKvenLAClEDMRHoEEySf1+RqmsVcsR9H+1YOOlCVl4eXnfQwxhBQr2g6Q1gH1BlByO4va GFnO1cuf/fQp3Iy2JIGBTDpQV0dQgaF81DwwB0VjGLYCUKvUyrEMTRla+qK+UkY9UNafyRap e/Hkjy0CmaxIMyhjDEvXUNFquD4SYAj/AP1npH1FsuIKJA2fD75j/L8fmEPsRbmX588iUCvS TOGJwqshXAX7RItnpA= IronPort-HdrOrdr: A9a23:gMi7q6phoLTentYt4RchuxAaV5rxeYIsimQD101hICG9Evbzqy lhppUmPHjP+U8ssBNJo7290cy7LU80mqQFgrX5UY3MYOCighrNEGgA1/qF/9SfIVydygc178 4JGJSWSueAamSS5vyb3ODXKbgdKFbrytHRuQ6n9QYJcehzUdAd0+5mMHfnLqSofng8OXLpfK DsnPZ6mw== X-IronPort-Anti-Spam-Filtered: true Received: from 60-242-28-244.static.tpgi.com.au (HELO bits.crawford.emu.id.au) ([60.242.28.244]) by ipmail06.adl3.internode.on.net with ESMTP; 28 Jan 2023 16:33:54 +1030 Received: from agc.crawford.emu.id.au (agc.crawford.emu.id.au [IPv6:fdd2:7aad:d478:1:0:0:cb10:cc07]) (authenticated bits=0) by bits.crawford.emu.id.au (8.17.1/8.17.1) with ESMTPSA id 30S63ChF2973396 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 28 Jan 2023 17:03:50 +1100 Authentication-Results: bits.crawford.emu.id.au; arc=none smtp.remote-ip=fdd2:7aad:d478:1::cb10:cc07 DKIM-Filter: OpenDKIM Filter v2.11.0 bits.crawford.emu.id.au 30S63ChF2973396 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crawford.emu.id.au; s=s1; t=1674885830; bh=MSNYIPrAfW4K6tz4R4oTou9pEQiEgFnaPs8051r27P8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MM0zgOVp06+ttY1sffwZ9G0/DrpyOyBcfvl7mtVZe92owD+mbsSIH6mQqr/k80OFS IJhmD8nObgiN/ry/6ogEMIjz0KCibXGmwaGQB/HSx7OVNIrm7qTtK4vzjSqlLgLVPw /hcTRKrme0HX6utgSbZxShQ7DoxnmviAqa7plxn+x+zM0yTaEUPJ6cmk8Xzy252z6W VX0i5T3aJPbX58kFsObDnd3ZxWw5njrES16AdlVo/HwM/YjSKRh83Ds4bQyEMX8E2L eqo1zv5VabMWGpy/f7chJuxmjg3SWJLS6sf8N6V3y/BBwLGJGLLd5gD0cOBF83AuUL I8U8pCEP3FBMg== From: Frank Crawford To: Jean Delvare , Guenter Roeck Cc: linux-hwmon@vger.kernel.org, Frank Crawford Subject: [PATCH v3 7/7] hwmon: (it87) Updated documentation for recent updates to it87 Date: Sat, 28 Jan 2023 17:03:08 +1100 Message-Id: <20230128060308.1549707-8-frank@crawford.emu.id.au> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230128060308.1549707-1-frank@crawford.emu.id.au> References: <20230128060308.1549707-1-frank@crawford.emu.id.au> MIME-Version: 1.0 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (bits.crawford.emu.id.au [IPv6:fdd2:7aad:d478:1:0:0:cb10:cc01]); Sat, 28 Jan 2023 17:03:50 +1100 (AEDT) X-Virus-Scanned: clamav-milter 0.103.7 at bits.crawford.emu.id.au X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Updated the driver documentation to list all current chips and describe the module parameters as per descriptions in the code. Signed-off-by: Frank Crawford --- v3: * No change. v2: * No change. --- Documentation/hwmon/it87.rst | 47 ++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/Documentation/hwmon/it87.rst b/Documentation/hwmon/it87.rst index 2d83f23bee93..5cef4f265000 100644 --- a/Documentation/hwmon/it87.rst +++ b/Documentation/hwmon/it87.rst @@ -145,6 +145,22 @@ Supported chips: Datasheet: Not publicly available + * IT8792E/IT8795E + + Prefix: 'it8792' + + Addresses scanned: from Super I/O config space (8 I/O ports) + + Datasheet: Not publicly available + + * IT87952E + + Prefix: 'it87952' + + Addresses scanned: from Super I/O config space (8 I/O ports) + + Datasheet: Not publicly available + * SiS950 [clone of IT8705F] Prefix: 'it87' @@ -162,7 +178,7 @@ Authors: Module Parameters ----------------- -* update_vbat: int +* update_vbat bool 0 if vbat should report power on value, 1 if vbat should be updated after each read. Default is 0. On some boards the battery voltage is provided by either the battery or the onboard power supply. Only the first reading @@ -171,11 +187,31 @@ Module Parameters the chip so can be read at any time. Excessive reading may decrease battery life but no information is given in the datasheet. -* fix_pwm_polarity int +* fix_pwm_polarity bool Force PWM polarity to active high (DANGEROUS). Some chips are misconfigured by BIOS - PWM values would be inverted. This option tries to fix this. Please contact your BIOS manufacturer and ask him for fix. +* force_id short, short + + Force multiple chip ID to specified value, separated by ','. + For example "force_id=0x8689,0x8633". A value of 0 is ignored + for that chip. + Note: A single force_id value (e.g. "force_id=0x8689") is used for + all chips, to only set the first chip use "force_id=0x8689,0". + Should only be used for testing. + +* ignore_resource_conflict bool + + Similar to acpi_enforce_resources=lax, but only affects this driver. + ACPI resource conflicts are ignored if this parameter is provided and + set to 1. + Provided since there are reports that system-wide acpi_enfore_resources=lax + can result in boot failures on some systems. + Note: This is inherently risky since it means that both ACPI and this driver + may access the chip at the same time. This can result in race conditions and, + worst case, result in unexpected system reboots. + Hardware Interfaces ------------------- @@ -193,8 +229,8 @@ Description This driver implements support for the IT8603E, IT8620E, IT8623E, IT8628E, IT8705F, IT8712F, IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8732F, -IT8758E, IT8771E, IT8772E, IT8781F, IT8782F, IT8783E/F, IT8786E, IT8790E, and -SiS950 chips. +IT8758E, IT8771E, IT8772E, IT8781F, IT8782F, IT8783E/F, IT8786E, IT8790E, +IT8792E/IT8795E, IT87952E and SiS950 chips. These chips are 'Super I/O chips', supporting floppy disks, infrared ports, joysticks and other miscellaneous stuff. For hardware monitoring, they @@ -238,7 +274,8 @@ of the fan is not supported (value 0 of pwmX_enable). The IT8620E and IT8628E are custom designs, hardware monitoring part is similar to IT8728F. It only supports 16-bit fan mode. Both chips support up to 6 fans. -The IT8790E supports up to 3 fans. 16-bit fan mode is always enabled. +The IT8790E, IT8792E/IT8795E and IT87952E support up to 3 fans. 16-bit fan +mode is always enabled. The IT8732F supports a closed-loop mode for fan control, but this is not currently implemented by the driver.