From: Mark Brown <broonie@kernel.org>
To: Heiko Stuebner <heiko@sntech.de>
Cc: lee.jones@linaro.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
tony.xie@rock-chips.com, zhangqing@rock-chips.com,
huangtao@rock-chips.com
Subject: Re: [PATCH v8 RESEND 2/5] regulator: rk808: add RK809 and RK817 support.
Date: Mon, 3 Jun 2019 19:22:21 +0100 [thread overview]
Message-ID: <20190603182221.GA2456@sirena.org.uk> (raw)
In-Reply-To: <20190603170900.5195-3-heiko@sntech.de>
[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]
On Mon, Jun 03, 2019 at 07:08:57PM +0200, Heiko Stuebner wrote:
> default:
> - pr_warn("%s ramp_delay: %d not supported, setting 10000\n",
> - rdev->desc->name, ramp_delay);
> + dev_warn(&rdev->dev,
> + "%s ramp_delay: %d not supported, setting 10000\n",
> + rdev->desc->name, ramp_delay);
This appears to be unrelated and should've been a separate patch.
> +static int rk817_check_suspend_voltage(int id)
> +{
> + if (id >= RK817_ID_DCDC1 && id <= RK817_ID_LDO9)
> + return 0;
> + return -1;
> +}
Rather than have these checks in the implementation you should just not
define these operations for regulators that don't have the
functionality.
> +static unsigned int rk8xx_regulator_of_map_mode(unsigned int mode)
> +{
> + if (mode == 1)
> + return REGULATOR_MODE_FAST;
> + if (mode == 2)
> + return REGULATOR_MODE_NORMAL;
> +
> + return -EINVAL;
> +}
This should be written as a switch statement for clarity.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-06-03 18:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-03 17:08 [PATCH v8 RESEND 0/5] support a new rk80x pmic-variants (rk817 and rk809) Heiko Stuebner
2019-06-03 17:08 ` [PATCH RESEND v8 1/5] mfd: rk808: Add RK817 and RK809 support Heiko Stuebner
2019-06-03 17:08 ` [PATCH v8 RESEND 2/5] regulator: rk808: add RK809 and RK817 support Heiko Stuebner
2019-06-03 18:22 ` Mark Brown [this message]
2019-06-03 17:08 ` [PATCH v8 RESEND 3/5] dt-bindings: mfd: rk808: Add binding information for RK809 and RK817 Heiko Stuebner
2019-06-03 17:08 ` [PATCH v8 RESEND 4/5] rtc: rk808: add RK809 and RK817 support Heiko Stuebner
2019-06-03 17:09 ` [PATCH v8 RESEND 5/5] clk: RK808: " Heiko Stuebner
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=20190603182221.GA2456@sirena.org.uk \
--to=broonie@kernel.org \
--cc=heiko@sntech.de \
--cc=huangtao@rock-chips.com \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=tony.xie@rock-chips.com \
--cc=zhangqing@rock-chips.com \
/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