Received: by 2002:ac0:8c8e:0:0:0:0:0 with SMTP id r14csp355421ima; Wed, 6 Feb 2019 00:56:57 -0800 (PST) X-Google-Smtp-Source: AHgI3IYCANSgm5+9Ym0TMAWhfH350FdYuzkpUwDhGwXCnzxm4ZUfIaVbpetKsDpUtOL92/z+3g48 X-Received: by 2002:a17:902:8f98:: with SMTP id z24mr9516856plo.40.1549443417734; Wed, 06 Feb 2019 00:56:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549443417; cv=none; d=google.com; s=arc-20160816; b=MawHKBRWOry8/s0GtaswgD4au6j+pc+I2ADEHtx9gHlH2VivOVG9o62JRrgYprNoHf 9WlC5lo+MHUtFx/YJZAbs48zrwWbtmwPu/G0XOZUOJ8enjXnDP1e8c9y90Ij4hp4pcND M9W/uQfpEaDF025EsOvthbqBnbC55cjQ82VLT6ks+DI0+agMSLUfPZbqGc1btd6WE3EM nioEz0bVJN5qomOiu5BS/Ywa1jDSAUBz/cyN/S04iAwj9wF/kqjKpZ5p+xhjU6QWy4cx BEXNnMohiZcCe+3joHEChVLFOSsTk/S6sLABTEqrKYEsIEjzEfPyJWZJd2EiJ3zeOqWD tMTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=rOhJDP7YvbzLUfzkUoJykqNH2ZDc+/CvE5ayRQP3qIc=; b=IcQyNzxtv6ywPIoY+41kCXW2PW4BQm0r7JPC15f78shiffSO1kOt+jPxGFHlJgMbNa NxrWbUK8Qm+Aaqy9vky1Rq1+nOPRjlpcCcvhYHMZVDXST8C+yhRggRiqlXW1ya9nf3f4 5KhvKlFX+slvDIWtM9ptqsg/eOfQKSDugbs4BHejRacma/ZuNm3rh0X9F93BO3S6FpMi L3L/9c9zkpYpT7J+uI9UQKXf/n58pj3JE1m2H3ZTQO6tDQLKCs3Dz+kqk1rxblrOj9yQ nMRuSMfVpfKTBCIHqGbP0TA4CjjzAvmSXoCDCwVMBxG98z+MoodJn6PjhthuiKGpP1Wl Wdhw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d11si5387284plo.184.2019.02.06.00.56.42; Wed, 06 Feb 2019 00:56:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728615AbfBFIyR (ORCPT + 99 others); Wed, 6 Feb 2019 03:54:17 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:42299 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728278AbfBFIyR (ORCPT ); Wed, 6 Feb 2019 03:54:17 -0500 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1grIy7-00046q-CR; Wed, 06 Feb 2019 09:54:07 +0100 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1grIy5-0003KU-RK; Wed, 06 Feb 2019 09:54:05 +0100 Date: Wed, 6 Feb 2019 09:54:05 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Fabrice Gasnier Cc: Thierry Reding , jic23@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, alexandre.torgue@st.com, mcoquelin.stm32@gmail.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, vilhelm.gray@gmail.com, linux-stm32@st-md-mailman.stormreply.com, Tomasz Duszynski Subject: Re: [PATCH 2/4] pwm: stm32-lp: Add power management support Message-ID: <20190206085405.pdiwd3c6wjog5hl7@pengutronix.de> References: <1549370429-19116-1-git-send-email-fabrice.gasnier@st.com> <1549370429-19116-3-git-send-email-fabrice.gasnier@st.com> <20190205204732.zrbhgyxnvjbwfyw4@pengutronix.de> <20190205222522.GB1372@mithrandir> <6584a59b-657d-adc9-fab2-eb1a9baba05d@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6584a59b-657d-adc9-fab2-eb1a9baba05d@st.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 06, 2019 at 09:42:48AM +0100, Fabrice Gasnier wrote: > If you agree with the current approach, I can send a V2 with Tomasz's > suggestion to remove the ifdefs and use __maybe_unused instead. I think the suspend callback should have something like: if (is_still_enabled) { /* * The consumer didn't stop us, so refuse to suspend. */ dev_err(dev, "The consumer didn't stop us, so refuse to suspend.\n"); return -EBUSY; } This way there are no bad surprises if the pwm is suspended before its consumer and it's obvious what is missing. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |