]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mfd/rtc: s5m: do not allocate RTC I2C dummy and regmap for unsupported chipsets
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Thu, 24 Apr 2014 23:04:00 +0000 (09:04 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 30 Apr 2014 05:42:56 +0000 (15:42 +1000)
commit1d99cb608d1de05dab61fd5cc579691ac1291baf
tree791f4349e2785f47f88481dcad10050c4e33b1ab
parent1d246751cb1bfcf351053ecea7fe2deacdf55c0d
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: Lee Jones <lee.jones@linaro.org>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/mfd/sec-core.c
drivers/rtc/rtc-s5m.c
include/linux/mfd/samsung/core.h