From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932930AbdKDMZq (ORCPT ); Sat, 4 Nov 2017 08:25:46 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:61506 "EHLO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752181AbdKDMZo (ORCPT ); Sat, 4 Nov 2017 08:25:44 -0400 From: "Rafael J. Wysocki" To: Tony Lindgren Cc: Florian Fainelli , Charles Keepax , linux-gpio@vger.kernel.org, Linus Walleij , Rob Herring , Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list , ckeepax@opensource.wolfsonmicro.com, swarren@nvidia.com, andy.shevchenko@gmail.com, alcooperx@gmail.com, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org Subject: Re: [PATCH v2 0/2] pinctrl: Allow indicating loss of state across suspend/resume Date: Sat, 04 Nov 2017 13:25:43 +0100 Message-ID: <2452741.VnAOAIxsj2@aspire.rjw.lan> In-Reply-To: <20171103173353.GJ28152@atomide.com> References: <20171102231551.16220-1-f.fainelli@gmail.com> <20171103173353.GJ28152@atomide.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, November 3, 2017 6:33:53 PM CET Tony Lindgren wrote: > * Florian Fainelli [171103 17:04]: > > On 11/03/2017 09:11 AM, Tony Lindgren wrote: > > The pinctrl provider is losing its state, hence these two patches. > > OK > > > > Anyways, the context lost flag should be managed in the PM core for > > > the device, so adding linux-pm and Rafael to Cc. > > > > I don't think it's that simple but sure, why not. > > Just having bool context_lost in struct dev_pm_info would probably > be enough to allow drivers to deal with it. This flag could then > be set for a device by power domain related code that knows if > context got lost. Something like: if the driver sees "context_lost" set, it should restore the context to the device from memory? But the it would also need to save the context beforehand, so why not to restore it unconditionally on resume? Thanks, Rafael