From patchwork Tue Jan 30 12:03:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 10191737 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F1CD960388 for ; Tue, 30 Jan 2018 12:03:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD1D126E3C for ; Tue, 30 Jan 2018 12:03:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCCCE289DA; Tue, 30 Jan 2018 12:03:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4CE6C26E3C for ; Tue, 30 Jan 2018 12:03:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751405AbeA3MDo (ORCPT ); Tue, 30 Jan 2018 07:03:44 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:51086 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751360AbeA3MDn (ORCPT ); Tue, 30 Jan 2018 07:03:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xLBwawirTlhX0VTFmAMf4Eruvl355TZCMb3mgWJpfwQ=; b=sQv7hxbqKgopCMYaRXRHiqPls Z3Z27p5eLaBgXAepICmvf3NcmBvK7BeIq/r8F1dpfPjal04xq7tvibiKuk4SOati7CMCKhTnYlBG/ BQUWmH3W0arRQFE1lP+IsF+w/mP59ZuS8M6e6nJkmeiuTOTTIsBVMWY5sJVrGm8YHXI9Y=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1egUdZ-0004gp-3D; Tue, 30 Jan 2018 12:03:41 +0000 Received: from broonie by debutante with local (Exim 4.90) (envelope-from ) id 1egUdY-0003oE-2C; Tue, 30 Jan 2018 12:03:40 +0000 Date: Tue, 30 Jan 2018 12:03:40 +0000 From: Mark Brown To: Geert Uytterhoeven Cc: Liam Girdwood , Chunyan Zhang , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH] regulator: core: Fix s2idle Message-ID: <20180130120340.GB10525@sirena.org.uk> References: <1517308346-25299-1-git-send-email-geert+renesas@glider.be> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1517308346-25299-1-git-send-email-geert+renesas@glider.be> X-Cookie: Try User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Jan 30, 2018 at 11:32:26AM +0100, Geert Uytterhoeven wrote: > But I have no idea what impact it has. So far it doesn't seem to hurt, > though. I suspect that instead what we should be doing is changing the set_suspend_state() check to the below - if we don't have any constraints or there's otherwise nothing to do just let the suspend proceed. Can you give this a spin and confirm if it fixes things? diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 42681c10cbe4..dd4708c58480 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -758,7 +758,7 @@ static int suspend_set_state(struct regulator_dev *rdev, rstate = regulator_get_suspend_state(rdev, state); if (rstate == NULL) - return -EINVAL; + return 0; /* If we have no suspend mode configration don't set anything; * only warn if the driver implements set_suspend_voltage or