From: Mark Brown <broonie@kernel.org>
To: Raag Jadav <raagjadav@gmail.com>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH 1/2] regulator: act8865: operating mode and suspend state support
Date: Mon, 12 Aug 2019 12:10:11 +0100 [thread overview]
Message-ID: <20190812111011.GF4592@sirena.co.uk> (raw)
In-Reply-To: <1565423335-3213-2-git-send-email-raagjadav@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 806 bytes --]
On Sat, Aug 10, 2019 at 01:18:54PM +0530, Raag Jadav wrote:
> +static int act8865_set_mode(struct regulator_dev *rdev, unsigned int mode)
> +{
> + struct act8865 *act8865 = rdev_get_drvdata(rdev);
> + struct regmap *regmap = rdev->regmap;
> + int id = rdev_get_id(rdev);
> + int reg, ret, val = 0;
This function doesn't check if the mode is _FIXED - if it is then I'd
expect to get an error when trying to set the mode (I'm assuming that
means fixed in hardware).
> +static unsigned int act8865_get_mode(struct regulator_dev *rdev)
> +{
> + struct act8865 *act8865 = rdev_get_drvdata(rdev);
> + int id = rdev_get_id(rdev);
> +
> + if (id < ACT8865_ID_DCDC1 || id >= ACT8865_ID_MAX)
> + return -EINVAL;
> +
> + return act8865->op_mode[id];
> +}
This should be reading the value back from the hardware.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-08-12 11:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-10 7:48 [PATCH 0/2] act8865 regulator modes and suspend states Raag Jadav
2019-08-10 7:48 ` [PATCH 1/2] regulator: act8865: operating mode and suspend state support Raag Jadav
2019-08-12 11:10 ` Mark Brown [this message]
2019-08-10 7:48 ` [PATCH 2/2] dt-bindings: regulator: act8865 regulator modes and suspend states Raag Jadav
2019-08-12 11:11 ` Mark Brown
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=20190812111011.GF4592@sirena.co.uk \
--to=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=raagjadav@gmail.com \
--cc=robh+dt@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: link
Be 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).