Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762817AbdLSNPi (ORCPT ); Tue, 19 Dec 2017 08:15:38 -0500 Received: from mail-wr0-f175.google.com ([209.85.128.175]:45461 "EHLO mail-wr0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752255AbdLSNPc (ORCPT ); Tue, 19 Dec 2017 08:15:32 -0500 X-Google-Smtp-Source: ACJfBotEFD5XZiu4DyXY/ZG0qqV8iUboHJBM9N72Qb2e3t3iPR6UgswwHEdJW946fkP+kHDjnHWSo7a9dUmscXFQdeA= MIME-Version: 1.0 In-Reply-To: References: <7742130.AaJQIxeI1n@aspire.rjw.lan> <252167445.OQUXi2Ca9Y@aspire.rjw.lan> From: Ulf Hansson Date: Tue, 19 Dec 2017 14:15:30 +0100 Message-ID: Subject: Re: [PATCH 3/4] PM / core: Direct DPM_FLAG_SMART_SUSPEND optimization To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Linux PM , Greg Kroah-Hartman , Alan Stern , Kevin Hilman , LKML , Mika Westerberg Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1264 Lines: 32 On 19 December 2017 at 12:19, Rafael J. Wysocki wrote: > On Tue, Dec 19, 2017 at 12:13 PM, Rafael J. Wysocki wrote: >> On Tue, Dec 19, 2017 at 8:38 AM, Ulf Hansson wrote: >>> On 10 December 2017 at 01:00, Rafael J. Wysocki wrote: >>>> From: Rafael J. Wysocki >>>> > > [cut] > >> >>> Moreover, what happens when/if a driver that has deployed this >>> solution, starts being used on a new SoC and then additional >>> operations during system suspend becomes required (for example >>> pinctrls that needs to be put in a system sleep state)? Then >>> everything falls apart, doesn't it? >> >> Then you runtime-resume the device in ->suspend() and the remaining >> callbacks will run for you just fine. > > BTW, I guess you'll need a middle layer in that case anyway so that > the driver doesn't have to distinguish between platforms it has to > work with which makes the argument somewhat moot. No, this isn't the case. Let's take the pinctrl as an example. The pinctrl system sleep state could be optionally defined in the DT, depending on the platform. All the driver shall do, is to try to set the state, if it has been defined. Kind regards Uffe