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


Groups > linux.kernel > #1618020

Re: [PATCH 3/4] pwm: tegra: Add DT binding details to configure pin in suspends/resume

From Laxman Dewangan <ldewangan@nvidia.com>
Newsgroups linux.kernel
Subject Re: [PATCH 3/4] pwm: tegra: Add DT binding details to configure pin in suspends/resume
Date 2017-04-06 15:50 +0200
Message-ID <ttfXs-HN-9@gated-at.bofh.it> (permalink)
References <tsUgi-3Nd-3@gated-at.bofh.it> <tsUgi-3Nd-1@gated-at.bofh.it> <ttbAv-6xa-53@gated-at.bofh.it> <ttfkJ-ux-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thursday 06 April 2017 06:33 PM, Thierry Reding wrote:
> * PGP Signed by an unknown key
>
> On Thu, Apr 06, 2017 at 09:57:09AM +0100, Jon Hunter wrote:
>> On 05/04/17 15:13, Laxman Dewangan wrote:
>>> +state of the system. The configuration of pin is provided via the pinctrl
>>> +DT node as detailed in the pinctrl DT binding document
>>> +	Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
>>> +
>>> +The PWM node will have following optional properties.
>>> +pinctrl-names:	Pin state names. Must be "suspend" and "resume".
>> Why not just use the pre-defined names here? There is a pre-defined name
>> for "default", "idle" and "sleep" and then you can use the following
>> APIs and avoid the lookup of the state ...
>>
>> pinctrl_pm_select_default_state()
>> pinctrl_pm_select_idle_state()
>> pinctrl_pm_select_sleep_state()
>>
>> Note for i2c [0][1], I used "default" as the active/on state (which I
>> know is not that descriptive) and then used 'idle' as the suspended
>> state. This way we don't need any custom names.
> Agreed, I think that's how these states are meant to be used.
I did quick grep for the pinctrl_pm_select_* functions in the code tree 
and found usage of these APIs in some of the places.
I am taking the reference of i2c-st, i2c-nomadic and 
extcon/extcon-usb-gpio.c drivers and from this the interpretation is

default state: When interface active and transfer need to be done in IO 
interface.
idle state: Active state of the system but interface is not active, put 
in non-active state of the interface.
sleep state: When system entering into suspend and IO interface is going 
to be inactive.

So in PWM case, we will need the "default" and "sleep" state.

In suspend(), set the "sleep" state and in resume, set the "default" state.

+ Linus W as I refereed his st/nomadik driver for reference.

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


Thread

[PATCH 3/4] pwm: tegra: Add DT binding details to configure pin in suspends/resume Laxman Dewangan <ldewangan@nvidia.com> - 2017-04-05 16:40 +0200
  Re: [PATCH 3/4] pwm: tegra: Add DT binding details to configure pin  in suspends/resume Jon Hunter <jonathanh@nvidia.com> - 2017-04-06 11:10 +0200
    Re: [PATCH 3/4] pwm: tegra: Add DT binding details to configure pin  in suspends/resume Thierry Reding <thierry.reding@gmail.com> - 2017-04-06 15:10 +0200
      Re: [PATCH 3/4] pwm: tegra: Add DT binding details to configure pin  in suspends/resume Laxman Dewangan <ldewangan@nvidia.com> - 2017-04-06 15:50 +0200
        Re: [PATCH 3/4] pwm: tegra: Add DT binding details to configure pin  in suspends/resume Jon Hunter <jonathanh@nvidia.com> - 2017-04-06 16:10 +0200
        Re: [PATCH 3/4] pwm: tegra: Add DT binding details to configure pin  in suspends/resume Linus Walleij <linus.walleij@linaro.org> - 2017-04-07 12:30 +0200

csiph-web