[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD=FV=W05jEfViCGyz76myP2k7-WFrXwB+o3pzCwCj5kob2TVg@mail.gmail.com>
Date: Tue, 21 Oct 2014 21:33:19 -0700
From: Doug Anderson <dianders@...omium.org>
To: Chris Zhong <zyw@...k-chips.com>
Cc: Heiko Stuebner <heiko@...ech.de>,
Mike Turquette <mturquette@...aro.org>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Kumar Gala <galak@...eaurora.org>,
Russell King <linux@....linux.org.uk>,
linux-rockchip@...ts.infradead.org,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH v4 2/6] pinctrl: rockchip: save and restore gpio6_c6
pinmux in suspend/resume
Chris,
On Tue, Oct 21, 2014 at 4:19 PM, Chris Zhong <zyw@...k-chips.com> wrote:
> +static u32 rk3288_grf_gpio6c_iomux;
Somehow my instinct says that this should be in the "info" structure,
but I can't say exactly why (since by definition there can be only one
gpio6_c6). ...no need to change this in my opinion.
> static int rockchip_pinctrl_suspend(struct device *dev)
> {
> struct rockchip_pinctrl *info = dev_get_drvdata(dev);
> + int ret = pinctrl_force_sleep(info->pctl_dev);
> +
> + if (ret)
> + return ret;
> +
> + /*
> + * RK3288 GPIO6_C6 mux would be modified by Maskrom when resume, so save
> + * the setting here, and restore it at resume.
> + */
> + if (info->ctrl->type == RK3288) {
> + ret = regmap_read(info->regmap_base, RK3288_GRF_GPIO6C_IOMUX,
> + &rk3288_grf_gpio6c_iomux);
> + if (ret)
> + return ret;
I seriously doubt it matters, but as a nit it seems like you should
call pinctrl_force_default() in the error case (to undo
pinctrl_force_sleep).
Everything is just nits and this works for me, so:
Tested-by: Doug Anderson <dianders@...omium.org>
Reviewed-by: Doug Anderson <dianders@...omium.org>
--
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