19 Mar, 2016

1 commit

  • Pull MFD updates from Lee Jones:
    "New Drivers:
    - Freescale Touch Screen ADC
    - X-Powers AXP PMIC with RSB
    - TI TPS65086 Power Management IC (PMIC)

    New Device Support:
    - Supply device PCI IDs for Intel Broxton

    Fix-ups:
    - Move to clkdev_create() API; intel_quark_i2c_gpio
    - Complete re-write of TI's TPS65912 Power Management IC (PMIC)
    - Remove unnecessary function argument; axp20x
    - Separate out bus related code; axp20x
    - Coding Style changes; axp20x
    - Allow more drivers to be compiled as modules
    - Work around false positive 'used uninitialised' warning; db8500-prcmu

    Bug Fixes:
    - Remove do_div(); fsl-imx25-gcq
    - Fix driver init when built-in; tps65010
    - Fix clock-unregister leak; intel-lpss"

    * tag 'mfd-for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (53 commits)
    mfd: intel-lpss: Pass I2C configuration via properties on BXT
    mfd: imx6sx: Add PCIe register definitions for iomuxc gpr
    mfd: ipaq-micro: Use __maybe_unused to hide pm functions
    mfd: max77686: Add max77802 to I2C device ID table
    mfd: max77686: Export OF module alias information
    mfd: max77686: Allow driver to be built as a module
    mfd: stmpe: Add the proper PWM resources
    mfd: tps65090: Set regmap config reg counts properly
    mfd: syscon: Return ENOTSUPP instead of ENOSYS when disabled
    mfd: as3711: Set regmap config reg counts properly
    mfd: rc5t583: Set regmap config reg counts properly
    gpio: tps65086: Add GPO driver for the TPS65086 PMIC
    mfd: mt6397: Add platform device ID table
    mfd: da9063: Fix missing volatile registers in the core regmap_range volatile lists
    mfd: mt6397: Add MT6323 support to MT6397 driver
    mfd: mt6397: Add support for different Slave types
    mfd: mt6397: int_con and int_status may vary in location
    dt-bindings: mfd: Add bindings for the MediaTek MT6323 PMIC
    mfd: da9062: Fix missing volatile registers in the core regmap_range volatile lists
    mfd: Add documentation for ACT8945A DT bindings
    ...

    Linus Torvalds
     

18 Mar, 2016

1 commit

  • Pull GPIO updates from Linus Walleij:
    "This is the bulk of GPIO changes for kernel v4.6. There is quite a
    lot of interesting stuff going on.

    The patches to other subsystems and arch-wide are ACKed as far as
    possible, though I consider things like per-arch as
    essentially a part of the GPIO subsystem so it should not be needed.

    Core changes:

    - The gpio_chip is now a *real device*. Until now the gpio chips
    were just piggybacking the parent device or (gasp) floating in
    space outside of the device model.

    We now finally make GPIO chips devices. The gpio_chip will create
    a gpio_device which contains a struct device, and this gpio_device
    struct is kept private. Anything that needs to be kept private
    from the rest of the kernel will gradually be moved over to the
    gpio_device.

    - As a result of making the gpio_device a real device, we have added
    resource management, so devm_gpiochip_add_data() will cut down on
    overhead and reduce code lines. A huge slew of patches convert
    almost all drivers in the subsystem to use this.

    - Building on making the GPIO a real device, we add the first step of
    a new userspace ABI: the GPIO character device. We take small
    steps here, so we first add a pure *information* ABI and the tool
    "lsgpio" that will list all GPIO devices on the system and all
    lines on these devices.

    We can now discover GPIOs properly from userspace. We still have
    not come up with a way to actually *use* GPIOs from userspace.

    - To encourage people to use the character device for the future, we
    have it always-enabled when using GPIO. The old sysfs ABI is still
    opt-in (and can be used in parallel), but is marked as deprecated.

    We will keep it around for the foreseeable future, but it will not
    be extended to cover ever more use cases.

    Cleanup:

    - Bjorn Helgaas removed a whole slew of per-architecture
    includes.

    This dates back to when GPIO was an opt-in feature and no shared
    library even existed: just a header file with proper prototypes was
    provided and all semantics were up to the arch to implement. These
    patches make the GPIO chip even more a proper device and cleans out
    leftovers of the old in-kernel API here and there.

    Still some cruft is left but it's very little now.

    - There is still some clamping of return values for .get() going on,
    but we now return sane values in the vast majority of drivers and
    the errorpath is sanitized. Some patches for powerpc, blackfin and
    unicore still drop in.

    - We continue to switch the ARM, MIPS, blackfin, m68k local GPIO
    implementations to use gpiochip_add_data() and cut down on code
    lines.

    - MPC8xxx is converted to use the generic GPIO helpers.

    - ATH79 is converted to use the generic GPIO helpers.

    New drivers:

    - WinSystems WS16C48

    - Acces 104-DIO-48E

    - F81866 (a F7188x variant)

    - Qoric (a MPC8xxx variant)

    - TS-4800

    - SPI serializers (pisosr): simple 74xx shift registers connected to
    SPI to obtain a dirt-cheap output-only GPIO expander.

    - Texas Instruments TPIC2810

    - Texas Instruments TPS65218

    - Texas Instruments TPS65912

    - X-Gene (ARM64) standby GPIO controller"

    * tag 'gpio-v4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (194 commits)
    Revert "Share upstreaming patches"
    gpio: mcp23s08: Fix clearing of interrupt.
    gpiolib: Fix comment referring to gpio_*() in gpiod_*()
    gpio: pca953x: Fix pca953x_gpio_set_multiple() on 64-bit
    gpio: xgene: Fix kconfig for standby GIPO contoller
    gpio: Add generic serializer DT binding
    gpio: uapi: use 0xB4 as ioctl() major
    gpio: tps65912: fix bad merge
    Revert "gpio: lp3943: Drop pin_used and lp3943_gpio_request/lp3943_gpio_free"
    gpio: omap: drop dev field from gpio_bank structure
    gpio: mpc8xxx: Slightly update the code for better readability
    gpio: mpc8xxx: Remove *read_reg and *write_reg from struct mpc8xxx_gpio_chip
    gpio: mpc8xxx: Fixup setting gpio direction output
    gpio: mcp23s08: Add support for mcp23s18
    dt-bindings: gpio: altera: Fix altr,interrupt-type property
    gpio: add driver for MEN 16Z127 GPIO controller
    gpio: lp3943: Drop pin_used and lp3943_gpio_request/lp3943_gpio_free
    gpio: timberdale: Switch to devm_ioremap_resource()
    gpio: ts4800: Add IMX51 dependency
    gpiolib: rewrite gpiodev_add_to_list
    ...

    Linus Torvalds
     

16 Mar, 2016

