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)
commit01ea01b35120663a8ec727566e757ea6efdbd2d1
treeab5ca0b7a3d8026689aa2fd4b49f20c2d2377f5f
parent5981804b83650de558c40769fb06f76fab31724e
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