Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stanley Chu <stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
To: linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org,
	avri.altman-Sjgp3cTcYWE@public.gmane.org,
	alim.akhtar-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
	pedrom.sousa-HKixBCOQz3hWk0Htik3J/w@public.gmane.org,
	sthumma-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	jejb-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org,
	bvanassche-HInyCGIudOg@public.gmane.org
Cc: marc.w.gonzalez-GANU6spQydw@public.gmane.org,
	andy.teng-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
	chun-hung.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
	kuohong.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
	evgreen-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	subhashj-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	peter.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
	vivek.gautam-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	Stanley Chu <stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	beanhuo-AL4WhLSQfzjQT0dZR+AlfA@public.gmane.org
Subject: [PATCH v1 3/3] scsi: ufs-mediatek: enable auto suspend capability
Date: Wed, 11 Sep 2019 17:41:30 +0800	[thread overview]
Message-ID: <1568194890-24439-4-git-send-email-stanley.chu@mediatek.com> (raw)
In-Reply-To: <1568194890-24439-1-git-send-email-stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>

Enable auto suspend capability in MediaTek UFS driver.

Signed-off-by: Stanley Chu <stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
---
 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

  parent reply	other threads:[~2019-09-11  9:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-11  9:41 [PATCH v1] scsi: allow auto suspend override by low-level driver Stanley Chu
     [not found] ` <1568194890-24439-1-git-send-email-stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2019-09-11  9:41   ` [PATCH v1 1/3] scsi: core: " Stanley Chu
2019-09-11 10:54     ` Avri Altman
2019-09-11  9:41   ` [PATCH v1 2/3] scsi: ufs: override auto suspend tunables for ufs Stanley Chu
2019-09-11 10:56     ` Avri Altman
2019-09-12  5:37       ` Stanley Chu
2019-09-11  9:41   ` Stanley Chu [this message]
2019-09-11 10:58     ` [PATCH v1 3/3] scsi: ufs-mediatek: enable auto suspend capability Avri Altman
2019-09-12  5:39       ` Stanley Chu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1568194890-24439-4-git-send-email-stanley.chu@mediatek.com \
    --to=stanley.chu-nus5lvnupcjwk0htik3j/w@public.gmane.org \
    --cc=alim.akhtar-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=andy.teng-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=avri.altman-Sjgp3cTcYWE@public.gmane.org \
    --cc=beanhuo-AL4WhLSQfzjQT0dZR+AlfA@public.gmane.org \
    --cc=bvanassche-HInyCGIudOg@public.gmane.org \
    --cc=chun-hung.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=evgreen-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=jejb-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org \
    --cc=kuohong.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=marc.w.gonzalez-GANU6spQydw@public.gmane.org \
    --cc=martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=pedrom.sousa-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
    --cc=peter.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=sthumma-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=subhashj-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=vivek.gautam-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox