16 Mar, 2016

33 commits

  • I2C host controller need to be configured properly in order to meet I2C
    timings specified in the I2C protocol specification. Some Intel Broxton
    based machines do not have this information in the ACPI namespace (or the
    boot firmware does not support ACPI at all) so we use build-in device
    properties instead.

    Signed-off-by: Mika Westerberg
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Lee Jones

    Mika Westerberg
     
  • This patch adds macros to define masks and bits for imx6sx
    PCIe registers. This is based on a patch by Richard Zhu.

    Signed-off-by: Christoph Fritz
    Signed-off-by: Lee Jones

    Christoph Fritz
     
  • The ipaq-micro driver uses SET_SYSTEM_SLEEP_PM_OPS() to
    remove the reference to its resume function, but does
    not use an #ifdef around the definition, so we get
    a build warning:

    drivers/mfd/ipaq-micro.c:379:12: error: 'micro_resume' defined but not used [-Werror=unused-function]

    This adds a __maybe_unused annotation so the compiler knows
    it can silently drop it instead of warning.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Lee Jones

    Arnd Bergmann
     
  • The max77686 MFD driver supports both the Maxim 77686 and Maxim 77802
    PMICs but only the OF device table contains entries for both devices.

    The max77802 entry is missing in the I2C device ID table which isn't
    a problem currently since the driver only supports DT but it will be
    needed if the driver is changed to be built as a module since the I2C
    core always reports a I2C modalias uevent so auto-load will not work.

    Signed-off-by: Javier Martinez Canillas
    Signed-off-by: Lee Jones

    Javier Martinez Canillas
     
  • When the device is registered via OF, the OF table is used to match the
    driver instead of the I2C device ID table but the entries in the latter
    are used as aliasses to load the module if the driver was not built-in.

    This is because the I2C core always reports an I2C module alias instead
    of an OF one but that could change so it is better to always export it.

    Signed-off-by: Javier Martinez Canillas
    Signed-off-by: Lee Jones

    Javier Martinez Canillas
     
  • The driver's Kconfig symbol is a boolean but nothing prevents the driver
    to be built as a module instead of built-in. It is true that most system
    integrators will choose the latter but the config should not restrict it.

    Signed-off-by: Javier Martinez Canillas
    Signed-off-by: Lee Jones

    Javier Martinez Canillas
     
  • This adds the PWM resources to the STMPE MFD driver, so that
    it can properly grab and use them.

    Signed-off-by: Linus Walleij
    Signed-off-by: Lee Jones

    Linus Walleij
     
  • Regmap config max_register field should contain number of
    device last register, however num_reg_defaults_raw field
    should be set to register count instead
    (usually one register more than max_register).

    tps65090 driver had both of these fields set to the same value,
    fix this by introducing separate defines for max register
    number and total count of registers.

    Signed-off-by: Maciej S. Szmigiero
    Signed-off-by: Lee Jones

    Maciej S. Szmigiero
     
  • When CONFIG_MFD_SYSCON is disabled, have the function stubs return
    ENOTSUPP to indicate the syscon functionality is not available.
    There are currently no callers that depend on the ENOSYS return value.

    This patchfixes a checkpatch warning:
    WARNING: ENOSYS means 'invalid syscall nr' and nothing else

    Signed-off-by: Philipp Zabel
    Signed-off-by: Lee Jones

    Philipp Zabel
     
  • Regmap config max_register field should contain number of
    device last register, however num_reg_defaults_raw field
    should be set to register count instead
    (usually one register more than max_register).

    as3711 driver had both of these fields set to the same value,
    fix this by introducing separate defines for max register
    number and total count of registers.

    Signed-off-by: Maciej S. Szmigiero
    Signed-off-by: Lee Jones

    Maciej S. Szmigiero
     
  • Regmap config max_register field should contain number of
    device last register, however num_reg_defaults_raw field
    should be set to register count instead
    (usually one register more than max_register).

    rc5t583 driver had both of these fields set to the same value,
    fix this by introducing separate defines for max register
    number and total count of registers.

    Signed-off-by: Maciej S. Szmigiero
    Signed-off-by: Lee Jones

    Maciej S. Szmigiero
     
  • Add support for the TPS65086 PMIC GPOs.

    TPS65086 has four configurable GPOs that can be used for several
    purposes. These are output only.

    Signed-off-by: Andrew F. Davis
    Reviewed-by: Linus Walleij
    Signed-off-by: Lee Jones

    Andrew F. Davis
     
  • The platform bus_type .match callback attempts to match the platform device
    name with an entry on the .id_table if provided and fallbacks to match with
    the driver's name if a table is not provided.

    Using a platform device ID to match is more explicit, allows the driver to
    support more than one device and also the MODULE_DEVICE_TABLE macro can be
    used to export the module aliases information instead of the MODULE_ALIAS.

    Signed-off-by: Javier Martinez Canillas
    Signed-off-by: Lee Jones

    Javier Martinez Canillas
     
  • Add an updated set of registers listed in the core regmap_range volatile
    ranges defined for the DA9063.

    These new registers contain bits that cannot be considered under the full
    control of software. Under various conditions the hardware will set and/or
    automatically clear bit(s) contained in these registers.

    When using a cached version of regmap, the volatility of these registers must
    be identified otherwise the regmap operations may not ensure the registers
    are explicitly altered.

    As well as updating the list of volatile registers, this change will fix a
    corner case discovered in the DA9063 ONKEY which is used by the DA9063 core.

    In the ONKEY case, the CONTROL_B register is now listed as volatile in the
    regmap_range because it contains the bit field NONKEY_LOCK. This bit can be
    altered by hardware, in which case regmap must be notified of its ability
    to be manpiulated outside of software control.

    Signed-off-by: Steve Twiss
    Signed-off-by: Lee Jones

    Steve Twiss
     
  • Signed-off-by: John Crispin
    Signed-off-by: Lee Jones

    John Crispin
     
  • Signed-off-by: John Crispin
    Signed-off-by: Lee Jones

    John Crispin
     
  • MT6323 has the INT_CON and INT_STATUS located at a different position.
    Make the registers locations configurable.

    Signed-off-by: John Crispin
    Signed-off-by: Lee Jones

    John Crispin
     
  • Signed-off-by: John Crispin
    Acked-by: Rob Herring
    Signed-off-by: Lee Jones

    John Crispin
     
  • Add an updated set of registers listed in the core regmap_range volatile
    ranges defined for the DA9062.

    These new registers contain bits that cannot be considered under the full
    control of software. Under various conditions the hardware will set and/or
    automatically clear bit(s) contained in these registers.

    When using a cached version of regmap, the volatility of these registers must
    be identified otherwise the regmap operations may not ensure the registers
    are explicitly altered.

    As well as updating the list of volatile registers, this change will fix a
    corner case discovered in the DA9063 ONKEY which is used by the DA9062 core.

    In the ONKEY case, the CONTROL_B register is now listed as volatile in the
    regmap_range because it contains the bit field NONKEY_LOCK. This bit can be
    altered by hardware, in which case regmap must be notified of its ability
    to be manpiulated outside of software control.

    Signed-off-by: Steve Twiss
    Signed-off-by: Lee Jones

    Steve Twiss
     
  • The Active-semi ACT8945A PMIC is a Multi-Function Device, it has
    two subdevices:
    - Regulator
    - Charger

    This patch adds documentation for ACT8945A DT bindings.

    Signed-off-by: Wenyou Yang
    Acked-by: Rob Herring
    Signed-off-by: Lee Jones

    Wenyou Yang
     
  • This patch adds support for the Active-semi ACT8945A PMIC.
    It is a Multi Function Device with the following subdevices:
    - Regulator
    - Charger

    It is interfaced to the host controller using I2C interface,
    ACT8945A is a child device of the I2C.

    Signed-off-by: Wenyou Yang
    Reviewed-by: Krzysztof Kozlowski
    Acked-by: Peter Korsgaard
    Signed-off-by: Lee Jones

    Wenyou Yang
     
  • s/cros_ec_register/cros_ec_query_all

    Signed-off-by: Tomeu Vizoso
    Signed-off-by: Lee Jones

    Tomeu Vizoso
     
  • MFD_ARIZONA_I2C and MFD_ARIZONA_SPI both select MFD_ARIZONA and all
    three of those select MFD_CORE, this makes the selects of MFD_CORE in
    MFD_ARIZONA_I2C and MFD_ARIZONA_SPI redundant, so we remove them.

    Signed-off-by: Charles Keepax
    Signed-off-by: Lee Jones

    Charles Keepax
     
  • My automated test is back and now can check defaults against the actual
    hardware. This patch updates the defaults array for the differences
    detected and removes a couple of completely unused registers.

    Signed-off-by: Charles Keepax
    Signed-off-by: Lee Jones

    Charles Keepax
     
  • My automated test is back and now can check defaults against the actual
    hardware. This patch updates the defaults array for the differences
    detected and removes a couple of completely unused registers.

    Signed-off-by: Charles Keepax
    Signed-off-by: Lee Jones

    Charles Keepax
     
  • My automated test is back and now can check defaults against the actual
    hardware. This patch updates the defaults array for the differences
    detected and removes a couple of completely unused registers.

    Signed-off-by: Charles Keepax
    Signed-off-by: Lee Jones

    Charles Keepax
     
  • My automated test is back and now can check defaults against the actual
    hardware. This patch updates the defaults array for the differences
    detected and removes a couple of completely unused registers.

    Signed-off-by: Charles Keepax
    Signed-off-by: Lee Jones

    Charles Keepax
     
  • The help text had a copy and paste error and refers to I2C in the SPI
    section. This patch corrects this typo.

    Signed-off-by: Charles Keepax
    Signed-off-by: Lee Jones

    Charles Keepax
     
  • syscon_regmap_config can be made const if syscon_probe() creates a local
    copy on the stack, just like syscon_register() does.

    Signed-off-by: Philipp Zabel
    Signed-off-by: Lee Jones

    Philipp Zabel
     
  • Determine the regmap max_register configuration from the io resource size
    and the reg-io-width device tree property.

    Signed-off-by: Philipp Zabel
    Acked-by: Arnd Bergmann
    Signed-off-by: Lee Jones

    Philipp Zabel
     
  • The prcmu_config_clkout() function ensures that the 'clkout' argument
    can only be '0' or '1' using an appropriate BUG_ON(), so the compiler
    should know that the div_mask, mask, and bits variables are always
    initialized later on. However, it doesn't understand this in gcc-5.2
    and produces a false positive warning instead:

    drivers/mfd/db8500-prcmu.c: In function 'prcmu_config_clkout':
    drivers/mfd/db8500-prcmu.c:762:10: error: 'div_mask' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    if (val & div_mask) {
    ^
    drivers/mfd/db8500-prcmu.c:769:13: error: 'mask' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    if ((val & mask & ~div_mask) != bits) {
    ^
    drivers/mfd/db8500-prcmu.c:757:7: error: 'bits' may be used uninitialized in this function [-Werror=maybe-uninitialized]

    Replacing the switch() statement with an equivalent if() lets
    gcc figure this out reliably and avoids the warnings.

    Signed-off-by: Arnd Bergmann
    Acked-by: Linus Walleij
    Signed-off-by: Lee Jones

    Arnd Bergmann
     
  • Add support for the TPS65912 device. It provides communication
    through I2C and contains the following components:

    - Regulators
    - Load switches
    - GPO controller

    Signed-off-by: Andrew F. Davis
    Signed-off-by: Lee Jones

    Andrew F. Davis
     
  • The TPS65086 PMIC contains several regulators and a GPO controller.
    Add bindings for the TPS65086 PMIC.

    Signed-off-by: Andrew F. Davis
    Acked-by: Rob Herring
    Signed-off-by: Lee Jones

    Andrew F. Davis
     

09 Mar, 2016

6 commits

  • Add PCI IDs for Intel Broxton B-Step platform, which have same
    LPSS devices with A-Step.

    Signed-off-by: Huiquan Zhong
    Signed-off-by: Qipeng Zha
    cked-by: Mika Westerberg
    Signed-off-by: Lee Jones

    Huiquan Zhong
     
  • These drivers can be built as module, so make them depend on I2C rather
    than I2C=y.

    Signed-off-by: Axel Lin
    Acked-by: Adam Thomson
    Signed-off-by: Lee Jones

    Axel Lin
     
  • We forgot to remove the clock tree if something goes wrong in ->probe(). Add a
    call to intel_lpss_unregister_clock() on error path in ->probe() to fix the
    potential issue.

    Fixes: 4b45efe85263 (mfd: Add support for Intel Sunrisepoint LPSS devices)
    Signed-off-by: Andy Shevchenko
    Acked-by: Mika Westerberg
    Signed-off-by: Lee Jones

    Andy Shevchenko
     
  • tps65010 driver's initcall cannot succeed when the driver is built-in,
    because it expects that the I2C probe is completed at initcall time;
    this cannot happen as MFD is initialized before I2C. Also on systems
    where the chip is not present there is unnecessary 30 ms delay during
    the boot.

    Instead of waiting for probe to finish, just register the I2C device.
    If some boards need retry mechanism for startup glitches, that should be
    done in the actual probe function. Also delete the driver banner message.

    The patch allows to use tps65010 again with OMAP1 (where it's required
    to be built-in) and enables e.g. USB and LED functionality on OMAP5912 OSK.

    Signed-off-by: Aaro Koskinen
    Signed-off-by: Lee Jones

    Aaro Koskinen
     
  • …and 'ib-mfd-regulator-gpio-4.6' into ibs-for-mfd-merged

    Lee Jones
     
  • The newly added driver uses do_div() to device a 32-bit number, which now
    provokes a warning:

    drivers/iio/adc/fsl-imx25-gcq.c: In function 'mx25_gcq_setup_cfgs':
    include/asm-generic/div64.h:207:28: warning: comparison of distinct pointer types lacks a cast
    (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \

    This replaces the do_div() call with a straight division operator.

    Signed-off-by: Arnd Bergmann
    Fixes: 6df2e98c3ea5 ("iio: adc: Add imx25-gcq ADC driver")
    Signed-off-by: Lee Jones

    Arnd Bergmann
     

12 Feb, 2016

1 commit

  • The AXP223 is a new PMIC commonly paired with Allwinner A23/A33 SoCs.
    It is functionally identical to AXP221; only the regulator default
    voltage/status and the external host interface are different.

    Signed-off-by: Chen-Yu Tsai
    Reviewed-by: Mark Brown
    Signed-off-by: Lee Jones

    Chen-Yu Tsai