From patchwork Sun Sep 12 21:02:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Denis Pauk X-Patchwork-Id: 12487671 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 E7357C433EF for ; Sun, 12 Sep 2021 21:02:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C0A9D60F9F for ; Sun, 12 Sep 2021 21:02:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235668AbhILVEL (ORCPT ); Sun, 12 Sep 2021 17:04:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229930AbhILVEK (ORCPT ); Sun, 12 Sep 2021 17:04:10 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33FF9C061574; Sun, 12 Sep 2021 14:02:56 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id c22so9798422edn.12; Sun, 12 Sep 2021 14:02:56 -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=WUjkt5tqxJNwJpj1rH5M8VTbLi4zFaSrxlPVzEoZ9iQ=; b=IroTDtlg/R8fwCDZ9Y39i3Xm20k/XhtmkKrZkzuLJqMo23zWePF6gDGoNV0UHchD/h iM0JPHCzyhMPWnsI5rHzW4CpesX0svbkL/PLpU04IrzGUT5cZVbq/OoJuon/zTiU940d sDLc/QveRCL1ChqbNXSUqEkTcT/rYZC+4+hIDRnoc87+SQfmJECFaN8Nhtkf/iA3THqQ +NV++vqeA/hih0s3BYaD2w9/fRldXLq1zXIOkwTy1ISxTLnuXAx97G+HHdbOXKnUT3lF S3QltItUMREJafG9ymr5Y0Phkqy2Q6mZ4+GqTecUhfKi8U3ZkAnVEYT9hijewVBDpN6r AP5Q== 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=WUjkt5tqxJNwJpj1rH5M8VTbLi4zFaSrxlPVzEoZ9iQ=; b=tbvY8brLCtBKz/qgo8gfN4YWGnJZARwQ+H8X55LUusIerFRwHKGdxLpYuvJxDxUP7y ZBSqb2uB5lFCuqfjWQl60chwtp3usOMxZSkXYf+lIqoZPNfvtX1CNZm8nGG0Yvj2xzNG Qm8BV3de4Z/jkx5qOZQMqMV66xMKHC+JwrpMW2Jp2+vVu1ZTVXOWXC9KO2LymtrjCZhg rvfXZWO4d+o0Oy6t0psWAjDpUGtejULBMmHE7QdEgE1kOwgqh+e3Sl4lrIkfrCzCsxuj UmnmogRfJGSzXkQTZiCQvnaxPbIM6fY4q1XK4B9aBYXyYCa3AtYDne2xB5g84Nevcci/ t1aA== X-Gm-Message-State: AOAM533UAa2gIgjUWkaWa3WF1chAyHdExiFrygDPS49iMQgChPsB0kqI sTiXPgI9yeFZlOxcStMtgv8= X-Google-Smtp-Source: ABdhPJxVARRCBe4mlbGw/hbIOW1bu8ui0r3otvsqZCimM8WOoIoJf90vTbkhOw+MJXjpKIY/UOL1IQ== X-Received: by 2002:a05:6402:440f:: with SMTP id y15mr9817558eda.205.1631480574702; Sun, 12 Sep 2021 14:02:54 -0700 (PDT) Received: from localhost.localdomain (146-25-94-178.pool.ukrtel.net. [178.94.25.146]) by smtp.gmail.com with ESMTPSA id z97sm2821140ede.72.2021.09.12.14.02.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Sep 2021 14:02:54 -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 v4 0/2] hwmon: (nct6775) Support access via Asus WMI Date: Mon, 13 Sep 2021 00:02:41 +0300 Message-Id: <20210912210244.184521-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 added check for ACPI WMI config enabled for prevent issues with non x86 platforms. @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 v4: - Fix naming conflict with inb, outb by add sio prefix to callbacks in nct6775_sio_data. - Fix build without ACPI WMI. 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 | 701 ++++++++++++++++++++++++++-------------- 1 file changed, 464 insertions(+), 237 deletions(-)