Commit 42391f7e authored by Matti Vaittinen's avatar Matti Vaittinen Committed by Lee Jones

clk: bd718x7: Add support for clk gate on ROHM BD71815 PMIC

ROHM BD71815 also provide clk signal for RTC. Add control
for gating this clock.
Signed-off-by: default avatarMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Reviewed-by: default avatarStephen Boyd <sboyd@kernel.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 1aad3900
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
#include <linux/regmap.h> #include <linux/regmap.h>
/* clk control registers */ /* clk control registers */
/* BD71815 */
#define BD71815_REG_OUT32K 0x1d
/* BD70528 */ /* BD70528 */
#define BD70528_REG_OUT32K 0x2c #define BD70528_REG_OUT32K 0x2c
/* BD71828 */ /* BD71828 */
...@@ -118,6 +120,10 @@ static int bd71837_clk_probe(struct platform_device *pdev) ...@@ -118,6 +120,10 @@ static int bd71837_clk_probe(struct platform_device *pdev)
c->reg = BD70528_REG_OUT32K; c->reg = BD70528_REG_OUT32K;
c->mask = CLK_OUT_EN_MASK; c->mask = CLK_OUT_EN_MASK;
break; break;
case ROHM_CHIP_TYPE_BD71815:
c->reg = BD71815_REG_OUT32K;
c->mask = CLK_OUT_EN_MASK;
break;
default: default:
dev_err(&pdev->dev, "Unknown clk chip\n"); dev_err(&pdev->dev, "Unknown clk chip\n");
return -EINVAL; return -EINVAL;
...@@ -146,6 +152,7 @@ static const struct platform_device_id bd718x7_clk_id[] = { ...@@ -146,6 +152,7 @@ static const struct platform_device_id bd718x7_clk_id[] = {
{ "bd71847-clk", ROHM_CHIP_TYPE_BD71847 }, { "bd71847-clk", ROHM_CHIP_TYPE_BD71847 },
{ "bd70528-clk", ROHM_CHIP_TYPE_BD70528 }, { "bd70528-clk", ROHM_CHIP_TYPE_BD70528 },
{ "bd71828-clk", ROHM_CHIP_TYPE_BD71828 }, { "bd71828-clk", ROHM_CHIP_TYPE_BD71828 },
{ "bd71815-clk", ROHM_CHIP_TYPE_BD71815 },
{ }, { },
}; };
MODULE_DEVICE_TABLE(platform, bd718x7_clk_id); MODULE_DEVICE_TABLE(platform, bd718x7_clk_id);
...@@ -161,6 +168,6 @@ static struct platform_driver bd71837_clk = { ...@@ -161,6 +168,6 @@ static struct platform_driver bd71837_clk = {
module_platform_driver(bd71837_clk); module_platform_driver(bd71837_clk);
MODULE_AUTHOR("Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>"); MODULE_AUTHOR("Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>");
MODULE_DESCRIPTION("BD71837/BD71847/BD70528 chip clk driver"); MODULE_DESCRIPTION("BD718(15/18/28/37/47/50) and BD70528 chip clk driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:bd718xx-clk"); MODULE_ALIAS("platform:bd718xx-clk");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment