• Krzysztof Kozlowski's avatar
    drivers/rtc/rtc-s5m.c: allow usage on device type different than main MFD type · 94f91922
    Krzysztof Kozlowski authored
    The RTC driver supports two flavors of S5M devices: S5M8767-like and
    S2MPS14-like.
    
    On S2MPS13 and S2MPS14 devices the RTC module is the same so we want to
    re-use the existing support of S2MPS14.  However device type was passed
    from parent MFD driver in platform data structure.  This way for the
    S2MPS13 device the main MFD driver passed device type of 'S2MPS13X'.
    
    Instead decouple detecting of device type between main MFD and RTC driver.
     This allows adding support for other S2MPS14 variations (like S2MPS11 and
    S2MPS13) easily by adding to mfd/sec-core.c:
    
    static const struct mfd_cell s2mps13_devs[] = {
    	{ .name = "s2mps14-rtc", }
    };
    Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
    Cc: Alessandro Zummo <a.zummo@towertech.it>
    Cc: Kyungmin Park <kyungmin.park@samsung.com>
    Cc: Marek Szyprowski <m.szyprowski@samsung.com>
    Cc: Chanwoo Choi <cw00.choi@samsung.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    94f91922
rtc-s5m.c 19 KB