]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: max77686: Use a driver data struct instead hard-coded values
authorJavier Martinez Canillas <javier@osg.samsung.com>
Wed, 27 Jan 2016 03:36:40 +0000 (00:36 -0300)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Thu, 4 Feb 2016 22:42:08 +0000 (23:42 +0100)
commita36dead53cf768cfe653181a9bd8020de5ae241b
treeab5ca0b7a3d8026689aa2fd4b49f20c2d2377f5f
parentefe0ab5db5c60602f924018d74d06021918844e5
rtc: max77686: Use a driver data struct instead hard-coded values

The driver has some hard-coded values such as the minimum delay needed
before a RTC update or the mask used for the sec/min/hour/etc registers.

Use a data structure that contains these values and pass as driver data
using the platform device ID table for each device.

This allows to make the driver's ops callbacks more generic so other RTC
that are similar but don't have the same values can also be supported.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Andi Shyti <andi.shyti@samsung.com>
Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-max77686.c