From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA96FC5ACAE for ; Thu, 12 Sep 2019 06:35:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B07072075C for ; Thu, 12 Sep 2019 06:35:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729032AbfILGfr (ORCPT ); Thu, 12 Sep 2019 02:35:47 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:15406 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726308AbfILGfq (ORCPT ); Thu, 12 Sep 2019 02:35:46 -0400 X-UUID: 3e9c1fec85f9400a9f01296c3f81de2e-20190912 X-UUID: 3e9c1fec85f9400a9f01296c3f81de2e-20190912 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1135890693; Thu, 12 Sep 2019 14:35:38 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 12 Sep 2019 14:35:36 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 12 Sep 2019 14:35:36 +0800 From: Stanley Chu To: , , , , , , , CC: , , , , , , , , , , , , Stanley Chu Subject: [PATCH v2 3/3] scsi: ufs-mediatek: enable auto suspend capability Date: Thu, 12 Sep 2019 14:35:35 +0800 Message-ID: <1568270135-32442-4-git-send-email-stanley.chu@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1568270135-32442-1-git-send-email-stanley.chu@mediatek.com> References: <1568270135-32442-1-git-send-email-stanley.chu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: ECD3D2D517B299492EDF7621C138A81D3083F7FB46B128CF72C3B6B7A539BF5F2000:8 X-MTK: N Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Enable auto suspend capability in MediaTek UFS driver. Signed-off-by: Stanley Chu Reviewed-by: Avri Altman --- drivers/scsi/ufs/ufs-mediatek.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/ufs/ufs-mediatek.c b/drivers/scsi/ufs/ufs-mediatek.c index 0f6ff33ce52e..b7b177c6194c 100644 --- a/drivers/scsi/ufs/ufs-mediatek.c +++ b/drivers/scsi/ufs/ufs-mediatek.c @@ -117,6 +117,11 @@ static int ufs_mtk_setup_clocks(struct ufs_hba *hba, bool on, return ret; } +static void ufs_mtk_set_caps(struct ufs_hba *hba) +{ + hba->caps |= UFSHCD_CAP_RPM_AUTOSUSPEND; +} + /** * ufs_mtk_init - find other essential mmio bases * @hba: host controller instance @@ -147,6 +152,8 @@ static int ufs_mtk_init(struct ufs_hba *hba) if (err) goto out_variant_clear; + ufs_mtk_set_caps(hba); + /* * ufshcd_vops_init() is invoked after * ufshcd_setup_clock(true) in ufshcd_hba_init() thus -- 2.18.0