From patchwork Wed Jan 18 04:57:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hermes Zhang X-Patchwork-Id: 44969 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2148749wrn; Tue, 17 Jan 2023 21:06:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXtX0C07YIXvBn4NR5D55s4IULRaGzRwmBEBwEPLIuREAkwdueSBiYc+uIa2K5+hq3uW4jhm X-Received: by 2002:a17:903:2306:b0:194:6e8d:89ac with SMTP id d6-20020a170903230600b001946e8d89acmr8731749plh.24.1674018374317; Tue, 17 Jan 2023 21:06:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674018374; cv=none; d=google.com; s=arc-20160816; b=OccVzSNDFs8MIag4VNDIZS465JvPo9JtmYuEXPiKsVREu4ne2FAWbPEMZeOvBeahF3 pVm8LxmMNH7aXbKEp2FNYL32PWOyDRZ0hCo/oFEfBtdhpg+ubnweKLEHbFXnU/kSVPF7 2Ci4fQlPhAFV24xLGejYYS356llYh81J6+Dq8QXCVu8uTQlazELeInUt18rdQf3S1j6G mj43jy/ZtBrnLTU3H3hbNbq8ysU5I0rKPky1WKmz8YtJHoDEwzhS7Y2wO+o3tksMfq6H HFhtTdRc/cXaLAfMZ6lsWzriNT7BQF67JqWr35QQyjqja9MaHXfXg30oAQIyvjnoUh9u XfOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=LXVxts8stmRwC9zeoYq1CfmgBzo9W/O8CtI9UiNH5k8=; b=Dv1NsuyaCf2rmw0LUxAmYr9uswlIslVj/0t9L4XM/NnCco5cowvpBiv8PPQrG9qdO5 Q4QXDPce1sdM3wOGI+WHR4Wynkn5DUDxjKe3mjiQoGzvj2i2isYFp6Yw9JjJGf8btRVr nLGDhORLysdsOhM3fN4kD0BwesDul5T1G6su199wteLiIQtb1UPHT+Ypzuvmj4TEwiwj a9URU9e70bxxWuZGYAjw2NVvhVzc2lxwZrczcHBUPq4EGPcyqvGeFWHrN88UbbnKsxpp 6Ap455/C65QApJ9vjQqDfcTI1Avjb2XGYQ5N9WYFvyXeyltujEquOFORsDzO0y69iXrm s7wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=Fl4EQRB8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q14-20020a170902f78e00b00189a6834dbesi33297611pln.103.2023.01.17.21.06.02; Tue, 17 Jan 2023 21:06:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=Fl4EQRB8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229468AbjARE6F (ORCPT + 99 others); Tue, 17 Jan 2023 23:58:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229503AbjARE6B (ORCPT ); Tue, 17 Jan 2023 23:58:01 -0500 Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C53483D927; Tue, 17 Jan 2023 20:57:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1674017880; x=1705553880; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=LXVxts8stmRwC9zeoYq1CfmgBzo9W/O8CtI9UiNH5k8=; b=Fl4EQRB8mP0wHO5m8ft/aIOMBWc3ohvT5xBriDc70YOaG3rOIxQwozeR O77w6QGNnPMu7XBYVJ2qAeWz6/1S9hdy5mct3JOQYdiYalR5ZNAmbJTa5 WWFcQdWOOfw8Nox/3dFMzv5vVUq4s3BEUwFqgfywxJ/2HbhAP/nigsWJM dlErAppn7beCDlM1cJshd/uONplQe4Gj+k4/t7RDz5A84FZe7Rlj3B+Ie AnWfy1mqknyM1grT/6W0l74HCyL4iDb3CmfFPZtC+Gi80SRZYiNCRIRG9 LrhIoAA5UXv4MbDQt0Guu6qs//VbpEZ89swyzvhEveX3dPVpvbJ9Q8qHW A==; From: Hermes Zhang To: Ulf Hansson CC: , Hermes Zhang , , Subject: [PATCH] mmc: core: expose MMC_CAP_AGGRESSIVE_PM to DT Date: Wed, 18 Jan 2023 12:57:49 +0800 Message-ID: <20230118045749.3913296-1-chenhuiz@axis.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755335490921519114?= X-GMAIL-MSGID: =?utf-8?q?1755335490921519114?= This patch expose the MMC_CAP_AGGRESSIVE_PM flag to DT which allows the host to enable it from DT. Signed-off-by: Hermes Zhang --- drivers/mmc/core/host.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index d17eda753b7e..1d98a301515d 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -376,6 +376,8 @@ int mmc_of_parse(struct mmc_host *host) host->caps |= MMC_CAP_HW_RESET; if (device_property_read_bool(dev, "cap-sdio-irq")) host->caps |= MMC_CAP_SDIO_IRQ; + if (device_property_read_bool(dev, "cap-aggressive-pm")) + host->caps |= MMC_CAP_AGGRESSIVE_PM; if (device_property_read_bool(dev, "full-pwr-cycle")) host->caps2 |= MMC_CAP2_FULL_PWR_CYCLE; if (device_property_read_bool(dev, "full-pwr-cycle-in-suspend"))