From patchwork Sun Sep 12 11:05:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Denis Pauk X-Patchwork-Id: 12486793 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86873C433EF for ; Sun, 12 Sep 2021 11:06:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5B01760F43 for ; Sun, 12 Sep 2021 11:06:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229635AbhILLHa (ORCPT ); Sun, 12 Sep 2021 07:07:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229597AbhILLH3 (ORCPT ); Sun, 12 Sep 2021 07:07:29 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3F61C061574; Sun, 12 Sep 2021 04:06:15 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id ho42so14239337ejc.9; Sun, 12 Sep 2021 04:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+UfvEOtjioQWVktblVI2sPPJ7S0UBV4zPEFt3Z3OQXY=; b=frhV4LAWf9blX1seYqBEofLsAVHvcOQT7iErgMHfbETtDR/T/N39c/zbTpTtURygmU AgTqoCbuwc8ISTOxYYWeXDmyalW3ncRI+dk5WfOo3xh4pfGKccDlzTQTnxbu1q68KoiR 7qwQqvuG3y9+2HlCGmnVdIOpnusV6193+gLJqJqRls7bndQPOngKgJqjoi2NYkCA/q6f ucFllwf4HKSz8PyZ5Lg4lGrP80a3cRRq5VYMW4YrcZ1csgxfKXqCJ/b6KB1a/ky3W1Nl /ZOrC8Us94IBXRJtgN784uU0XSJUzzpaYbsdvUQXnEBR/qxeWyLUGZ4/O5NGHyS8fqXt i2Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+UfvEOtjioQWVktblVI2sPPJ7S0UBV4zPEFt3Z3OQXY=; b=moKE/P6B6PfLBYiR45oQGqpLqCAXgBnlVn6bDwKctop2hqwjDKMa6CXtF9d0ApgjaR QuV4cwelNa3cu3/WnAwr4mJVnOordeX97o+nZL+RDjxF/6CnKnjYVKumaBdA/+Hk+bMv I1V5xPScCnAUgCliS+vuWkoeH4+YQ8pazNb0i1RuCdAhNNwez3OJvcPL3Xq6/uXxw5EF 57Sb2qewxWLVDUjwHabCV/6Qegw14xDy1hEGKxvJ3E/cIlnT0J7BPBAhBqcUpy8vMV4i nnPU8ChcJPkz/pcJQfZkZIIhi+kjq7mq3Dh0QdXjo1h70Qf7rCKP3WjgAawk7WStvay6 4oXQ== X-Gm-Message-State: AOAM530WcNjRPOS642ND8W/+wkvnAqcsrApFf8Hmj0sNHxmht/pKO4Lm XK7Ze26Jqhf5Nydt9Mg1EOY= X-Google-Smtp-Source: ABdhPJwA70G4zPgJLn91RREzrTaIS11B6bqrc+7+AsrjTWlGVR/0BbmUEtQq/6WGwdtzr/4Wuv6VNA== X-Received: by 2002:a17:907:7f29:: with SMTP id qf41mr7208272ejc.211.1631444773806; Sun, 12 Sep 2021 04:06:13 -0700 (PDT) Received: from localhost.localdomain (151-22-179-94.pool.ukrtel.net. [94.179.22.151]) by smtp.gmail.com with ESMTPSA id qx18sm1896216ejb.75.2021.09.12.04.06.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Sep 2021 04:06:13 -0700 (PDT) From: Denis Pauk Cc: pauk.denis@gmail.com, Bernhard Seibold , =?utf-8?q?P=C3=A4r_Ekholm?= , to.eivind@gmail.com, "Artem S . Tashkinov" , Vittorio Roberto Alfieri , Sahan Fernando , Andy Shevchenko , Guenter Roeck , Jean Delvare , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/2] hwmon: (nct6775) Support access via Asus WMI Date: Sun, 12 Sep 2021 14:05:55 +0300 Message-Id: <20210912110557.41346-1-pauk.denis@gmail.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Support accessing the NCT677x via Asus WMI functions. On mainboards that support this way of accessing the chip, the driver will usually not work without this option since in these mainboards, ACPI will mark the I/O port as used. @Andy Shevchenko, I have left type of sioreg, in other places sioreg has same integer type, should I change all occurrences of usage? @Guenter Roeck, I have left nct6775_*_set_back() call without changes as its always called from platform specific callbacks. Could you please review? BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807 Signed-off-by: Denis Pauk Co-developed-by: Bernhard Seibold Signed-off-by: Bernhard Seibold Tested-by: Pär Ekholm Tested-by: Tested-by: Artem S. Tashkinov Tested-by: Vittorio Roberto Alfieri Tested-by: Sahan Fernando Cc: Andy Shevchenko Cc: Guenter Roeck --- Changes in v3: - Remove unrequired type conversions. - Make function declarations one line. - Use nct6775 function pointers in struct nct6775_data instead direct calls. Changes in v2: - Split changes to separate patches. - Limit WMI usage by DMI_BOARD_NAME in checked ASUS motherboards. - Rearrange code for directly use struct nct6775_sio_data in superio_*() functions. Denis Pauk (2): hwmon: (nct6775) Use sio_data in superio_*(). hwmon: (nct6775) Support access via Asus WMI drivers/hwmon/nct6775.c | 687 ++++++++++++++++++++++++++-------------- 1 file changed, 450 insertions(+), 237 deletions(-)