Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751456AbdGRNbw (ORCPT ); Tue, 18 Jul 2017 09:31:52 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:54220 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396AbdGRNbv (ORCPT ); Tue, 18 Jul 2017 09:31:51 -0400 Date: Tue, 18 Jul 2017 14:31:36 +0100 From: Mark Brown To: sean.wang@mediatek.com Cc: robh+dt@kernel.org, matthias.bgg@gmail.com, mark.rutland@arm.com, lgirdwood@gmail.com, jamesjj.liao@mediatek.com, henryc.chen@mediatek.com, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, chen.zhong@mediatek.com, chenglin.xu@mediatek.com, linux-kernel@vger.kernel.org Message-ID: <20170718133136.xodadxf2crkcuhze@sirena.org.uk> References: <0cd2be9a7058bb51fbbc7cc96101cba44fc081f6.1500368529.git.sean.wang@mediatek.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dfdkqc3sggxhs2dy" Content-Disposition: inline In-Reply-To: <0cd2be9a7058bb51fbbc7cc96101cba44fc081f6.1500368529.git.sean.wang@mediatek.com> X-Cookie: ASHes to ASHes, DOS to DOS. User-Agent: NeoMutt/20170609 (1.8.3) X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH v2 3/9] regulator: mt6380: Add support for MT6380 X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1198 Lines: 35 --dfdkqc3sggxhs2dy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jul 18, 2017 at 05:49:23PM +0800, sean.wang@mediatek.com wrote: > + if (!info->modeset_mask) { > + dev_err(&rdev->dev, "regulator %s doesn't support set_mode\n", > + info->desc.name); > + return -EINVAL; > + } This is mostly fine but the mode operations all have this code - if the regulator doesn't have modesetting facilities it just shouldn't have the ops so the core can handle things in a standard fashion. It'd mean defining a separate set of operations for those regulators but that's fine. --dfdkqc3sggxhs2dy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlluDbcACgkQJNaLcl1U h9B+Cwf9HSujIRg/u1J82rOg1ebZJhsoc12tnqLLt/yosdU7daQNJYsaA+GO6CaY i8YKS9YAEU7fD9zJABlwE/lHnurMS5b4qcMROMQLgnEMiBSY1q96Z6AE/Fcz8Occ JSK+bobhjz9m0qffEoagRid0z6uEr42uy1EuNxr5/Jhqx2rprghg2zIzKGdlibZC 7M263AYCl7nu+9ZRynAPab95ifF7UKgtLxyQpzLjfRi8QJirTVNBJLuie2MZO4og 1Esbl5dktqtCXvJA/bsYrhYYz0G3yGbzPGNkAPlqIYMy0Qo8T9bhWa9D7nr0lYPz kk6VUE76SjFinEt9d0KogTWWXQdTMQ== =Zjob -----END PGP SIGNATURE----- --dfdkqc3sggxhs2dy--