[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200117102854.GF15507@dell>
Date: Fri, 17 Jan 2020 10:28:54 +0000
From: Lee Jones <lee.jones@...aro.org>
To: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
Cc: mazziesaccount@...il.com,
Jacek Anaszewski <jacek.anaszewski@...il.com>,
Pavel Machek <pavel@....cz>, Dan Murphy <dmurphy@...com>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Alessandro Zummo <a.zummo@...ertech.it>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
linux-leds@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org,
linux-gpio@...r.kernel.org, linux-rtc@...r.kernel.org
Subject: Re: [PATCH v10 08/13] regulator: bd718x7: Split driver to common and
bd718x7 specific parts
On Fri, 17 Jan 2020, Matti Vaittinen wrote:
> Few ROHM PMICs allow setting the voltage states for different system states
> like RUN, IDLE, SUSPEND and LPSR. States are then changed via SoC specific
> mechanisms. bd718x7 driver implemented device-tree parsing functions for
> these state specific voltages. The parsing functions can be re-used by
> other ROHM chip drivers like bd71828. Split the generic functions from
> bd718x7-regulator.c to rohm-regulator.c and export them for other modules
> to use.
>
> Signed-off-by: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
> Acked-by: Mark Brown <broonie@...nel.org>
> ---
> no changes since v9
>
> drivers/regulator/Kconfig | 4 +
> drivers/regulator/Makefile | 1 +
> drivers/regulator/bd718x7-regulator.c | 183 ++++++++------------------
> drivers/regulator/rohm-regulator.c | 95 +++++++++++++
> include/linux/mfd/rohm-generic.h | 66 ++++++++++
> 5 files changed, 221 insertions(+), 128 deletions(-)
> create mode 100644 drivers/regulator/rohm-regulator.c
[...]
> diff --git a/include/linux/mfd/rohm-generic.h b/include/linux/mfd/rohm-generic.h
> index ff3dd7578fd3..6cc5a0819959 100644
> --- a/include/linux/mfd/rohm-generic.h
> +++ b/include/linux/mfd/rohm-generic.h
> @@ -4,6 +4,9 @@
> #ifndef __LINUX_MFD_ROHM_H__
> #define __LINUX_MFD_ROHM_H__
>
> +#include <linux/regmap.h>
> +#include <linux/regulator/driver.h>
> +
> enum rohm_chip_type {
> ROHM_CHIP_TYPE_BD71837 = 0,
> ROHM_CHIP_TYPE_BD71847,
> @@ -17,4 +20,67 @@ struct rohm_regmap_dev {
> struct regmap *regmap;
> };
>
> +enum {
> + ROHM_DVS_LEVEL_UNKNOWN,
> + ROHM_DVS_LEVEL_RUN,
> + ROHM_DVS_LEVEL_IDLE,
> + ROHM_DVS_LEVEL_SUSPEND,
> + ROHM_DVS_LEVEL_LPSR,
> +#define ROHM_DVS_LEVEL_MAX ROHM_DVS_LEVEL_LPSR
Haven't seen this before. Is it legit?
What about:
ROHM_DVS_LEVEL_MAX = ROHM_DVS_LEVEL_LPSR
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Powered by blists - more mailing lists