From: Keerthy <j-keerthy-l0cyMroinI0@public.gmane.org>
To: broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Cc: j-keerthy-l0cyMroinI0@public.gmane.org,
t-kristo-l0cyMroinI0@public.gmane.org,
tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 3/3] regulator: tps65917: Add support for SMPS12
Date: Fri, 19 May 2017 18:12:19 +0530 [thread overview]
Message-ID: <1495197739-17446-4-git-send-email-j-keerthy@ti.com> (raw)
In-Reply-To: <1495197739-17446-1-git-send-email-j-keerthy-l0cyMroinI0@public.gmane.org>
App support for SMPS12 dual phase regulator.
Signed-off-by: Keerthy <j-keerthy-l0cyMroinI0@public.gmane.org>
---
drivers/regulator/palmas-regulator.c | 18 +++++++++++++++---
include/linux/mfd/palmas.h | 2 ++
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index 31ae5ee..84df468 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -264,6 +264,13 @@
.sleep_id = TPS65917_EXTERNAL_REQSTR_ID_SMPS5,
},
{
+ .name = "SMPS12",
+ .sname = "smps1-in",
+ .vsel_addr = TPS65917_SMPS1_VOLTAGE,
+ .ctrl_addr = TPS65917_SMPS1_CTRL,
+ .sleep_id = TPS65917_EXTERNAL_REQSTR_ID_SMPS12,
+ },
+ {
.name = "LDO1",
.sname = "ldo1-in",
.vsel_addr = TPS65917_LDO1_VOLTAGE,
@@ -367,6 +374,7 @@
EXTERNAL_REQUESTOR_TPS65917(SMPS3, 1, 2),
EXTERNAL_REQUESTOR_TPS65917(SMPS4, 1, 3),
EXTERNAL_REQUESTOR_TPS65917(SMPS5, 1, 4),
+ EXTERNAL_REQUESTOR_TPS65917(SMPS12, 1, 5),
EXTERNAL_REQUESTOR_TPS65917(LDO1, 2, 0),
EXTERNAL_REQUESTOR_TPS65917(LDO2, 2, 1),
EXTERNAL_REQUESTOR_TPS65917(LDO3, 2, 2),
@@ -1305,7 +1313,8 @@ static int tps65917_smps_registration(struct palmas_pmic *pmic,
*/
desc = &pmic->desc[id];
desc->n_linear_ranges = 3;
- if ((id == TPS65917_REG_SMPS2) && pmic->smps12)
+ if ((id == TPS65917_REG_SMPS2 || id == TPS65917_REG_SMPS1) &&
+ pmic->smps12)
continue;
/* Initialise sleep/init values from platform data */
@@ -1427,6 +1436,7 @@ static int tps65917_smps_registration(struct palmas_pmic *pmic,
{ .name = "smps3", },
{ .name = "smps4", },
{ .name = "smps5", },
+ { .name = "smps12",},
{ .name = "ldo1", },
{ .name = "ldo2", },
{ .name = "ldo3", },
@@ -1455,7 +1465,7 @@ static int tps65917_smps_registration(struct palmas_pmic *pmic,
static struct palmas_pmic_driver_data tps65917_ddata = {
.smps_start = TPS65917_REG_SMPS1,
- .smps_end = TPS65917_REG_SMPS5,
+ .smps_end = TPS65917_REG_SMPS12,
.ldo_begin = TPS65917_REG_LDO1,
.ldo_end = TPS65917_REG_LDO5,
.max_reg = TPS65917_NUM_REGS,
@@ -1643,8 +1653,10 @@ static int palmas_regulators_probe(struct platform_device *pdev)
if (ret)
return ret;
- if (reg & PALMAS_SMPS_CTRL_SMPS12_SMPS123_EN)
+ if (reg & PALMAS_SMPS_CTRL_SMPS12_SMPS123_EN) {
pmic->smps123 = 1;
+ pmic->smps12 = 1;
+ }
if (reg & PALMAS_SMPS_CTRL_SMPS45_SMPS457_EN)
pmic->smps457 = 1;
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index 5c9a1d4..6dec438 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -250,6 +250,7 @@ enum tps65917_regulators {
TPS65917_REG_SMPS3,
TPS65917_REG_SMPS4,
TPS65917_REG_SMPS5,
+ TPS65917_REG_SMPS12,
/* LDO regulators */
TPS65917_REG_LDO1,
TPS65917_REG_LDO2,
@@ -317,6 +318,7 @@ enum tps65917_external_requestor_id {
TPS65917_EXTERNAL_REQSTR_ID_SMPS3,
TPS65917_EXTERNAL_REQSTR_ID_SMPS4,
TPS65917_EXTERNAL_REQSTR_ID_SMPS5,
+ TPS65917_EXTERNAL_REQSTR_ID_SMPS12,
TPS65917_EXTERNAL_REQSTR_ID_LDO1,
TPS65917_EXTERNAL_REQSTR_ID_LDO2,
TPS65917_EXTERNAL_REQSTR_ID_LDO3,
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-05-19 12:42 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-19 12:42 [PATCH 0/3] mfd: lp87565: Add lp87565 PMIC support Keerthy
2017-05-19 12:42 ` [PATCH 1/3] " Keerthy
[not found] ` <1495197739-17446-2-git-send-email-j-keerthy-l0cyMroinI0@public.gmane.org>
2017-05-19 15:42 ` Andrew F. Davis
[not found] ` <f6a16fe0-4212-bc73-090c-351b189ed864-l0cyMroinI0@public.gmane.org>
2017-05-22 4:23 ` Keerthy
2017-05-23 3:08 ` Keerthy
[not found] ` <f62f225b-931e-c68b-4e59-243c0c0b0d02-l0cyMroinI0@public.gmane.org>
2017-05-23 6:56 ` Lee Jones
2017-05-22 17:48 ` Lee Jones
2017-05-23 2:35 ` Keerthy
[not found] ` <26169872-1b43-88d1-3e5b-367b4d446222-l0cyMroinI0@public.gmane.org>
2017-05-23 3:00 ` Keerthy
2017-05-23 6:57 ` Lee Jones
2017-05-23 7:41 ` Keerthy
[not found] ` <a753fdb4-feb9-0894-6f40-a19d3f05714c-l0cyMroinI0@public.gmane.org>
2017-05-23 7:58 ` Keerthy
2017-05-23 8:47 ` Lee Jones
2017-05-23 9:53 ` Keerthy
2017-05-23 8:45 ` Lee Jones
2017-05-23 10:11 ` Keerthy
[not found] ` <ce83f605-879b-dee0-d09e-63d01a7f66c7-l0cyMroinI0@public.gmane.org>
2017-05-23 12:21 ` Keerthy
2017-05-23 15:39 ` Lee Jones
[not found] ` <1495197739-17446-1-git-send-email-j-keerthy-l0cyMroinI0@public.gmane.org>
2017-05-19 12:42 ` [PATCH 2/3] regulator: lp87565: Add support for lp87565 PMIC regulators Keerthy
[not found] ` <1495197739-17446-3-git-send-email-j-keerthy-l0cyMroinI0@public.gmane.org>
2017-05-19 15:53 ` Andrew F. Davis
[not found] ` <d7637719-a3f8-b711-f773-75ec5da8880b-l0cyMroinI0@public.gmane.org>
2017-05-22 4:28 ` Keerthy
2017-05-19 12:42 ` Keerthy [this message]
2017-05-22 17:41 ` [PATCH 3/3] regulator: tps65917: Add support for SMPS12 Lee Jones
2017-05-26 11:42 ` Applied "regulator: tps65917: Add support for SMPS12" to the regulator tree Mark Brown
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=1495197739-17446-4-git-send-email-j-keerthy@ti.com \
--to=j-keerthy-l0cymroini0@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=t-kristo-l0cyMroinI0@public.gmane.org \
--cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@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;
as well as URLs for NNTP newsgroup(s).