Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935513AbcLMUFJ (ORCPT ); Tue, 13 Dec 2016 15:05:09 -0500 Received: from mail-oi0-f68.google.com ([209.85.218.68]:35879 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933696AbcLMUEb (ORCPT ); Tue, 13 Dec 2016 15:04:31 -0500 Date: Tue, 13 Dec 2016 14:04:27 -0600 From: Rob Herring To: Subhash Jadavani Cc: vinholikatti@gmail.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, Mark Rutland , Hannes Reinecke , Yaniv Gardi , Joao Pinto , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list Subject: Re: [PATCH v1 07/12] scsi: ufs: add option to change default UFS power management level Message-ID: <20161213200427.vzdwyzajcftvvcgu@rob-hp-laptop> References: <1481590462-9981-1-git-send-email-subhashj@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1481590462-9981-1-git-send-email-subhashj@codeaurora.org> User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2498 Lines: 43 On Mon, Dec 12, 2016 at 04:54:20PM -0800, Subhash Jadavani wrote: > UFS device and link can be put in multiple different low power modes hence > UFS driver supports multiple different low power modes. By default UFS > driver selects the default (optimal) low power mode (which gives moderate > power savings and have relatively less enter and exit latencies) but > we might have to tune this default power mode for different chipset > platforms to meet the low power requirements/goals. Hence this patch > adds option to change default UFS low power mode (level). > > Reviewed-by: Yaniv Gardi > Signed-off-by: Subhash Jadavani > --- > .../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 10 ++++++ > drivers/scsi/ufs/ufshcd-pltfrm.c | 14 ++++++++ > drivers/scsi/ufs/ufshcd.c | 39 ++++++++++++++++++++++ > drivers/scsi/ufs/ufshcd.h | 4 +-- > 4 files changed, 65 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt > index a99ed55..c3836c5 100644 > --- a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt > +++ b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt > @@ -41,6 +41,14 @@ Optional properties: > -lanes-per-direction : number of lanes available per direction - either 1 or 2. > Note that it is assume same number of lanes is used both > directions at once. If not specified, default is 2 lanes per direction. > +- rpm-level : UFS Runtime power management level. Following PM levels are supported: > + 0 - Both UFS device and Link in active state (Highest power consumption) > + 1 - UFS device in active state but Link in Hibern8 state > + 2 - UFS device in Sleep state but Link in active state > + 3 - UFS device in Sleep state and Link in hibern8 state (default PM level) > + 4 - UFS device in Power-down state and Link in Hibern8 state > + 5 - UFS device in Power-down state and Link in OFF state (Lowest power consumption) > +- spm-level : UFS System power management level. Allowed PM levels are same as rpm-level. This looks like you are putting policy for Linux into DT. What I would expect to see here is disabling of states that don't work due to some h/w limitation. Otherwise, it is a user decision for what modes to go into. Also, I think link and device states should be separate. Rob