[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1455038794-9921-3-git-send-email-ldewangan@nvidia.com>
Date: Tue, 9 Feb 2016 22:56:31 +0530
From: Laxman Dewangan <ldewangan@...dia.com>
To: <lee.jones@...aro.org>, <alexandre.belloni@...e-electrons.com>,
<k.kozlowski@...sung.com>, <javier@....samsung.com>,
<broonie@...nel.org>, <gregkh@...uxfoundation.org>,
<a.zummo@...ertech.it>
CC: <cw00.choi@...sung.com>, <linux-kernel@...r.kernel.org>,
<rtc-linux@...glegroups.com>,
Laxman Dewangan <ldewangan@...dia.com>
Subject: [PATCH V7 2/5] rtc: max77686: use rtc regmap to access RTC registers
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@...dia.com>
CC: Krzysztof Kozlowski <k.kozlowski@...sung.com>
CC: Javier Martinez Canillas <javier@....samsung.com>
Tested-by: Krzysztof Kozlowski <k.kozlowski@...sung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@...sung.com>
Tested-by: Javier Martinez Canillas <javier@....samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@....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
Powered by blists - more mailing lists