[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170315110315.dekx7nhb66dmgxxe@dell>
Date: Wed, 15 Mar 2017 11:03:15 +0000
From: Lee Jones <lee.jones@...aro.org>
To: Elaine Zhang <zhangqing@...k-chips.com>
Cc: lgirdwood@...il.com, broonie@...nel.org, huangtao@...k-chips.com,
xxx@...k-chips.com, linux-rockchip@...ts.infradead.org,
linux-kernel@...r.kernel.org, chenjh@...k-chips.com,
robh+dt@...nel.org, mark.rutland@....com,
devicetree@...r.kernel.org, w.egorov@...tec.de
Subject: Re: [PATCH v2 4/5] mfd: rk808: Add RK805 support
On Fri, 10 Mar 2017, Elaine Zhang wrote:
> The RK805 chip is a Power Management IC (PMIC) for multimedia and handheld
> devices. It contains the following components:
>
> - Regulators
> - RTC
> - Clocking
>
> Both RK808 and RK805 chips are using a similar register map,
> so we can reuse the RTC and Clocking functionality.
>
> Signed-off-by: Elaine Zhang <zhangqing@...k-chips.com>
> ---
> drivers/clk/Kconfig | 4 +-
Acked-by: Lee Jones <lee.jones@...aro.org>
> drivers/mfd/Kconfig | 4 +-
> drivers/mfd/rk808.c | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++
Comments below.
> drivers/rtc/Kconfig | 4 +-
Acked-by: Lee Jones <lee.jones@...aro.org>
> 4 files changed, 123 insertions(+), 6 deletions(-)
Split this patch up into subsystems, it'll save issues.
[...]
> --- a/drivers/mfd/rk808.c
> +++ b/drivers/mfd/rk808.c
[...]
> +static void rk805_device_shutdown(void)
> +{
> + int ret;
> + struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client);
> +
> + if (!rk808) {
> + dev_warn(&rk808_i2c_client->dev,
> + "have no rk808, so do nothing here\n");
> + return;
> + }
> +
> + /* close rtc int when power off */
> + regmap_update_bits(rk808->regmap,
> + RK808_INT_STS_MSK_REG1,
> + (0x3 << 5), (0x3 << 5));
No magic numbers. Please define these.
> + regmap_update_bits(rk808->regmap,
> + RK808_RTC_INT_REG,
> + (0x3 << 2), (0x0 << 2));
No magic numbers. Please define these.
> +
> + /* pmic sleep shutdown function */
> + ret = regmap_update_bits(rk808->regmap,
> + RK805_GPIO_IO_POL_REG,
> + SLP_SD_MSK, SHUTDOWN_FUN);
> + if (ret)
> + dev_err(&rk808_i2c_client->dev, "power off error!\n");
> +}
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Powered by blists - more mailing lists