LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org> To: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Cc: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, lee.jones@linaro.org, lgirdwood@gmail.com, mazziesaccount@gmail.com, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mikko.mutanen@fi.rohmeurope.com, heikki.haikola@fi.rohmeurope.com Subject: Re: [PATCH v3 6/6] regulator: bd71837: BD71837 PMIC regulator driver Date: Tue, 29 May 2018 12:47:40 +0100 [thread overview] Message-ID: <20180529114740.GG23509@sirena.org.uk> (raw) In-Reply-To: <68b0cf2c7ab5578eef2f71a33315bc8ab9a68a39.1527587295.git.matti.vaittinen@fi.rohmeurope.com> [-- Attachment #1: Type: text/plain, Size: 1410 bytes --] On Tue, May 29, 2018 at 01:02:15PM +0300, Matti Vaittinen wrote: > @@ -0,0 +1,677 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* Copyright (C) 2018 ROHM Semiconductors */ > +/* > + * bd71837-regulator.c ROHM BD71837MWV regulator driver > + */ The SPDX header (and the rest of the block) need to be C++ comments. > +static int bd71837_regulator_set_regmap(struct regulator_dev *rdev, int set) > +{ > + int ret = -EINVAL; > + struct bd71837_pmic *pmic = rdev->reg_data; > + > + /* According to the data sheet we must not change regulator voltage > + * when it is enabled. Thus we need to check if regulator is enabled > + * before changing the voltage. This mutex is used to avoid race where > + * we might enable regulator after it's state has been checked but > + * before the voltage is changed > + */ > + mutex_lock(&pmic->mtx); > + if (!set) > + ret = regulator_disable_regmap(rdev); > + else > + ret = regulator_enable_regmap(rdev); > + mutex_unlock(&pmic->mtx); > + This still has the weird locking/wrapper thing going on. The regulator core will ensure that only one operation is called on a given regulator at once. > +static const struct regulator_desc bd71837_regulators[] = { > + { > + .name = "buck1", The indentation style here is weird, please follow CodingStyle. Looks like the second level is just indented by a space for some reason, and there's similar problems elsewhere. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2018-05-29 11:47 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-05-29 9:57 [PATCH v3 0/6] mfd/regulator/clk: bd71837: ROHM BD71837 PMIC driver Matti Vaittinen 2018-05-29 9:58 ` [PATCH v3 1/6] mfd: bd71837: mfd driver for ROHM BD71837 PMIC Matti Vaittinen 2018-05-29 9:59 ` [PATCH v3 2/6] mfd: bd71837: Devicetree bindings " Matti Vaittinen 2018-05-29 10:00 ` [PATCH v3 3/6] regulator: bd71837: Devicetree bindings for BD71837 regulators Matti Vaittinen 2018-05-29 10:00 ` [PATCH v3 4/6] clk: bd71837: Devicetree bindings for ROHM BD71837 PMIC Matti Vaittinen 2018-05-29 10:01 ` [PATCH v3 5/6] clk: bd71837: Add driver for BD71837 PMIC clock Matti Vaittinen 2018-05-29 10:02 ` [PATCH v3 6/6] regulator: bd71837: BD71837 PMIC regulator driver Matti Vaittinen 2018-05-29 11:47 ` Mark Brown [this message] 2018-05-29 12:00 ` Matti Vaittinen 2018-06-05 13:58 ` Andy Shevchenko 2018-06-06 7:44 ` Matti Vaittinen
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20180529114740.GG23509@sirena.org.uk \ --to=broonie@kernel.org \ --cc=devicetree@vger.kernel.org \ --cc=heikki.haikola@fi.rohmeurope.com \ --cc=lee.jones@linaro.org \ --cc=lgirdwood@gmail.com \ --cc=linux-clk@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mark.rutland@arm.com \ --cc=matti.vaittinen@fi.rohmeurope.com \ --cc=mazziesaccount@gmail.com \ --cc=mikko.mutanen@fi.rohmeurope.com \ --cc=mturquette@baylibre.com \ --cc=robh+dt@kernel.org \ --cc=sboyd@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).