Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1328315

[PATCH V4 3/6] rtc: max77686: use rtc regmap to access RTC registers

From Laxman Dewangan <ldewangan@nvidia.com>
Newsgroups linux.kernel
Subject [PATCH V4 3/6] rtc: max77686: use rtc regmap to access RTC registers
Date 2016-02-06 15:50 +0100
Message-ID <qZclt-bk-37@gated-at.bofh.it> (permalink)
References <qZclr-bk-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 V1:
None

Changes from V1:
None, become 3rd on series.

 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 253cf12..11f74ed 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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V4 0/6] rtc: max77686: make max77686 rtc driver as IP driver Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-06 15:50 +0100
  [PATCH V4 6/6] rtc: max77686: move initialisation of rtc regmap, irq chip locally Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-06 15:50 +0100
    Re: [PATCH V4 6/6] rtc: max77686: move initialisation of rtc regmap,  irq chip locally Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-08 11:40 +0100
      Re: [PATCH V4 6/6] rtc: max77686: move initialisation of rtc regmap,  irq chip locally Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-02-08 11:50 +0100
  [PATCH V4 4/6] rtc: max77686: avoid reference of parent device info multiple places Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-06 15:50 +0100
  [PATCH V4 5/6] mfd: max77686: do not set i2c client data for rtc i2c client Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-06 15:50 +0100
  [PATCH V4 3/6] rtc: max77686: use rtc regmap to access RTC registers Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-06 15:50 +0100
  [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-06 15:50 +0100
    Re: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Mark Brown <broonie@kernel.org> - 2016-02-08 16:00 +0100
      Re: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Mark Brown <broonie@kernel.org> - 2016-02-08 18:00 +0100
        Re: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-08 18:10 +0100
          Re: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Mark Brown <broonie@kernel.org> - 2016-02-08 19:20 +0100
            Re: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-09 06:30 +0100
              Re: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-09 10:30 +0100
      Re: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-08 18:00 +0100
  [PATCH V4 2/6] rtc: max77686: fix checkpatch error Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-06 16:00 +0100

csiph-web