public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-clk@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Marek Vasut <marek.vasut+renesas@gmail.com>,
	Alexey Firago <alexey_firago@mentor.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>
Subject: Re: [PATCH V2] clk: vc5: Add suspend/resume support
Date: Thu, 13 Dec 2018 03:09:19 +0100	[thread overview]
Message-ID: <904df663-92e1-7891-b897-9cd0de1b1521@gmail.com> (raw)
In-Reply-To: <1632836.JPXSTA8kTp@avalon>

On 12/12/2018 09:43 AM, Laurent Pinchart wrote:
> Hi Marex,

Hi,

> Thank you for the patch.
> 
> On Wednesday, 12 December 2018 03:41:30 EET Marek Vasut wrote:
>> Add simple suspend/resume handlers to the driver to restore the chip
>> configuration after resume. It is possible that the chip was configured
>> with non-default values before suspend-resume cycle and that the chip
>> is powered down during this cycle, so the configuration could get lost.
>>
>> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
>> Cc: Alexey Firago <alexey_firago@mentor.com>
>> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> Cc: Michael Turquette <mturquette@baylibre.com>
>> Cc: Stephen Boyd <sboyd@codeaurora.org>
>> Cc: linux-renesas-soc@vger.kernel.org
>> ---
>> V2: Replace ifdef with __maybe_unused
>>     Simplify return value handling in resume
>> ---
>>  drivers/clk/clk-versaclock5.c | 31 +++++++++++++++++++++++++++++++
>>  1 file changed, 31 insertions(+)
>>
>> diff --git a/drivers/clk/clk-versaclock5.c b/drivers/clk/clk-versaclock5.c
>> index decffb3826ec..b66586a3abb7 100644
>> --- a/drivers/clk/clk-versaclock5.c
>> +++ b/drivers/clk/clk-versaclock5.c
>> @@ -906,6 +906,34 @@ static int vc5_remove(struct i2c_client *client)
>>  	return 0;
>>  }
>>
>> +static int __maybe_unused vc5_suspend(struct device *dev)
>> +{
>> +	struct vc5_driver_data *vc5 = dev_get_drvdata(dev);
>> +	int ret;
>> +
>> +	ret = regcache_sync(vc5->regmap);
> 
> Didn't you say the sync here was unneeded and would be dropped ?
> 
>> +	if (ret != 0) {
>> +		dev_err(dev, "Failed to save register map: %d\n", ret);
>> +		return ret;
>> +	}

If you have a setup with working DU and VGA on something close to next
(it's broken in next), can you try dropping this hunk (basically do
ret = 0;//regcache_sync(vc5->regmap); ) and see if the regcache stays
consistent ? It should. If so, I'll drop this in V3.

>> +	regcache_cache_only(vc5->regmap, true);
>> +	regcache_mark_dirty(vc5->regmap);
[...]


-- 
Best regards,
Marek Vasut

  reply	other threads:[~2018-12-13  2:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-12  1:41 [PATCH V2] clk: vc5: Add suspend/resume support Marek Vasut
2018-12-12  8:43 ` Laurent Pinchart
2018-12-13  2:09   ` Marek Vasut [this message]
2018-12-13  4:52     ` Laurent Pinchart
2018-12-13 16:17       ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=904df663-92e1-7891-b897-9cd0de1b1521@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=alexey_firago@mentor.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=marek.vasut+renesas@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox