[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJuYYwQNQZmMYgwcZr1M2dxfhjuJvL6AimfkQQoG_arxi6UwGg@mail.gmail.com>
Date: Tue, 15 Nov 2011 01:07:09 +0530
From: Thomas Abraham <thomas.abraham@...aro.org>
To: Stephen Warren <swarren@...dia.com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Inderpal Singh <inderpal.singh@...aro.org>,
"linux-samsung-soc@...r.kernel.org"
<linux-samsung-soc@...r.kernel.org>,
"kgene.kim@...sung.com" <kgene.kim@...sung.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"patches@...aro.org" <patches@...aro.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ARM: SAMSUNG: Save/restore GPIO drive strength across suspend/resume
On 15 November 2011 00:30, Stephen Warren <swarren@...dia.com> wrote:
> Thomas Abraham wrote at Monday, November 14, 2011 6:57 AM:
>> On 12 November 2011 16:30, Linus Walleij <linus.walleij@...aro.org> wrote:
>> > On Sat, Nov 12, 2011 at 6:01 AM, Inderpal Singh
>> > <inderpal.singh@...aro.org> wrote:
>> >
>> >> GPIO driver strength settings are not preserved across suspend/resume
>> >> for s5pc100, s5pv210 and Exynos platforms which has been the cause of
>> >> mmc/sd card read/write failures after resume. Fix this by saving and
>> >> restoring the GPIO driver strength register settings across suspend/resume.
>> >>
>> >> Signed-off-by: Inderpal Singh <inderpal.singh@...aro.org>
>> >
>> > On a related theme: I am thinking about how to support preserving
>> > drive strength (etc) across suspend/resume and deepsleep in the
>> > pincontrol subsystem.
>> >
>> > Currently I am playing with the idea to let pin groups have states,
>> > as the different configurations seem to be 90% or so about very
>> > specific sleep modes, so say:
>> >
>> > pinconf_set_group_state("mmcgroup", PINCONF_STATE_ACTIVE);
>> > pinconf_set_group_state("mmcgroup", PINCONF_STATE_SUSPENDED);
>> > pinconf_set_group_state("mmcgroup", PINCONF_STATE_SLEEP);
>>
>>
>> The API name suggests that power state is set based on a pin group.
>> For a driver, the following could be convenient as the driver transits
>> through various power management states.
>>
>> struct pinmux pmx;
>> pmx = pinmux_get(dev, "i2c0");
>>
>> [...]
>>
>> pinmux_set_state(pmx, PINCONF_STATE_SLEEP);
>> [...]
>> pinmux_set_state(pmx, PINCONF_STATE_ACTIVE);
>
> That seems a more consistent driver-oriented API, yes.
>
> I'd of course lean towards adding the pin config data into the mapping
> table, and using the existing feature struct pinmux_map name field to
> name those states, and allowing dynamic transitioning between states,
> rather than adding a complete new API and namespace for these states.
I am not sure how this works, but with dynamic transitioning, will it
be possible to program the pinmux registers dynamically when a
driver/controller decides to idle for sometime and come back up again
(not a system wide suspend-resume cycle). There might be a need for
the driver to inform the pinmux subsystem of this case and allow the
pinmux subsystem to re-program pinmux registers as required.
Thanks,
Thomas.
>
> --
> nvpublic
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists