From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lina Iyer Subject: Re: [RFC 1/2] mfd: qcom-rpm: Expose sleep state resources to clients Date: Wed, 12 Nov 2014 07:45:08 -0700 Message-ID: <20141112144508.GD45276@linaro.org> References: <1415659966-16200-1-git-send-email-bjorn.andersson@sonymobile.com> <1415659966-16200-2-git-send-email-bjorn.andersson@sonymobile.com> <20141111120457.GZ24004@x1> <20141111183319.GD16980@sonymobile.com> <20141112095200.GD24004@x1> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Return-path: Received: from mail-ie0-f173.google.com ([209.85.223.173]:59498 "EHLO mail-ie0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752764AbaKLOpK (ORCPT ); Wed, 12 Nov 2014 09:45:10 -0500 Received: by mail-ie0-f173.google.com with SMTP id tr6so13676241ieb.32 for ; Wed, 12 Nov 2014 06:45:09 -0800 (PST) Content-Disposition: inline In-Reply-To: <20141112095200.GD24004@x1> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Lee Jones Cc: Bjorn Andersson , Stephen Boyd , David Collins , Mark Brown , "linux-arm-kernel@lists.infradead.org" , "linux-arm-msm@vger.kernel.org" On Wed, Nov 12 2014 at 02:52 -0700, Lee Jones wrote: >On Tue, 11 Nov 2014, Bjorn Andersson wrote: > >> On Tue 11 Nov 04:04 PST 2014, Lee Jones wrote: >> >> > On Mon, 10 Nov 2014, Bjorn Andersson wrote: >> > > > > + writel_relaxed(BIT(state), RPM_CTRL_REG(rpm, RPM_REQUEST_CONTEXT)); >> > >> > How are the state bits organised? >> > >> >> BIT(0) is active mode, BIT(1) is sleep mode, as specified below. I could add >> some sanity checking here if you would like to. > >I'm just double checking that you know what that means. > >BIT(0) == b01 >BIT(1) == b10 > >It seems strange to represent a single boolean state over 2 bits. > >Also, what happens if b11 or b00 occurs? > Lee is correct, it should be 0 for Active and 1 for Sleep set. Lina From mboxrd@z Thu Jan 1 00:00:00 1970 From: lina.iyer@linaro.org (Lina Iyer) Date: Wed, 12 Nov 2014 07:45:08 -0700 Subject: [RFC 1/2] mfd: qcom-rpm: Expose sleep state resources to clients In-Reply-To: <20141112095200.GD24004@x1> References: <1415659966-16200-1-git-send-email-bjorn.andersson@sonymobile.com> <1415659966-16200-2-git-send-email-bjorn.andersson@sonymobile.com> <20141111120457.GZ24004@x1> <20141111183319.GD16980@sonymobile.com> <20141112095200.GD24004@x1> Message-ID: <20141112144508.GD45276@linaro.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Nov 12 2014 at 02:52 -0700, Lee Jones wrote: >On Tue, 11 Nov 2014, Bjorn Andersson wrote: > >> On Tue 11 Nov 04:04 PST 2014, Lee Jones wrote: >> >> > On Mon, 10 Nov 2014, Bjorn Andersson wrote: >> > > > > + writel_relaxed(BIT(state), RPM_CTRL_REG(rpm, RPM_REQUEST_CONTEXT)); >> > >> > How are the state bits organised? >> > >> >> BIT(0) is active mode, BIT(1) is sleep mode, as specified below. I could add >> some sanity checking here if you would like to. > >I'm just double checking that you know what that means. > >BIT(0) == b01 >BIT(1) == b10 > >It seems strange to represent a single boolean state over 2 bits. > >Also, what happens if b11 or b00 occurs? > Lee is correct, it should be 0 for Active and 1 for Sleep set. Lina