Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp380338ybm; Fri, 29 May 2020 02:27:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpB7dFdhW0+ssh/IsEyFDGSfzsGa2J4oPKL4Imar2P2uYlq+7gYdGK/ylkEzFgJsbWYrRJ X-Received: by 2002:a50:a782:: with SMTP id i2mr7310541edc.33.1590744467119; Fri, 29 May 2020 02:27:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590744467; cv=none; d=google.com; s=arc-20160816; b=ONdFqKqxLVgpqhRZjq/AMIN3l/Rnje33XklrJyfQTcjB3VKgkXHSnyOXEqW5q12WYY vB5DdN7nLeANSnzGzkf0QHDHHc0EIVS8wRsDmu/9+bJZVa+Jd94gm3jIwFPwlC5OQWF5 Gl5q9cLKmJwYvLEeXSfMiPA7K8jjSQka53Ae/JrR6e15LuwE+eUdOLIAkrb2I/yJ5bOO nF0ZPdVWTGcJ05ZHTlZpCSiAOZuF09Bo4Buge7khVbn0qR/E5kn+AA1T/7Gqu5sX1mbO vNG6wWSUwEJKaHUi/moIvpr0q9tx2Er6btTl1IH5u4BER1nCFd58XUys/apM6L7Qx7db mqCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ckHEM7GVI4e4nimxXTABhbmcvCORVQbBj1jfInkgoAg=; b=FqAIvyGMTbFAahvhvtMzk+g5aF9yABBhm8aiBPreBAqAJzsLuFrlDYYtwvBqZQ1szW K3sIWASUYtHZL1S3XuRbOrd5Mpsj9DHIAJJzREJRGrHFJd+bs5K46ppjl4EItMo4+Yo8 ocVXKXoqPXpow1k066qn6trDi/9J2aPkMxpLkCvqVJk49dm/kATPRXoLP62EwpwAIcHi S+AMYO4dDriR7UAY5SJi9iAdXRf3vH3n6wDaRR42VzDOlMNaLqfqrjXOrLfAm81e8eUL wPON1joTzzqefbs8h9vDVOI9vdHM3iGOCdcsJ5muY9C0fIHp2OfjgxV49EKLTZCQEBfe BHww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=HEFKWHlT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r13si4711636edq.64.2020.05.29.02.27.24; Fri, 29 May 2020 02:27:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=HEFKWHlT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726687AbgE2JXR (ORCPT + 99 others); Fri, 29 May 2020 05:23:17 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:12839 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725795AbgE2JXQ (ORCPT ); Fri, 29 May 2020 05:23:16 -0400 X-UUID: 420d9dc2520d4636ae9fc7b53231bcd0-20200529 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=ckHEM7GVI4e4nimxXTABhbmcvCORVQbBj1jfInkgoAg=; b=HEFKWHlTSIeuubldwrrsmrXO91sFckAW6b3Ogl7IJpmuxDN1kgOIbNTJBVFsm7738Qc2TKXDPwrK24H2hZuPe8l4e9FsYvEhzKgqNGTXfxgIfVkS4GBM5DZ+rzJ8jmpR6fU9J35f7TKrnRqBrAQRj0FYC/BJB33nJ4f4e/Mcqqw=; X-UUID: 420d9dc2520d4636ae9fc7b53231bcd0-20200529 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 793116554; Fri, 29 May 2020 17:23:13 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 29 May 2020 17:23:10 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 29 May 2020 17:23:10 +0800 From: Stanley Chu To: , , , , CC: , , , , , , , , , , , , , , , Stanley Chu Subject: [PATCH v2 3/5] scsi: ufs-mediatek: Introduce low-power mode for device power supply Date: Fri, 29 May 2020 17:23:08 +0800 Message-ID: <20200529092310.1106-4-stanley.chu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200529092310.1106-1-stanley.chu@mediatek.com> References: <20200529092310.1106-1-stanley.chu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org QWxsb3cgZGV2aWNlIHBvd2VyIHN1cHBseSB0byBlbnRlciBsb3ctcG93ZXIgbW9kZSBpZiBkZXZp Y2Ugd2lsbA0KZG8gbm90aGluZyB0byBzYXZlIG1vcmUgcG93ZXIuDQoNClNpZ25lZC1vZmYtYnk6 IFN0YW5sZXkgQ2h1IDxzdGFubGV5LmNodUBtZWRpYXRlay5jb20+DQpSZXZpZXdlZ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