From patchwork Wed Oct 24 19:33:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 10654909 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9A18314BB for ; Wed, 24 Oct 2018 19:34:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 887B62839C for ; Wed, 24 Oct 2018 19:34:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7CDA92B0B9; Wed, 24 Oct 2018 19:34:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3630E2839C for ; Wed, 24 Oct 2018 19:34:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725877AbeJYEDh (ORCPT ); Thu, 25 Oct 2018 00:03:37 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:39253 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725778AbeJYEDh (ORCPT ); Thu, 25 Oct 2018 00:03:37 -0400 Received: by mail-pf1-f196.google.com with SMTP id c25-v6so2927265pfe.6; Wed, 24 Oct 2018 12:34:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=TyAItt7B89hqOiKcSGQWElDSW87SzMYqvzXcYlna0tk=; b=tPbPqCDOHk0VEZh+B4xohBcmribIHioUNZbff4mWhMHFNplj12GXAK8IjJE3PoVVbN DUAFAcHo+TzlteT2iZn0OqelOlBT1PFHXWdIWaxlS23xFD7CJjMrbTr3Z52/36LrYoK+ 1ww6vOAfpM9eXc2Y7DHavJTYje4sZOK4OGVpr2mAxqe5uwhUpEpTqidE1Gdz71T9WEkT x5twxBrWxwJ2VrEcChjCfxHBe2oQe1RbCA/fxUabq71m9qXo3IQDGoZpxO60Ia2MWP4Q YwRLvHHeDeGmPbiXOz0lhixC7rC9UCwakh0ZamyPwhogJRNLQ9OUaCf6kmGUJcmq5iQF kD8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TyAItt7B89hqOiKcSGQWElDSW87SzMYqvzXcYlna0tk=; b=E27R57J0nVR+klQ9zvmR0QLc18W5miLzfjYPp5UoFe1WAuRV3YR40h4N4a+9OPXREV vvQrKU35TTHLle647jDPiK7nFBbfrP02TNQa3RxFIRt5iWnx5tntY96sX6N2PUWccJ3Z OOguhF6Ax/gZooY72YmxmqP4KGMe7CdhKxGeaKdkG7eLHO4Bu1bliM+Ma1xP2GG/U56P TstwE6ccVjccSllNgBASolAwTimkZNuDXwiR6dRv/DYEpcgI35CN+trc3rl5BPzlAynO 1mu0NSe5c0dasN3di0t/JlI7I7ictwY1pFwJ7h0JX97hWwHzcIN+yUFI2qJTgzP2LV7H U27g== X-Gm-Message-State: AGRZ1gIQ+65qiRT2TDGrbWvamhkRurbrTTSA/q9NqPqYi/QGaeGXIg+R s4Kj79t5beRrUD7/kEeEYnvzp9cY X-Google-Smtp-Source: AJdET5cYTZnvZWwl5lXnRLjs56uZijWsjOThd5N5spLEBl1bbELbZHN8ZPL7UT93t4/2IeLTzX8Qew== X-Received: by 2002:a63:af18:: with SMTP id w24mr3732644pge.385.1540409655485; Wed, 24 Oct 2018 12:34:15 -0700 (PDT) Received: from Asurada-Nvidia.nvidia.com (thunderhill.nvidia.com. [216.228.112.22]) by smtp.gmail.com with ESMTPSA id r81-v6sm19921633pfa.110.2018.10.24.12.34.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Oct 2018 12:34:14 -0700 (PDT) From: Nicolin Chen To: jdelvare@suse.com, linux@roeck-us.net Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/5] hwmon: (ina3221) Implement PM runtime to save power Date: Wed, 24 Oct 2018 12:33:57 -0700 Message-Id: <20181024193402.16698-1-nicoleotsuka@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This series patches implement PM runtime feature in the ina3221 hwmon driver (PATCH-5). However, PATCH-[1:4] are required to make sure that the PM runtime feature would be functional and safe. Changelog v2->v3: * Dropped timeout dev_err messages as it's indicated in errno (PATCH-4) * Improved a dev_err message and comments (PATCH-5) v1->v2: * Added device pointer check (PATCH-1) * Returned 0 for alert flags (PATCH-2) * Moved CVRF polling to data read routine (PATCH-4) * Bypassed i2c_client->dev in suspend/resume() (PATCH-5) Nicolin Chen (5): hwmon: (core) Inherit power properties to hdev hwmon: (ina3221) Check channel status for alarms attribute read hwmon: (ina3221) Serialize sysfs ABI accesses hwmon: (ina3221) Make sure data is ready before reading hwmon: (ina3221) Add PM runtime support drivers/hwmon/hwmon.c | 7 +- drivers/hwmon/ina3221.c | 210 ++++++++++++++++++++++++++++++++++------ 2 files changed, 189 insertions(+), 28 deletions(-)