• Hans de Goede's avatar
    mfd: Add Cherry Trail Whiskey Cove PMIC driver · de85d79f
    Hans de Goede authored
    Add mfd driver for Intel CHT Whiskey Cove PMIC, based on various non
    upstreamed CHT Whiskey Cove PMIC patches.
    
    This is a somewhat minimal version which adds irqchip support and cells
    for: ACPI PMIC opregion support, the i2c-controller driving the external
    charger irc and the pwrsrc/extcon block.
    
    Further cells can be added in the future if/when drivers are upstreamed
    for them.
    
    [The above patch caused a build error on some archetectures]
    
    From: Arnd Bergmann <arnd@arndb.de>
    
    I ran into a build error on ARM with a platform that has a non-standard
    clk implementation:
    
    drivers/clk/clk.o: In function `clk_disable':
    clk.c:(.text.clk_disable+0x0): multiple definition of `clk_disable'
    arch/arm/mach-omap1/clock.o:clock.c:(.text.clk_disable+0x0): first defined here
    drivers/clk/clk.o: In function `clk_enable':
    clk.c:(.text.clk_enable+0x0): multiple definition of `clk_enable'
    arch/arm/mach-omap1/clock.o:clock.c:(.text.clk_enable+0x0): first defined here
    
    The problem is a device driver that uses 'select COMMON_CLK', which is
    generally a bad idea: selecting a subsystem should only be done from
    a platform, otherwise we run into circular dependencies. The same driver
    also selects 'GPIOLIB' and 'I2C', which has a similar effect.
    
    This turns all three into 'depends on', as it should be.
    
    Finally, we can limit the build to x86, unless we are compile testing.
    
    First patch:
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
    
    Fix for first patch (squashed):
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
    de85d79f
intel_soc_pmic_chtwc.c 5.86 KB