Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2360846ioo; Sat, 28 May 2022 11:15:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjm/Gv6c0+O0VXZovwZM4SycwEdqi+XZfBEqxVBM+D+dUK0Fq+gVafa1kcjGyFWtYRFWOJ X-Received: by 2002:a65:4988:0:b0:3fb:c871:f888 with SMTP id r8-20020a654988000000b003fbc871f888mr4903429pgs.196.1653761707840; Sat, 28 May 2022 11:15:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653761707; cv=none; d=google.com; s=arc-20160816; b=NPVdP42+8mU9YLnMPpoXBVNMB3AlyenhWYFa3uGzsxQmOSnACMFRt253ozDCDKTB7z n01stOrNETPcvRFsXSfH5ctUbrORTQ51fvlz+qIBGo37Np6TepfsxIhrQUQ+wxBhPK2V 2GS4PwJDIipapoSm4I5BEPZggkeStk0RqGFLVdLbZtnh7CaBZR/h3M8CsHy7P83pJ/2v tlwsIbdxx9hZCzwJcfdfom9Dk0e9NgDxFYS5mNas1/kVwWl+bS+n7i0npHUasNB4XqNZ UF2OR+8kuDmP6sJFnkMP/uVmfykFmAFWs+LwH5Pr8n5py2mFm8uY0vPQsDYtxYdRgfZ4 FJ/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=4zlyYG5DLtUMGECwCuQjiUZwjXRI66JAXV7vKwRun7o=; b=DyOX5+4MjGAA1ckTi9fzI9QI2juxuJIA7+lS6YFWtdFeZ+7CGrScokj0f1UmSFXB1W pNZzkLfHjjXMdo7gXDM56Oe1+2sxoHmw2CuZMV82/GVc8jbL/ji6LtoHDYBT7+SWnJkW Lhb7jQx3SJYs6X/Javw4yxhngAYPxVdKIcBxt9wdGkrXGvX64TMudx6H1xarr0D4Pk+r vubQ+k2xFFBDpFh3ehhYrDoBJbLn6I7MFrZQgztwGe96s4/IlnvdhH1n0KMnfIWo3DP+ LZF72iampcYo7V70rRmvTtc7lcAq+lkOjGdxgYr/VKPyCgXVI1bkgtEFvtJ4NFd4AShN EN8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=vuaUNiO4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id e1-20020a656881000000b003db74ac9a75si9680868pgt.464.2022.05.28.11.15.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 11:15:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=vuaUNiO4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0756813F03; Sat, 28 May 2022 11:15:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238086AbiEZL6Q (ORCPT + 99 others); Thu, 26 May 2022 07:58:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235385AbiEZL6M (ORCPT ); Thu, 26 May 2022 07:58:12 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 379F7D0293; Thu, 26 May 2022 04:58:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1653566291; x=1685102291; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=4zlyYG5DLtUMGECwCuQjiUZwjXRI66JAXV7vKwRun7o=; b=vuaUNiO4ZZ2qxFpSh32QLiOefzN41Mma7/05MZjNSt0VEp0e+iYrXoh8 rGdiB/AERxkk0D532p5RzHth4TaKWh+A4t88xC95X45bMaJi/GUm9M6c4 sQl/A9qGjzULp5XtS6I2svJpm8rNsV3mOz7wVn+EAjloe1Hdy39+ZdRqn 0=; Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-01.qualcomm.com with ESMTP; 26 May 2022 04:58:10 -0700 X-QCInternal: smtphost Received: from unknown (HELO nasanex01a.na.qualcomm.com) ([10.52.223.231]) by ironmsg01-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2022 04:58:10 -0700 Received: from [10.216.50.195] (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 26 May 2022 04:58:05 -0700 Subject: Re: [PATCH V1] mmc: sdhci-msm: Add wakeup functionality support for sdio cards To: "Kamasali Satyanarayan (Consultant) (QUIC)" , 'Ulf Hansson' CC: "u.kleine-koenig@pengutronix.de" , "YehezkelShB@gmail.com" , "rmk+kernel@armlinux.org.uk" , "t.scherer@eckelmann.de" , "s.shtylyov@omp.ru" , "sensor1010@163.com" , "sartgarg@codeaurora.org" , "hns@goldelico.com" , "uic_kamasali@quicinc.com" , "tiantao6@hisilicon.com" , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "'quic_spathi@quicinc.com'" References: <1650964225-6705-1-git-send-email-quic_spathi@quicinc.com> From: Sarthak Garg Message-ID: <1ba7780a-f560-1e10-226a-fcda785f7e89@quicinc.com> Date: Thu, 26 May 2022 17:28:01 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hi ulf, Thanks for the review. Please find comments inline. Thanks, Sarthak On 5/24/2022 5:26 PM, Kamasali Satyanarayan (Consultant) (QUIC) wrote: > Hi, > These patches will be further taken by Sarthak. > > Thanks, > Satya > > -----Original Message----- > From: Ulf Hansson > Sent: Wednesday, April 27, 2022 4:06 AM > To: quic_spathi > Cc: u.kleine-koenig@pengutronix.de; YehezkelShB@gmail.com; rmk+kernel@armlinux.org.uk; t.scherer@eckelmann.de; s.shtylyov@omp.ru; sensor1010@163.com; sartgarg@codeaurora.org; hns@goldelico.com; uic_kamasali@quicinc.com; tiantao6@hisilicon.com; linux-mmc@vger.kernel.org; linux-kernel@vger.kernel.org; Kamasali Satyanarayan (Consultant) (QUIC) > Subject: Re: [PATCH V1] mmc: sdhci-msm: Add wakeup functionality support for sdio cards > > On Tue, 26 Apr 2022 at 11:10, Srinivasarao Pathipati wrote: >> From: Sarthak Garg >> >> This adds external GPIO wakeup support to sdhci-msm driver for sdio >> cards. > There is not a single line changed in the sdhci-msm driver, so I am not sure what this is intended to fix. > > I assume this is a downstream patch you want to upstream, which is a good thing that we all appreciate. However, before just posting a patch from downstream code, please have a look at the commit message and let it explain what and why you want to change things. > > I am deferring to review this, until you post a version with a proper commit message. Sorry. > > Kind regards > Uffe This is our internal feature where our SDIO card makes use of external tlmm pin to wakeup the host from system suspend. It has approx 200 lines of code changes in the sdhci-msm.c file which will create further confusions. For that feature we just need to initialize sdio card as a wakeup source and enable wakeup capability for that. Will post V2 patch for that .. please help review. > >> Also enables clk gating only in system Suspend/Resume for SDIO card. >> >> Also add the below fixes from 4.9 kernel : >> >> c363224b: Fix wakeup functionality for SDIO >> 61fc5bf6: Remove flag MMC_PM_WAKE_SDIO_IRQ in mmc_resume_host >> a7a2a82e: Set sdio_pending_processing default state to false. >> >> Signed-off-by: Sarthak Garg >> Signed-off-by: kamasali >> Signed-off-by: Srinivasarao Pathipati >> --- >> drivers/mmc/core/bus.c | 7 +++++++ >> drivers/mmc/core/sdio.c | 1 + >> 2 files changed, 8 insertions(+) >> >> diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index >> 58a60af..a475fe1 100644 >> --- a/drivers/mmc/core/bus.c >> +++ b/drivers/mmc/core/bus.c >> @@ -364,6 +364,13 @@ int mmc_add_card(struct mmc_card *card) #endif >> card->dev.of_node = mmc_of_find_child_device(card->host, 0); >> >> + if (mmc_card_sdio(card)) { >> + ret = device_init_wakeup(&card->dev, true); >> + if (ret) >> + pr_err("%s: %s: failed to init wakeup: %d\n", >> + mmc_hostname(card->host), __func__, ret); >> + } >> + >> device_enable_async_suspend(&card->dev); >> >> ret = device_add(&card->dev); >> diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index >> 25799ac..9502318 100644 >> --- a/drivers/mmc/core/sdio.c >> +++ b/drivers/mmc/core/sdio.c >> @@ -1096,6 +1096,7 @@ static int mmc_sdio_resume(struct mmc_host *host) >> mmc_release_host(host); >> >> host->pm_flags &= ~MMC_PM_KEEP_POWER; >> + host->pm_flags &= ~MMC_PM_WAKE_SDIO_IRQ; >> return err; >> } >> >> -- >> 2.7.4 >>