All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/10] rtc: max77686: Extend driver and add max77802 support
@ 2016-01-26 19:20 ` Javier Martinez Canillas
  0 siblings, 0 replies; 68+ messages in thread
From: Javier Martinez Canillas @ 2016-01-26 19:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Kukjin Kim, rtc-linux, Chanwoo Choi, Alexandre Belloni,
	Krzysztof Kozlowski, Laxman Dewangan, linux-samsung-soc,
	Javier Martinez Canillas, Arnd Bergmann, Olof Johansson,
	linux-arm-kernel

Hello,

On a recent disussion [0] with Krzysztof Kozlowski and Laxman Dewangan,
we came to the conclusion that the max77686 and max77802 RTC are almost
the same with only a few differences so there shouldn't be two separate
drivers and is better to extend max77686 driver and delete rtc-max77802.

By making the driver more generic, other RTC IP blocks from Maxim PMICs
could be supported as well like the max77620.

This is a v3 of a series that do this, that address issues pointed out
by Krzysztof Kozlowski. The v1 and v2 can be found at [1] and [2].

I've tested this patch-set on an Exynos5800 Peach Pi Chromebook that has
a max77802 PMIC and the RTC was working correctly but I don't have a
machine with max77686 so I will really appreaciate if someone can test
that no regressions were introduced.

[0]: http://www.spinics.net/lists/devicetree/msg110348.html
[1]: https://lwn.net/Articles/672568/
[2]: https://lkml.org/lkml/2016/1/25/767

Changes in v3:
- Add Krzysztof Kozlowski's Reviewed-by and Tested-by to patch #1.
- Add Laxman Dewangan's Acked-by tag to patch #1.
- Add Krzysztof Kozlowski's Tested-by tag to patch #2.
- Add Laxman Dewangan's Acked-by tag to patch #2.
- Use ARRAY_SIZE() in all places. Suggested by Laxman Dewangan.
- Add Krzysztof Kozlowski's Tested-by tag to patch #3.
- Add Laxman Dewangan's Acked-by tag to patch #3.
- Fix max77686 delay. Suggested by Krzysztof Kozlowski.
- Assign mask to u8 instead of int. Suggested by Krzysztof Kozlowski.
- Add Laxman Dewangan's Acked-by tag to patch #4.
- Add Laxman Dewangan's Acked-by tag to patch #5.
- Add Laxman Dewangan's Acked-by tag to patch #6.
- Add Laxman Dewangan's Acked-by tag to patch #7.
- Add Laxman Dewangan's Acked-by tag to patch #8.

Changes in v2:
- Add Krzysztof Kozlowski's Reviewed-by tag to patch #2.
- Add Krzysztof Kozlowski's Reviewed-by tag to patch #3.
- Fix typo error in changelog. Suggested by Krzysztof Kozlowski.
- Add a max77686 prefix to rtc_driver_data. Suggested by Krzysztof Kozlowski.
- Comment about the .delay and .mask fields. Suggested by Krzysztof Kozlowski.
- Change .mask type to u8. Suggested by Krzysztof Kozlowski.
- Make .drv_data field const. Suggested by Krzysztof Kozlowski.
- Don't cast to drop const on .drv_data asign. Suggested by Krzysztof Kozlowski.
- Use platform_get_device_id() macro. Suggested by Krzysztof Kozlowski.
- Rename rtc_reg to max77686_rtc_reg_offset. Suggested by Krzysztof Kozlowski.
- Comment what's mapped by max77686_map. Suggested by Krzysztof Kozlowski.
- Use max77686_map array indexes in init. Suggested by Krzysztof Kozlowski.
- Remove REG_RTC_UPDATE1 since is not used by neither max77686 nor max77802.
- Add a MAX77802 prefix to ALARM_ENABLE_VALUE. Suggested by Krzysztof Kozlowski.
- Rename .rtcae to .alarm_enable_reg and .rtcrm to .separate_i2c_addr.
  Suggested by Krzysztof Kozlowski.
- Don't use func and LINE in error messages. Suggested by Krzysztof Kozlowski.
- Remove REG_RTC_AE2 since is not used by neither max77686 nor max77802.
- Check if REG_RTC_AE1 has a valid address before accessing it.
- Add Krzysztof Kozlowski's Reviewed-by tag to patch #8.
- Add Krzysztof Kozlowski's Reviewed-by tag to patch #9.
- Add Krzysztof Kozlowski's Reviewed-by tag to patch #10.

Javier Martinez Canillas (10):
  rtc: max77686: Fix max77686_rtc_read_alarm() return value
  rtc: max77686: Use ARRAY_SIZE() instead of current array length
  rtc: max77686: Use usleep_range() instead of msleep()
  rtc: max77686: Use a driver data struct instead hard-coded values
  rtc: max77686: Add an indirection level to access RTC registers
  rtc: max77686: Add max77802 support
  rtc: max77686: Use dev_warn() instead of pr_warn()
  rtc: Remove Maxim 77802 driver
  ARM: exynos_defconfig: Remove MAX77802 RTC Kconfig symbol
  ARM: multi_v7_defconfig: Remove MAX77802 RTC Kconfig symbol

 arch/arm/configs/exynos_defconfig   |   1 -
 arch/arm/configs/multi_v7_defconfig |   1 -
 drivers/rtc/Kconfig                 |  10 -
 drivers/rtc/Makefile                |   1 -
 drivers/rtc/rtc-max77686.c          | 336 +++++++++++++++++++-----
 drivers/rtc/rtc-max77802.c          | 502 ------------------------------------
 6 files changed, 270 insertions(+), 581 deletions(-)
 delete mode 100644 drivers/rtc/rtc-max77802.c

-- 
2.5.0

^ permalink raw reply	[flat|nested] 68+ messages in thread

end of thread, other threads:[~2016-01-27  2:50 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-26 19:20 [PATCH v3 00/10] rtc: max77686: Extend driver and add max77802 support Javier Martinez Canillas
2016-01-26 19:20 ` Javier Martinez Canillas
2016-01-26 19:20 ` [rtc-linux] " Javier Martinez Canillas
2016-01-26 19:20 ` [PATCH v3 01/10] rtc: max77686: Fix max77686_rtc_read_alarm() return value Javier Martinez Canillas
2016-01-26 19:20   ` [rtc-linux] " Javier Martinez Canillas
2016-01-27  1:19   ` Andi Shyti
2016-01-27  1:19     ` [rtc-linux] " Andi Shyti
2016-01-26 19:20 ` [PATCH v3 02/10] rtc: max77686: Use ARRAY_SIZE() instead of current array length Javier Martinez Canillas
2016-01-26 19:20   ` [rtc-linux] " Javier Martinez Canillas
2016-01-27  1:20   ` Andi Shyti
2016-01-27  1:20     ` [rtc-linux] " Andi Shyti
2016-01-26 19:20 ` [PATCH v3 03/10] rtc: max77686: Use usleep_range() instead of msleep() Javier Martinez Canillas
2016-01-26 19:20   ` [rtc-linux] " Javier Martinez Canillas
2016-01-27  1:21   ` Andi Shyti
2016-01-27  1:21     ` [rtc-linux] " Andi Shyti
2016-01-26 19:20 ` [PATCH v3 04/10] rtc: max77686: Use a driver data struct instead hard-coded values Javier Martinez Canillas
2016-01-26 19:20   ` [rtc-linux] " Javier Martinez Canillas
2016-01-27  1:21   ` Andi Shyti
2016-01-27  1:21     ` [rtc-linux] " Andi Shyti
2016-01-27  1:47   ` Krzysztof Kozlowski
2016-01-27  1:47     ` [rtc-linux] " Krzysztof Kozlowski
2016-01-26 19:20 ` [PATCH v3 05/10] rtc: max77686: Add an indirection level to access RTC registers Javier Martinez Canillas
2016-01-26 19:20   ` [rtc-linux] " Javier Martinez Canillas
2016-01-27  1:53   ` Krzysztof Kozlowski
2016-01-27  1:53     ` [rtc-linux] " Krzysztof Kozlowski
2016-01-26 19:20 ` [PATCH v3 06/10] rtc: max77686: Add max77802 support Javier Martinez Canillas
2016-01-26 19:20   ` [rtc-linux] " Javier Martinez Canillas
2016-01-27  1:59   ` Krzysztof Kozlowski
2016-01-27  1:59     ` [rtc-linux] " Krzysztof Kozlowski
2016-01-27  2:24     ` Javier Martinez Canillas
2016-01-27  2:24       ` Javier Martinez Canillas
2016-01-27  2:24       ` [rtc-linux] " Javier Martinez Canillas
2016-01-27  2:22   ` Andi Shyti
2016-01-27  2:22     ` [rtc-linux] " Andi Shyti
2016-01-26 19:20 ` [PATCH v3 07/10] rtc: max77686: Use dev_warn() instead of pr_warn() Javier Martinez Canillas
2016-01-26 19:20   ` [rtc-linux] " Javier Martinez Canillas
2016-01-27  1:22   ` Andi Shyti
2016-01-27  1:22     ` [rtc-linux] " Andi Shyti
2016-01-27  1:53     ` Javier Martinez Canillas
2016-01-27  1:53       ` [rtc-linux] " Javier Martinez Canillas
2016-01-27  2:05       ` Krzysztof Kozlowski
2016-01-27  2:05         ` [rtc-linux] " Krzysztof Kozlowski
2016-01-27  2:20         ` Javier Martinez Canillas
2016-01-27  2:20           ` Javier Martinez Canillas
2016-01-27  2:20           ` [rtc-linux] " Javier Martinez Canillas
2016-01-27  2:35         ` Andi Shyti
2016-01-27  2:35           ` [rtc-linux] " Andi Shyti
2016-01-27  2:42           ` Javier Martinez Canillas
2016-01-27  2:42             ` Javier Martinez Canillas
2016-01-27  2:42             ` [rtc-linux] " Javier Martinez Canillas
2016-01-27  2:46         ` Alexandre Belloni
2016-01-27  2:46           ` [rtc-linux] " Alexandre Belloni
2016-01-27  2:50           ` Javier Martinez Canillas
2016-01-27  2:50             ` Javier Martinez Canillas
2016-01-27  2:50             ` [rtc-linux] " Javier Martinez Canillas
2016-01-27  2:12       ` Andi Shyti
2016-01-27  2:12         ` [rtc-linux] " Andi Shyti
2016-01-26 19:20 ` [PATCH v3 08/10] rtc: Remove Maxim 77802 driver Javier Martinez Canillas
2016-01-26 19:20   ` [rtc-linux] " Javier Martinez Canillas
2016-01-27  1:22   ` Andi Shyti
2016-01-27  1:22     ` [rtc-linux] " Andi Shyti
2016-01-27  2:09   ` Krzysztof Kozlowski
2016-01-27  2:09     ` [rtc-linux] " Krzysztof Kozlowski
2016-01-26 19:20 ` [PATCH v3 09/10] ARM: exynos_defconfig: Remove MAX77802 RTC Kconfig symbol Javier Martinez Canillas
2016-01-26 19:20   ` [rtc-linux] " Javier Martinez Canillas
2016-01-26 19:20 ` [PATCH v3 10/10] ARM: multi_v7_defconfig: " Javier Martinez Canillas
2016-01-26 19:20   ` Javier Martinez Canillas
2016-01-26 19:20   ` [rtc-linux] " Javier Martinez Canillas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.