mfd/rtc: s5m: Do not allocate RTC I2C dummy and regmap for unsupported chipsets
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Mon, 14 Apr 2014 07:40:45 +0000 (09:40 +0200)
committerLee Jones <lee.jones@linaro.org>
Tue, 3 Jun 2014 07:11:16 +0000 (08:11 +0100)
commite349c910e2398cbff59d7c58851503191a8e9157
tree0d54685f5ea382b6b99e6a7d9e2d536e2b6d06db
parenta865a589144da6dbf26750b7193a9748da159305
mfd/rtc: s5m: Do not allocate RTC I2C dummy and regmap for unsupported chipsets

The rtc-s5m driver does not support all of S2M and S5M chipsets
supported by main MFD sec-core driver. For such chipsets unsupported by
rtc-s5m, the MFD sec-core driver initialized regmap with default config.
This config in such cases wouldn't work at all.

The main MFD sec-core driver shouldn't initialize regmap for child
drivers which is not used by them and even not valid.

Move the allocation of RTC I2C dummy device and initialization of RTC
regmap from main MFD sec-core driver to the rtc-s5m driver. The rtc-s5m
driver will use proper regmap config for supported devices.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/sec-core.c
drivers/rtc/rtc-s5m.c
include/linux/mfd/samsung/core.h