From patchwork Thu May 31 09:40:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 137342 Delivered-To: patches@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp6373653lji; Thu, 31 May 2018 02:40:51 -0700 (PDT) X-Received: by 2002:a2e:21c6:: with SMTP id h67-v6mr4568782lji.132.1527759651600; Thu, 31 May 2018 02:40:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527759651; cv=none; d=google.com; s=arc-20160816; b=OyvPIYjT9AV19EFCz1gOTL4eRJRj+54u6dgyl/GBbLZBQS3LDuRu4mgX1HK4UEcqvD JX86grn6boToiYRotnpsh8V44i9flRN0ymTfgFVhWxBSD+pAvuDfAGOX9qhXIwauLW9J RIdX+3aK6rsiohsUu2RF3mxAZ6XZqTVFyzughyyHh75WudxqqNnVMKt0l+RUNhxB/Xla J7GUm7bxGZqOkPytVQCoxNueOWr3rvKkMdJwyT6k9kpzIqcd2AdPITKbTZ3ltwWJOr0/ k0PftpZM1uxnsT/s+kzxQ5esg9InWaIArUuBFmbBvPONFaNpp88+3Pw4kKUXDRC/wnIP aanQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=/4znmvu9G3cdI5xLInJ3LGul5NzRdlpt7u+dQOZD2wE=; b=nMhjNoTvzkm0J9bW9h4oXztHLX2w2mxJzBobexUnRlOLbgIZkMgwuQ9iaJjVMU/xF4 RBdvJF5uAsjWpu0u/ma4atqsh9tzKZI9d1XLWGX2J0Z1r+6VRYT+E1NLYIlGP2wPIamK CKijC+Z2J9q4xVvXQaEXjOpHHNYBuDqeqExum6F0S5PtW2Yx/hoehTXDi1gZ1hNJgvmh pTPlONAn9ZgHKT65/YzWHQSLqZluP+UsUsITsosKVAiDz8ePRc10OBmQDaauxI3IzL9E 7LoiIShAjEpL2EAJDHMTsEIMN55CKzeWLG5LC3WkSOrA7XvOo12aLVMMOKbNvxpWcyqq XZGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JGU/72VP; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id t3-v6sor2204691lff.53.2018.05.31.02.40.51 for (Google Transport Security); Thu, 31 May 2018 02:40:51 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JGU/72VP; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=/4znmvu9G3cdI5xLInJ3LGul5NzRdlpt7u+dQOZD2wE=; b=JGU/72VPAuksRxeJmUaRFIAwbtLfexdMTkDRl6OFFgFgVebiiqeCUzfmbLJ4ikVFMk ML92F3yvpfNRx2Ywd8ZraD3z6W+LsYrn7kgRXvTNa9/XI8yyL8bIvaL9nFj/u8QEwmYe h6+ZAbWDhfzyjiSx04jOaAyKdtvm4OFrxcy4Y= 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=/4znmvu9G3cdI5xLInJ3LGul5NzRdlpt7u+dQOZD2wE=; b=V1Q/hq21ry14amNMZ1Ic1c/d2knQdIyu5gzbFu15n2wQp5ZIZPa+QrCrNFF2CSwHk6 E0xcwCw8BcmJ4E32OYOLUsm05uXyVo0e45+XcC0E2gB5/S+krZRtI0ytT1mtPoTVvX0D mpymccf1Mic/lfdT3ubRzCKZMSg0XlOsUp4bAX53B3i8nL4qJ2tXthdzPmp52WP0qFlY 9++/AAc/1j6hjLEoeJETj/hXZEShy+XXpgMetRp/krnm1RgiitHk29vFr085kbcGFe0L 0CJ1ay02s8qp9PvzlQVgsq/M9i9alBhtiHrb34uMngD8MIpFgSHQSbMf+mnC1zxno5vw 4uJQ== X-Gm-Message-State: ALKqPwdt/LkaBstFucUCoeGuaiq2ge048b8HOhUxFqmYmR28DvmcysLq JNZyhlhcQu8mcBX347NGHoxWiw/5 X-Google-Smtp-Source: ADUXVKK0V7RBrdrjjmX2HLng55JOIEwwdVoHMbS9SkhY5CuL5yrCByakbkwT4vktfFyIbHVNlBBMsA== X-Received: by 2002:a19:5d54:: with SMTP id p20-v6mr3976755lfj.21.1527759651325; Thu, 31 May 2018 02:40:51 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id y12-v6sm7496302lji.34.2018.05.31.02.40.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 May 2018 02:40:50 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Kai-Heng Feng Cc: michal.pecio@gmail.com, Ritesh Raj Sarraf , Bauer Chen , Alan Stern Subject: [PATCH 0/4] mmc: rtsx_usb_sdmmc: Don't waste energy polling for cards Date: Thu, 31 May 2018 11:40:37 +0200 Message-Id: <20180531094041.27902-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.0 This series re-works the polling mechanism for the rtsx_usb_mmc driver, which currently relies on pure polling via MMC_CAP_NEEDS_POLL. The problem is simply that is wastes a lot of energy, while in fact the card detection logic don't need to use polling. Do note, this series doesn't work out of the box, as one addtional patch is needed on the rtsx USB misc driver (runtime resuming the child at card detect). I leave that for Kai Heng Feng to implement and moreover I rely on tests to be done, as this series has only been compile tested. Kind regards Uffe Ulf Hansson (4): mmc: core: Introduce MMC_CAP_SYNC_RUNTIME_PM mmc: rtsx_usb_sdmmc: Don't runtime resume the device while changing led mmc: rtsx_usb_sdmmc: Re-work runtime PM support mmc: rtsx_usb_sdmmc: Re-work card detection/removal support drivers/mmc/core/core.c | 5 +++- drivers/mmc/host/rtsx_usb_sdmmc.c | 43 +++++++++++++++++++++++++------ include/linux/mmc/host.h | 2 +- 3 files changed, 40 insertions(+), 10 deletions(-) -- 2.17.0