Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp769851imm; Fri, 13 Jul 2018 06:08:14 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfPneKxlSxPxHNCIuToBpfFJPASOChp9XMa82OU6/fxaoKpZpUSVnyivuTxl+4H/CIslF4a X-Received: by 2002:a63:b40e:: with SMTP id s14-v6mr6168082pgf.9.1531487294091; Fri, 13 Jul 2018 06:08:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531487294; cv=none; d=google.com; s=arc-20160816; b=fef7eiw92jCNrvQVTNQsN+D98YfJYy22kKLNlLCZGc2z+S9tlMOvG6iIYCvE0fkNlN XM1yz0vn3bhlb6NT+xKqd5gcibjGrIkAMtCGRdVs6GBFId1tsKc3zzoY5MmoIKu1+zvI pIFcx/6E7uSAIN4TdwfC39uMtAUf8LP4TMsauyaMlE8thCsmb1dVt4tvERKmx6l1EoIt tuipUYv0sY4IRC5bOkYTWwN5/WQ+aXCOhj1NAZmRxeB4bUCm0L7/34RM30PrJnY6NlND RwxX3KiCc6bCy+PpQy8J7Ts3R5hiqEoFlnDa5p4hvFB3oXD6mU5d1jiLDzqC3m6QQf3P 1CUg== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=EtbJ7wwwNXd18Z2WLGbB9RsHhJS/4QO61nAfiiK331c=; b=PcUrGl2bR5dms8OvVcXW73H/Uew4lVAA7wpC4gUTKQpGTksD2NzMEzyJoH2TgtTOUY SKdydLRcftwt8Kvsb9Jf6167OFnw8EW8n6xoEUpwWlqf4KAOMRO3WR8jz8yEeRgmlnkx SpbxMoVrwJohWwa0j0+8W2LUneAwqG7hyGLfTqBTlQpmpNAlU29w+u9Q9t6sz2cdMW+O K2G1SZxSXYab09MPpZpEZAyYXjubuj3JbR5z2mkv9oGF7zo7hSWeeuuYlE57m/ljIrlQ 2YuGvrCtryl2POHmNS3m+nkCU9lWVuZvOEwb2vvmUHWaqM/+aIUvFpOU1AdXKQZaDfQV +qpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=JESULyJz; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d5-v6si23478714plo.3.2018.07.13.06.07.58; Fri, 13 Jul 2018 06:08:14 -0700 (PDT) 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; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=JESULyJz; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729731AbeGMNV6 (ORCPT + 99 others); Fri, 13 Jul 2018 09:21:58 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:34082 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729175AbeGMNV5 (ORCPT ); Fri, 13 Jul 2018 09:21:57 -0400 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=EtbJ7wwwNXd18Z2WLGbB9RsHhJS/4QO61nAfiiK331c=; b=JESULyJzNXMyq342xek/7Rku+ eZVSrRJO1lV0G3xuJHTRkE+0ZeMuxf0VKCdIVfm1ukRJnTtM/CoNw2bB+4z8qZ9XqDvm8HYJjZqwG YzP33mRT/FwUSBUOhqosFFIF2k7+Q/D2Wq1YGF3JaZ5MMjpDMQEKDX0xV+omg39KKBUTQ=; Received: from 94.197.120.189.threembb.co.uk ([94.197.120.189] helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fdxn2-0005R5-PF; Fri, 13 Jul 2018 13:07:16 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id 489F0440078; Fri, 13 Jul 2018 14:07:15 +0100 (BST) Date: Fri, 13 Jul 2018 14:07:15 +0100 From: Mark Brown To: Marco Felsch Cc: lgirdwood@gmail.com, m.purski@samsung.com, p.paillet@st.com, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH] regulator: core: fix _regulator_do_disable return value Message-ID: <20180713130715.GC16228@sirena.org.uk> References: <20180713125624.13783-1-m.felsch@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="i7F3eY7HS/tUJxUd" Content-Disposition: inline In-Reply-To: <20180713125624.13783-1-m.felsch@pengutronix.de> X-Cookie: Reactor error - core dumped! User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --i7F3eY7HS/tUJxUd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jul 13, 2018 at 02:56:24PM +0200, Marco Felsch wrote: > Currently _regulator_do_disable returns 0 if either the ena_pin nor the > ops.disbale() isn't present. This assumes that the call was successful > but it wasn't because disbaling isn't supported at all. > The last case of the if-chain should return -EINVAL, because disabling > isn't supported by the driver as it is done already by > _regulator_do_enable. This is fine - consumers shouldn't expect that a disable will cause anything to actually get powered off, constraints or other consumers might mean that the disable doesn't actually happen. It's just the same as a consumer with an always on flag. --i7F3eY7HS/tUJxUd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAltIpAIACgkQJNaLcl1U h9B9mQf/ax9GM8TSDGqtJxZefWQsqlxrr+W7rvgFTQZGIl7VXnsUAsodkUTGU58F A2h920f73/Wuqz6j3aZgTna2XU/8gHF2CVsMlwp7t21TrEwdlvYFAsJ6stO//SgC EvGJauF/8YemoWMDG/4IB/DWZgTiGsgjPOsda+jExjKOkDxiEgBWHIscWA7cvqyx RtpcNlIV39S1eV9584OFV97D61XqSRayBcoPpUvfQAzBUM5VmqAq81ckNbIFIr8A LbarhKL6+xonXHK6WZI2QyVNg0LfpaJLBeOosQwJp5mZKfQrRrk+DbWkdzqs4xps glBNqM2BPIiSnSlTE1Z8oCsj1m144Q== =QqU9 -----END PGP SIGNATURE----- --i7F3eY7HS/tUJxUd--