From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751342AbdGPHeR (ORCPT ); Sun, 16 Jul 2017 03:34:17 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:33598 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750934AbdGPHeP (ORCPT ); Sun, 16 Jul 2017 03:34:15 -0400 Date: Thu, 6 Jul 2017 05:18:31 +0200 From: Pavel Machek To: Florian Fainelli Cc: linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Alexandre Belloni , "Rafael J. Wysocki" , Ulf Hansson , Daniel Lezcano , linux-pm , Thibaud Cornic , JB , Mason , Kevin Hilman , Linux ARM Subject: Re: [PATCH 1/2] PM / suspend: Add platform_suspend_target_state() Message-ID: <20170706031831.GE12954@xo-6d-61-c0.localdomain> 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170716023610.4658-2-f.fainelli@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! > 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. > > Signed-off-by: Florian Fainelli > --- > include/linux/suspend.h | 25 +++++++++++++++++++++++++ > kernel/power/suspend.c | 15 +++++++++++++++ > 2 files changed, 40 insertions(+) > > diff --git a/include/linux/suspend.h b/include/linux/suspend.h > index 0b1cf32edfd7..6e6cc0778816 100644 > --- a/include/linux/suspend.h > +++ b/include/linux/suspend.h > @@ -50,6 +50,16 @@ enum suspend_stat_step { > SUSPEND_RESUME > }; > > +enum platform_target_state { > + PLATFORM_STATE_UNKNOWN = -1, > + PLATFORM_STATE_WORKING = 0, > + PLATFORM_STATE_ACPI_S1, > + PLATFORM_STATE_ACPI_S2, > + PLATFORM_STATE_ACPI_S3, > + PLATFORM_STATE_ACPI_S4, > + /* Add platform specific states here */ > +}; > + As I tried to explain in the email thread, having list with all the possible platform states is no-go. We have about 1000 platforms supported... NAK. Pavel From mboxrd@z Thu Jan 1 00:00:00 1970 From: pavel@ucw.cz (Pavel Machek) Date: Thu, 6 Jul 2017 05:18:31 +0200 Subject: [PATCH 1/2] PM / suspend: Add platform_suspend_target_state() 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> Message-ID: <20170706031831.GE12954@xo-6d-61-c0.localdomain> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi! > 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. > > Signed-off-by: Florian Fainelli > --- > include/linux/suspend.h | 25 +++++++++++++++++++++++++ > kernel/power/suspend.c | 15 +++++++++++++++ > 2 files changed, 40 insertions(+) > > diff --git a/include/linux/suspend.h b/include/linux/suspend.h > index 0b1cf32edfd7..6e6cc0778816 100644 > --- a/include/linux/suspend.h > +++ b/include/linux/suspend.h > @@ -50,6 +50,16 @@ enum suspend_stat_step { > SUSPEND_RESUME > }; > > +enum platform_target_state { > + PLATFORM_STATE_UNKNOWN = -1, > + PLATFORM_STATE_WORKING = 0, > + PLATFORM_STATE_ACPI_S1, > + PLATFORM_STATE_ACPI_S2, > + PLATFORM_STATE_ACPI_S3, > + PLATFORM_STATE_ACPI_S4, > + /* Add platform specific states here */ > +}; > + As I tried to explain in the email thread, having list with all the possible platform states is no-go. We have about 1000 platforms supported... NAK. Pavel