From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Elaine Zhang <zhangqing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Cc: huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
xxx-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
w.egorov-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org,
chenjh-TNX95d0MmH7DzftRWevZcw@public.gmane.org
Subject: Re: [PATCH v2 4/5] mfd: rk808: Add RK805 support
Date: Wed, 15 Mar 2017 11:03:15 +0000 [thread overview]
Message-ID: <20170315110315.dekx7nhb66dmgxxe@dell> (raw)
In-Reply-To: <1489111252-22175-5-git-send-email-zhangqing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
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@rock-chips.com>
> ---
> drivers/clk/Kconfig | 4 +-
Acked-by: Lee Jones <lee.jones@linaro.org>
> drivers/mfd/Kconfig | 4 +-
> drivers/mfd/rk808.c | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++
Comments below.
> drivers/rtc/Kconfig | 4 +-
Acked-by: Lee Jones <lee.jones@linaro.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
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2017-03-15 11:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 2:00 [PATCH v2 0/5] rk808: Add RK805 support Elaine Zhang
2017-03-10 2:00 ` [PATCH v2 1/5] mfd: rk808: fix up the chip id get failed Elaine Zhang
[not found] ` <1489111252-22175-2-git-send-email-zhangqing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-03-15 11:04 ` Lee Jones
[not found] ` <1489111252-22175-1-git-send-email-zhangqing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-03-10 2:00 ` [PATCH v2 2/5] linux: mfd: rk808: add rk805 regs addr and ID Elaine Zhang
2017-03-15 11:04 ` Lee Jones
2017-03-10 2:00 ` [PATCH v2 3/5] regulator: rk808: Add regulator driver for RK805 Elaine Zhang
[not found] ` <1489111252-22175-4-git-send-email-zhangqing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-03-13 16:42 ` Mark Brown
2017-03-10 2:00 ` [PATCH v2 4/5] mfd: rk808: Add RK805 support Elaine Zhang
[not found] ` <1489111252-22175-5-git-send-email-zhangqing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-03-15 11:03 ` Lee Jones [this message]
2017-03-10 2:02 ` [PATCH v2 5/5] mfd: dt-bindings: Add RK805 device tree bindings document Elaine Zhang
[not found] ` <1489111376-22282-1-git-send-email-zhangqing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-03-15 11:03 ` Lee Jones
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=20170315110315.dekx7nhb66dmgxxe@dell \
--to=lee.jones-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=chenjh-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
--cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=w.egorov-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org \
--cc=xxx-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
--cc=zhangqing-TNX95d0MmH7DzftRWevZcw@public.gmane.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