From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756432AbdKDIha (ORCPT ); Sat, 4 Nov 2017 04:37:30 -0400 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:52150 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751037AbdKDIh0 (ORCPT ); Sat, 4 Nov 2017 04:37:26 -0400 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.cirrus.com Date: Sat, 4 Nov 2017 08:37:07 +0000 From: Charles Keepax To: Tony Lindgren CC: Florian Fainelli , , Linus Walleij , Rob Herring , Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list , , , , , , "Rafael J. Wysocki" , Subject: Re: [PATCH v2 0/2] pinctrl: Allow indicating loss of state across suspend/resume Message-ID: <20171104083707.gtmnhbrzlqjulwe4@localhost.localdomain> References: <20171102231551.16220-1-f.fainelli@gmail.com> <20171103103707.3e5wb3c7foxbuvvg@localhost.localdomain> <20171103161120.GH28152@atomide.com> <20171103173353.GJ28152@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20171103173353.GJ28152@atomide.com> User-Agent: NeoMutt/20170113 (1.7.2) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711040122 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 03, 2017 at 10:33:53AM -0700, 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. > > Anybody got better ideas? > Should the provider driver not know its state will be lost since will have had its PM ops called, and it should be aware of the state it was in. So doesn't it just need to restore that state on resume? Feels a bit like we are over complicating this here. Apologies if I am missing some here. Thanks, Charles