27 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
     
  • 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
     
  • 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
     
  • 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
     
  • 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
     
  • 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
     
  • 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
     
  • Pull RTC updates from Alexandre Belloni:
    "Core:
    - New sysfs interface to set and read clock offset
    - Drivers can now be both I2C and SPI (see pcf2127 and ds3232)

    New drivers:
    - Alphascale ASM9260
    - Epson RX6110SA
    - Maxim max20024 and max77620 (in max77686)
    - Microchip PIC32
    - NXP pcf2129 (in pcf2127)

    Subsystem wide cleanups:
    - remove IRQF_EARLY_RESUME when unecessary

    Drivers:
    - ds1307: clock output, temperature sensor and wakeup-source support
    - ds1685: actually spin forever in poweroff error path
    - ds3232: many cleanups
    - ds3234: merged in ds3232
    - hym8563: fix invalid year calculation
    - max77686: many cleanups
    - max77802 merged in max77686
    - pcf2123: cleanups and offset support
    - pcf85063: cleanups
    - pcf8523: propely handle oscillator stop bit
    - rv3029: many cleanups, trickle charger and temperature sensor support
    - rv8803: convert spin_lock to mutex_lock
    - rx8025: many fixes
    - vr41xx: restore alarm_irq_enable"

    * tag 'rtc-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (86 commits)
    rtc: pcf2127: add pcf2129 device id
    rtc: pcf2127: add support for spi interface
    rtc: pcf2127: convert to use regmap
    rtc: rv3029: Add thermometer hwmon support
    rtc: rv3029: Add update_bits helper for eeprom access
    rtc: ds1685: actually spin forever in poweroff error path
    rtc: hym8563: fix invalid year calculation
    rtc: ds3232: use rtc->ops_lock to protect alarm operations
    rtc: ds3232: fix issue when irq is shared several devices
    rtc: ds3232: remove unused UIE code
    rtc: ds3232: add register access error checks
    rtc: ds3232: fix read on /dev/rtc after RTC_AIE_ON
    rtc: merge ds3232 and ds3234
    rtc: ds3232: convert to use regmap
    rtc: pxa: fix Kconfig indentation
    rtc: rv3029: Add device tree property for trickle charger
    rtc: rv3029: Add functions for EEPROM access
    rtc: rv3029: Add i2c register update-bits helper
    rtc: rv3029: Add missing register definitions
    rtc: rv3029: Add "rv3029" I2C device id
    ...

    Linus Torvalds
     

15 Mar, 2016

2 commits

  • To make RTC block of MAX77686/MAX77802 as independent driver,
    move the registration of i2c device, regmap for register access
    and irq_chip for interrupt support inside the RTC driver.
    Removed the same initialisation from MFD driver.

    Having this change will allow to reuse this driver for different
    PMIC/devices from Maxim Semiconductor if they kept same RTC IP on
    different PMIC. Some of examples as PMIC MAX77620, MAX20024 where
    same RTC IP used and hence driver for these chips will use this
    driver only for RTC support.

    Suggested-by: Krzysztof Kozlowski
    Signed-off-by: Laxman Dewangan
    Tested-by: Javier Martinez Canillas
    Reviewed-by: Javier Martinez Canillas
    Acked-by: Lee Jones
    Tested-by: Krzysztof Kozlowski
    Reviewed-by: Krzysztof Kozlowski
    Signed-off-by: Alexandre Belloni

    Laxman Dewangan
     
  • There is different RTC I2C address for RTC block in MAX77686.
    Driver is creating dummy i2c client for this address to access
    the register of this IP block.

    As there is no call to i2c_get_clientdata() for rtc_i2c client,
    there is no need to store pointer and hence removing the call
    to set client data for rtc i2c client.

    Suggested-by: Krzysztof Kozlowski
    Signed-off-by: Laxman Dewangan
    Tested-by: Krzysztof Kozlowski
    Reviewed-by: Krzysztof Kozlowski
    Tested-by: Javier Martinez Canillas
    Reviewed-by: Javier Martinez Canillas
    Acked-by: Lee Jones
    Signed-off-by: Alexandre Belloni

    Laxman Dewangan
     

09 Mar, 2016

6 commits


16 Feb, 2016

1 commit

  • Most arches have an asm/gpio.h that merely includes linux/gpio.h. The
    others select ARCH_HAVE_CUSTOM_GPIO_H, and when that's selected,
    linux/gpio.h includes asm/gpio.h.

    Therefore, code should include linux/gpio.h instead of including asm/gpio.h
    directly.

    Remove includes of asm/gpio.h, adding an include of linux/gpio.h when
    necessary.

    This is a follow-on to 7563bbf89d06 ("gpiolib/arches: Centralise
    bolierplate asm/gpio.h").

    Signed-off-by: Bjorn Helgaas
    Acked-by: Thomas Gleixner
    Acked-by: Arnd Bergmann
    Acked-by: Alexandre Courbot
    Signed-off-by: Linus Walleij

    Bjorn Helgaas
     

12 Feb, 2016

2 commits