Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751268AbdGPKio (ORCPT ); Sun, 16 Jul 2017 06:38:44 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:50102 "EHLO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751048AbdGPKin (ORCPT ); Sun, 16 Jul 2017 06:38:43 -0400 From: "Rafael J. Wysocki" To: Florian Fainelli Cc: linux-kernel@vger.kernel.org, Alexandre Belloni , "Rafael J. Wysocki" , Ulf Hansson , Daniel Lezcano , linux-pm , Thibaud Cornic , JB , Mason , Kevin Hilman , Pavel Machek , Linux ARM Subject: Re: [PATCH 1/2] PM / suspend: Add platform_suspend_target_state() Date: Sun, 16 Jul 2017 12:30:55 +0200 Message-ID: <1787546.EYh03heFAd@aspire.rjw.lan> User-Agent: KMail/4.14.10 (Linux/4.12.0-rc1+; KDE/4.14.9; x86_64; ; ) In-Reply-To: <20170716023610.4658-2-f.fainelli@gmail.com> References: <20170623010837.11199-1-f.fainelli@gmail.com> <20170716023610.4658-1-f.fainelli@gmail.com> <20170716023610.4658-2-f.fainelli@gmail.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 Content-Length: 1006 Lines: 25 On Saturday, July 15, 2017 07:36:09 PM Florian Fainelli wrote: > Add an optional platform_suspend_ops callback: target_state, and a > helper function globally visible to get this called: > platform_suspend_target_state(). > > This is useful for platform specific drivers that may need to take a > slightly different suspend/resume path based on the system's > suspend/resume state being entered. > > Although this callback is optional and documented as such, it requires > a platform_suspend_ops::begin callback to be implemented in order to > provide an accurate suspend/resume state within the driver that > implements this platform_suspend_ops. > > An enumeration: platform_target_state is defined which currently defines > the standard ACPI_S[1-4] states and can be extended with platform > specific suspend states. This has a couple of problems, but I'm not sure if it is worth to go too much into details here. Let's just take a different approach as I said in the other thread. Thanks, Rafael