Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1674348

Re: [PATCH v2 1/2] DT: pinctrl: Add binding documentation for Spreadtrum pin controller

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Linus Walleij <linus.walleij@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/2] DT: pinctrl: Add binding documentation for Spreadtrum pin controller
Date Mon, 26 Jun 2017 00:20:01 +0200
Message-ID <tWo2R-2kZ-3@gated-at.bofh.it> (permalink)
References <tOZ9g-2Na-7@gated-at.bofh.it> <tQpXI-LP-21@gated-at.bofh.it> <tRqRI-6Wp-7@gated-at.bofh.it> <tRKx4-2BE-7@gated-at.bofh.it> <tUnND-6PZ-9@gated-at.bofh.it> <tUJ1M-3E2-29@gated-at.bofh.it>
X-Original-To Baolin Wang <baolin.wang@linaro.org>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=3fT3HuGMq8Yh5vTQz7bpaCtnHIlem1ZCLMt6aJOPm98=; b=gj6zDi3Cleh5zgqcXuS6xDmB9SRLj8VFIdUho+BlOu49uGvijrUSjeV3GIEBvLDZgK asXYDmsn259T8cBMlHU+v5KlAGUt7je1pZgXEjeBKvAGNQ82pN+tW/VPECx8/9ZsO4NY ZA5Kr9d96ELBGG3MdLBua5bPK/y4CmvW4JQVc=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3fT3HuGMq8Yh5vTQz7bpaCtnHIlem1ZCLMt6aJOPm98=; b=bpz7WRUYHFkS5AICfjtKsMGAwj6joT1/RMviXnn1OPehIPppKSkVMYeKCwyJ2UVp2z gz4rtmcxn4YxgiiCIkLt9PPYW8eLgyUiOVISTPsAMJn8oOS+qpT28HI+3MqQ2L9crK3/ GUzk5qEKNOUq9oVTcyqs8+KaAYl9JQWSO3Xy4c/PSMIDZOu/11VKRFilu/YXDDD2zu1m 8eFB2x12kbDm4MZ1XXIfqEIZWh59kGkTSB7nS/Py/S8kSxy4qnx+Wk/u+1hODcAfJE0u FTDqVmmeiY0MCK31FKkaNgV02l/yeHdFV4hEsf4efAWUjxTf1Bebh7BjWGWp1xmAOz0c AtIw==
X-Gm-Message-State AKS2vOx5q6JtlhGfkQUfL+Ix3RTRci+I6FcQwRAZjLIVuUrEx2SWW6vx 8djwsUk/JE8yAs3p2RXbgMVsVCiV/hbw
X-Received by 10.36.10.16 with SMTP id 16mr19714979itw.7.1498429144406; Sun, 25 Jun 2017 15:19:04 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset="UTF-8"
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 47
Organization linux.* mail to news gateway
X-Original-Cc Mark Rutland <mark.rutland@arm.com>, Rob Herring <robh+dt@kernel.org>, "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Mark Brown <broonie@kernel.org>
X-Original-Date Mon, 26 Jun 2017 00:19:03 +0200
X-Original-Message-ID <CACRpkdYETvpsr1X1dfiGfg9i=Tq2qHJBZHv7Us4aZ_1HQcOdoA@mail.gmail.com>
X-Original-References <359d62c1f2f7ef61c6160df9b60c1af4bfcea89a.1496664241.git.baolin.wang@spreadtrum.com> <CACRpkdbtuPKr=tWGoJC-sg2Oj47rYMpo6fs_Us=Nynew1Wkz=w@mail.gmail.com> <20170612060718.GA8566@spreadtrum.com> <20170613031547.GA29679@spreadtrum.com> <CACRpkdbaP1U3pefTbPj-wOa1AibcJHBBALfKWO8dBR=YW8f7zA@mail.gmail.com> <CAMz4ku+jZ-S6sBL=ib++j+ooqweU9UC+MTgFca7ScrQiJDeZVQ@mail.gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1674348

Show key headers only | View raw


On Wed, Jun 21, 2017 at 10:10 AM, Baolin Wang <baolin.wang@linaro.org> wrote:
> On 20 June 2017 at 17:31, Linus Walleij <linus.walleij@linaro.org> wrote:
>> On Tue, Jun 13, 2017 at 5:15 AM, Baolin Wang <baolin.wang@spreadtrum.com> wrote:
>>
>>> I forgot one most important reason why we can not use the "sleep" state. As I explained
>>> above, the sleep related configuration will bind with the pin's sleep mode. If we set the
>>> pin's sleep mode as AP_SLEEP, then we can select "sleep" state when AP system goes into
>>> deep sleep mode by issuing "pinctrl_force_sleep()" in pinctrl suspend function.
>>>
>>> But if we set the pin's sleep mode as PUBCP_SLEEP and pubcp system doesn't run linux kernel
>>> (it run another thread OS), then we can not select "sleep" state since the AP system does
>>> not go into deep sleep mode (AP system run linux kernel OS).
>>
>> Allright yes it makes sense, and also there are systems that just go into
>> "hardware sleep" and just put the pin into some pre-programmed mode.
>>
>> I'm a bit back-and-forth. I didn't mean that some code would actually
>> switch the state to "sleep" when we go to sleep, I meant that when
>> the system configures "default" mode it should also look up and
>> program the "sleep" mode, but this approach with a special property
>> is just another way of achieveing the same thing.
>>
>> But then we should add a whole slew of sleep states.
>>
>> I was thinking whether we could avoid having a special DT property
>> by parsing ahead to states we do not currently use and programming
>> that into the sleep mode registers.
>
> Yes, for most scenarios, it can work with the "sleep" state to set
> sleep-related config. But for our Spreadtrum platform scenario (I do
> not know if there are other platforms need this feature), we can not
> select the "sleep" state when pubcp system goes into deep sleep mode
> but ap system does not go into deep sleep mode. So I think we still
> need these "sleep-bias-pull-up", "sleep-bias-pull-down",
> "sleep-input-enable" and "sleep-output-enable" properties.

I don't really mean you should select the "sleep" state.

I meant, as part of setting the "default" state or even the "init"
state, we would inspect the "sleep" state, use those settings, and
program them into the registers at this early point.

Then never touch the registers again, and never really go to the
sleep state by software, just by hardware.

Yours,
Linus Walleij

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 1/2] DT: pinctrl: Add binding documentation for  Spreadtrum pin controller Linus Walleij <linus.walleij@linaro.org> - 2017-06-20 11:40 +0200
  Re: [PATCH v2 1/2] DT: pinctrl: Add binding documentation for  Spreadtrum pin controller Baolin Wang <baolin.wang@linaro.org> - 2017-06-21 10:20 +0200
    Re: [PATCH v2 1/2] DT: pinctrl: Add binding documentation for  Spreadtrum pin controller Linus Walleij <linus.walleij@linaro.org> - 2017-06-26 00:20 +0200
      Re: [PATCH v2 1/2] DT: pinctrl: Add binding documentation for  Spreadtrum pin controller Baolin Wang <baolin.wang@linaro.org> - 2017-06-27 10:00 +0200

csiph-web