From: Laxman Dewangan <ldewangan@nvidia.com>
To: <lee.jones@linaro.org>, <alexandre.belloni@free-electrons.com>,
<k.kozlowski@samsung.com>, <javier@osg.samsung.com>,
<broonie@kernel.org>, <gregkh@linuxfoundation.org>,
<a.zummo@towertech.it>
Cc: <cw00.choi@samsung.com>, <linux-kernel@vger.kernel.org>,
<rtc-linux@googlegroups.com>,
Laxman Dewangan <ldewangan@nvidia.com>
Subject: [PATCH V7 2/5] rtc: max77686: use rtc regmap to access RTC registers
Date: Tue, 9 Feb 2016 22:56:31 +0530 [thread overview]
Message-ID: <1455038794-9921-3-git-send-email-ldewangan@nvidia.com> (raw)
In-Reply-To: <1455038794-9921-1-git-send-email-ldewangan@nvidia.com>
rtc_regmap should be used to access all RTC registers instead
of parent regmap regardless of what chip or property have it.
This makes the register access uniform and extendible for other
chips.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
CC: Krzysztof Kozlowski <k.kozlowski@samsung.com>
CC: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
Changes from V1:
None, added reviewed/tested by.
Changes from V2:
None
Changes from V3:
None, become 3rd on series.
Changes from V5:
None
Changes from V6:
Make this as 2nd of series as regmap change applied independently.
drivers/rtc/rtc-max77686.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
index 7f1ca10..28330e8 100644
--- a/drivers/rtc/rtc-max77686.c
+++ b/drivers/rtc/rtc-max77686.c
@@ -370,7 +370,7 @@ static int max77686_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
goto out;
}
- ret = regmap_read(info->max77686->regmap,
+ ret = regmap_read(info->max77686->rtc_regmap,
map[REG_RTC_AE1], &val);
if (ret < 0) {
dev_err(info->dev,
@@ -426,7 +426,8 @@ static int max77686_rtc_stop_alarm(struct max77686_rtc_info *info)
goto out;
}
- ret = regmap_write(info->max77686->regmap, map[REG_RTC_AE1], 0);
+ ret = regmap_write(info->max77686->rtc_regmap,
+ map[REG_RTC_AE1], 0);
} else {
ret = regmap_bulk_read(info->max77686->rtc_regmap,
map[REG_ALARM1_SEC], data,
@@ -471,7 +472,7 @@ static int max77686_rtc_start_alarm(struct max77686_rtc_info *info)
goto out;
if (info->drv_data->alarm_enable_reg) {
- ret = regmap_write(info->max77686->regmap, map[REG_RTC_AE1],
+ ret = regmap_write(info->max77686->rtc_regmap, map[REG_RTC_AE1],
MAX77802_ALARM_ENABLE_VALUE);
} else {
ret = regmap_bulk_read(info->max77686->rtc_regmap,
--
2.1.4
next prev parent reply other threads:[~2016-02-09 17:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-09 17:26 [PATCH V7 0/5] rtc: max77686: make max77686 rtc driver as IP driver Laxman Dewangan
2016-02-09 17:26 ` [PATCH V7 1/5] rtc: max77686: fix checkpatch error Laxman Dewangan
2016-02-09 17:26 ` Laxman Dewangan [this message]
2016-02-09 17:26 ` [PATCH V7 3/5] rtc: max77686: avoid reference of parent device info multiple places Laxman Dewangan
2016-02-09 17:26 ` [PATCH V7 4/5] mfd: max77686: do not set i2c client data for rtc i2c client Laxman Dewangan
2016-02-10 16:09 ` Lee Jones
2016-02-14 23:46 ` Krzysztof Kozlowski
2016-02-09 17:26 ` [PATCH V7 5/5] rtc: max77686: move initialisation of rtc regmap, irq chip locally Laxman Dewangan
2016-02-10 16:08 ` Lee Jones
2016-02-14 23:48 ` Krzysztof Kozlowski
2016-02-16 1:09 ` [PATCH V7 0/5] rtc: max77686: make max77686 rtc driver as IP driver Alexandre Belloni
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=1455038794-9921-3-git-send-email-ldewangan@nvidia.com \
--to=ldewangan@nvidia.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=broonie@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=javier@osg.samsung.com \
--cc=k.kozlowski@samsung.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
/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
Powered by JetHome