Re: [PATCH v2 4/5] mfd: rk808: Add RK805 support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxxxxxx>
> ---
>  drivers/clk/Kconfig |   4 +-

Acked-by: Lee Jones <lee.jones@xxxxxxxxxx>

>  drivers/mfd/Kconfig |   4 +-
>  drivers/mfd/rk808.c | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++

Comments below.

>  drivers/rtc/Kconfig |   4 +-

Acked-by: Lee Jones <lee.jones@xxxxxxxxxx>

>  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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux