30 Oct, 2013

13 commits

  • It's ported from v3.5.7 kernel, which contains a sensor driver
    and regulator driver. It's used for E-Ink panel.

    add a parameter for mfd_add_devices() due to the propotype change.
    use IS_ERR() to check the return value for devm_regulator_get().

    Signed-off-by: Robby Cai

    Robby Cai
     
  • Need to support anatop PU regulator on/off dynamically,
    so we need to add enable/disable/is_enabled/enable_time
    for anatop regulator.

    Only PU regulator in anatop can support dynamical on/off,
    so this implement is only for PU regulator, other regulators
    are always on.

    Signed-off-by: Anson Huang

    Anson Huang
     
  • Some hardware modules need strict flows according
    to regulator's enable/disable, such as for i.MX6
    SOC's PU regulator, there is another power gate
    in GPC module, it needs to disable PU modules' clock
    before PU regulator is disabled and need to enable
    clock right after PU regulator is enabled, then it
    can do GPC's power gate operation.

    So we need to add REGULATOR_EVENT_PRE_DISABLE and
    REGULATOR_EVENT_ENABLE for regulator's notifier events.

    Signed-off-by: Anson Huang

    Anson Huang
     
  • max_register should be register count - 1.

    Signed-off-by: Axel Lin
    Reviewed-by: Robin Gong
    Signed-off-by: Mark Brown

    Axel Lin
     
  • Simplify the equation to calculate ramp_delay.
    Below equations are equivalent:
    ramp_delay = 25000 / (2 * ramp_delay);
    ramp_delay = 50000 / (4 * ramp_delay);
    ramp_delay = 25000 / (2 * ramp_delay);
    ramp_delay = 12500 / ramp_delay;
    So we don't need to read BIT6 of rdev->desc->vsel_reg for applying different
    equations.

    Also use rdev->desc->vsel_reg instead of run-time calculate register address.

    Signed-off-by: Axel Lin
    Reviewed-by: Robin Gong
    Signed-off-by: Mark Brown

    Axel Lin
     
  • Current code adjust min_uV and uV_step but missed adjusting the n_voltages
    setting.

    When BIT6 is clear:
    n_voltages = (1975000 - 400000) / 25000 + 1 = 64
    When BIT6 is set:
    n_voltages = (3300000 - 800000) / 50000 + 1 = 51

    The n_voltages needs update because when BIT6 is set 0x73 ~ 0x7f are reserved.
    When using regulator_list_voltage_linear, the n_voltages does matter here
    because wrong n_voltages setting make the equation return wrong result.
    e.g. if selector is 63, regulator_list_voltage_linear returns
    800000 + (50000 * 63) = 4000000
    It should return -EINVAL if the selector is in the range of 51 ~ 63.

    Signed-off-by: Axel Lin
    Signed-off-by: Mark Brown

    Axel Lin
     
  • All table based voltage list have ascendant order.
    Use regulator_map_voltage_ascend for them.

    Signed-off-by: Axel Lin
    Signed-off-by: Mark Brown

    Axel Lin
     
  • i2c drivers use "i2c:" prefix for module alias.

    Signed-off-by: Axel Lin
    Signed-off-by: Mark Brown

    Axel Lin
     
  • Since this is a i2c driver, use i2c_[set|get]_clientdata instead of
    dev_[set|get]_drvdata.

    Signed-off-by: Axel Lin
    Signed-off-by: Mark Brown

    Axel Lin
     
  • This fixes below build errors:

    CC [M] drivers/regulator/pfuze100-regulator.o
    drivers/regulator/pfuze100-regulator.c:342:21: error: variable 'pfuze_regmap_config' has initializer but incomplete type
    drivers/regulator/pfuze100-regulator.c:343:2: error: unknown field 'reg_bits' specified in initializer
    drivers/regulator/pfuze100-regulator.c:343:2: warning: excess elements in struct initializer [enabled by default]
    drivers/regulator/pfuze100-regulator.c:343:2: warning: (near initialization for 'pfuze_regmap_config') [enabled by default]
    drivers/regulator/pfuze100-regulator.c:344:2: error: unknown field 'val_bits' specified in initializer
    drivers/regulator/pfuze100-regulator.c:344:2: warning: excess elements in struct initializer [enabled by default]
    drivers/regulator/pfuze100-regulator.c:344:2: warning: (near initialization for 'pfuze_regmap_config') [enabled by default]
    drivers/regulator/pfuze100-regulator.c:345:2: error: unknown field 'max_register' specified in initializer
    drivers/regulator/pfuze100-regulator.c:345:2: warning: excess elements in struct initializer [enabled by default]
    drivers/regulator/pfuze100-regulator.c:345:2: warning: (near initialization for 'pfuze_regmap_config') [enabled by default]
    drivers/regulator/pfuze100-regulator.c:346:2: error: unknown field 'cache_type' specified in initializer
    drivers/regulator/pfuze100-regulator.c:346:2: warning: excess elements in struct initializer [enabled by default]
    drivers/regulator/pfuze100-regulator.c:346:2: warning: (near initialization for 'pfuze_regmap_config') [enabled by default]
    drivers/regulator/pfuze100-regulator.c: In function 'pfuze100_regulator_probe':
    drivers/regulator/pfuze100-regulator.c:370:2: error: implicit declaration of function 'devm_regmap_init_i2c' [-Werror=implicit-function-declaration]
    drivers/regulator/pfuze100-regulator.c:370:21: warning: assignment makes pointer from integer without a cast [enabled by default]
    cc1: some warnings being treated as errors
    make[2]: *** [drivers/regulator/pfuze100-regulator.o] Error 1
    make[1]: *** [drivers/regulator] Error 2
    make: *** [drivers] Error 2

    Signed-off-by: Axel Lin
    Signed-off-by: Mark Brown

    Axel Lin
     
  • Fix building error on x86_64 and i386:
    WARNING: modpost: missing MODULE_LICENSE() in
    drivers/regulator/pfuze100-regulator.o

    Signed-off-by: Robin Gong
    Signed-off-by: Mark Brown

    Robin Gong
     
  • fix building warning and correct the binding doc

    Signed-off-by: Robin Gong
    Signed-off-by: Mark Brown

    Robin Gong
     
  • Add pfuze100 regulator driver.

    Signed-off-by: Robin Gong
    Tested-by: Steffen Trumtrar
    Signed-off-by: Mark Brown

    Robin Gong
     

24 Jun, 2013

1 commit


30 May, 2013

5 commits


21 May, 2013

1 commit


10 May, 2013

1 commit

  • Pull removal of GENERIC_GPIO from Grant Likely:
    "GENERIC_GPIO now synonymous with GPIOLIB. There are no longer any
    valid cases for enableing GENERIC_GPIO without GPIOLIB, even though it
    is possible to do so which has been causing confusion and breakage.
    This branch does the work to completely eliminate GENERIC_GPIO."

    * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux:
    gpio: update gpio Chinese documentation
    Remove GENERIC_GPIO config option
    Convert selectors of GENERIC_GPIO to GPIOLIB
    blackfin: force use of gpiolib
    m68k: coldfire: use gpiolib
    mips: pnx833x: remove requirement for GENERIC_GPIO
    openrisc: default GENERIC_GPIO to false
    avr32: default GENERIC_GPIO to false
    xtensa: remove explicit selection of GENERIC_GPIO
    sh: replace CONFIG_GENERIC_GPIO by CONFIG_GPIOLIB
    powerpc: remove redundant GENERIC_GPIO selection
    unicore32: default GENERIC_GPIO to false
    unicore32: remove unneeded select GENERIC_GPIO
    arm: plat-orion: use GPIO driver on CONFIG_GPIOLIB
    arm: remove redundant GENERIC_GPIO selection
    mips: alchemy: require gpiolib
    mips: txx9: change GENERIC_GPIO to GPIOLIB
    mips: loongson: use GPIO driver on CONFIG_GPIOLIB
    mips: remove redundant GENERIC_GPIO select

    Linus Torvalds
     

08 May, 2013

1 commit

  • power_state_active_get is used only in this file. Make it static.
    While at it also move this function definition inside the
    CONFIG_REGULATOR_DEBUG macro as it is called only from within it.
    This also avoids further build warning related to unused definition.

    Signed-off-by: Sachin Kamat
    Signed-off-by: Mark Brown

    Sachin Kamat
     

02 May, 2013

1 commit


28 Apr, 2013

17 commits