From patchwork Tue Jul 31 06:17:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 10550119 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 3DB0C139A for ; Tue, 31 Jul 2018 06:18:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B6EA299BF for ; Tue, 31 Jul 2018 06:18:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 200CD29A28; Tue, 31 Jul 2018 06:18:09 +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=-7.9 required=2.0 tests=BAYES_00,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 C7B90299BF for ; Tue, 31 Jul 2018 06:18:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729625AbeGaH4J (ORCPT ); Tue, 31 Jul 2018 03:56:09 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:40383 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729284AbeGaH4J (ORCPT ); Tue, 31 Jul 2018 03:56:09 -0400 Received: from 1-161-146-33.dynamic-ip.hinet.net ([1.161.146.33] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fkNyJ-0004WL-9t; Tue, 31 Jul 2018 06:17:27 +0000 From: Kai-Heng Feng To: arnd@arndb.de, gregkh@linuxfoundation.org Cc: ulf.hansson@linaro.org, stern@rowland.harvard.edu, bauer.chen@realtek.com, ricky_wu@realtek.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Kai-Heng Feng Subject: [PATCH 0/5 v4] Keep rtsx_usb suspended when there's no card Date: Tue, 31 Jul 2018 14:17:16 +0800 Message-Id: <20180731061721.15831-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.17.1 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, This is based on Ulf's work [1] [2]. This patch series can keep rtsx_usb suspended, to save ~0.5W on Intel platforms and ~1.5W on AMD platforms. [1] https://patchwork.kernel.org/patch/10440583/ [2] https://patchwork.kernel.org/patch/10445725/ Kai-Heng Feng (5): misc: rtsx_usb: Use USB remote wakeup signaling for card insertion detection memstick: Prevent memstick host from getting runtime suspended during card detection memstick: rtsx_usb_ms: Use ms_dev() helper memstick: rtsx_usb_ms: Support runtime power management misc: rtsx_usb: / memstick: rtsx_usb_ms: Avoid long delay before system suspend v4: Use pm_runtime_put() in memstick_check(). v3: Skip parent device check in rtsx_usb_resume_child(). Remove dev_dbg() if it only prints function name. Use ms_dev() helper at more places. Remove const qualifier for UNIVERSAL_DEV_PM_OPS. v2: Resend to linux-usb and LKML. --- Kai-Heng Feng (5): misc: rtsx_usb: Use USB remote wakeup signaling for card insertion detection memstick: Prevent memstick host from getting runtime suspended during card detection memstick: rtsx_usb_ms: Use ms_dev() helper memstick: rtsx_usb_ms: Support runtime power management misc: rtsx_usb: / memstick: rtsx_usb_ms: Avoid long delay before system suspend drivers/memstick/core/memstick.c | 4 + drivers/memstick/host/rtsx_usb_ms.c | 148 +++++++++++++++------------- drivers/misc/cardreader/rtsx_usb.c | 9 ++ 3 files changed, 91 insertions(+), 70 deletions(-)