09 Sep, 2015

1 commit

  • Pull regmap updates from Mark Brown:
    "This has been a busy release for regmap.

    By far the biggest set of changes here are those from Markus Pargmann
    which implement support for block transfers in smbus devices. This
    required quite a bit of refactoring but leaves us better able to
    handle odd restrictions that controllers may have and with better
    performance on smbus.

    Other new features include:

    - Fix interactions with lockdep for nested regmaps (eg, when a device
    using regmap is connected to a bus where the bus controller has a
    separate regmap). Lockdep's default class identification is too
    crude to work without help.

    - Support for must write bitfield operations, useful for operations
    which require writing a bit to trigger them from Kuniori Morimoto.

    - Support for delaying during register patch application from Nariman
    Poushin.

    - Support for overriding cache state via the debugfs implementation
    from Richard Fitzgerald"

    * tag 'regmap-v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: (25 commits)
    regmap: fix a NULL pointer dereference in __regmap_init
    regmap: Support bulk reads for devices without raw formatting
    regmap-i2c: Add smbus i2c block support
    regmap: Add raw_write/read checks for max_raw_write/read sizes
    regmap: regmap max_raw_read/write getter functions
    regmap: Introduce max_raw_read/write for regmap_bulk_read/write
    regmap: Add missing comments about struct regmap_bus
    regmap: No multi_write support if bus->write does not exist
    regmap: Split use_single_rw internally into use_single_read/write
    regmap: Fix regmap_bulk_write for bus writes
    regmap: regmap_raw_read return error on !bus->read
    regulator: core: Print at debug level on debugfs creation failure
    regmap: Fix regmap_can_raw_write check
    regmap: fix typos in regmap.c
    regmap: Fix integertypes for register address and value
    regmap: Move documentation to regmap.h
    regmap: Use different lockdep class for each regmap init call
    thermal: sti: Add parentheses around bridge->ops->regmap_init call
    mfd: vexpress: Add parentheses around bridge->ops->regmap_init call
    regmap: debugfs: Fix misuse of IS_ENABLED
    ...

    Linus Torvalds
     

05 Sep, 2015

1 commit


30 Aug, 2015

11 commits


29 Aug, 2015

2 commits


26 Aug, 2015

3 commits

  • If memory allocation gets failed on parsing the DT, then it returns error
    '-ENOMEM' explicitly. Then, the driver exists from the _probe().

    Signed-off-by: Milo Kim
    Signed-off-by: Mark Brown

    Milo Kim
     
  • Currently, lp872x driver parses the DT and copies values into the
    'cl->dev.platform_data' if 'of_node' exists.
    This may have architectural issue. Platform data is configurable through
    the DT or I2C board info inside the platform area.
    However, lp872x driver changes this configuration when it is loaded.

    The lp872x driver should get data from the platform side and use the private
    data, 'lp872x->pdata' instead of changing the original platform data.

    Signed-off-by: Milo Kim
    Signed-off-by: Mark Brown

    Milo Kim
     
  • The I2C core always reports the MODALIAS uevent as "i2c:"
    regardless of the mechanism that was used to register the device
    (i.e: OF or board code) and the table that is used later to match
    the driver with the device (i.e: I2C id table or OF match table).

    So drivers needs to export the I2C id table and this be built into
    the module or udev won't have the necessary information to autoload
    the needed driver module when the device is added.

    But this means that OF-only drivers needs to have both OF and I2C id
    tables that have to be kept in sync and also the dev node compatible
    manufacturer prefix is stripped when reporting the MODALIAS. Which can
    lead to issues if two vendors use the same I2C device name for example.

    To avoid the above, the I2C core behavior may be changed in the future
    to not require an SPI device table for OF-only drivers and report the
    OF module alias. So, it's better to also export the OF table even when
    is unused now to prevent breaking module loading when the core changes.

    Signed-off-by: Javier Martinez Canillas
    Signed-off-by: Mark Brown

    Javier Martinez Canillas
     

22 Aug, 2015

1 commit


20 Aug, 2015

1 commit


18 Aug, 2015

2 commits


15 Aug, 2015

2 commits

  • Failure to create a debugfs node is not an error, but we print a
    warning upon failure to create the node. Downgrade this to a
    debug printk so that we're quiet here. This allows multiple
    drivers to request a CPU's regulator so that CPUfreq and AVSish
    drivers can coexist.

    The downside of this approach is that whoever gets to debugfs first
    the others who come later to not have any debugfs attributes associated
    with them.

    Signed-off-by: Stephen Boyd
    Signed-off-by: Mark Brown

    Stephen Boyd
     
  • regulator_disable of pbias always writes '0' to the enable_reg.
    However actual disable value of pbias regulator is not always '0'.
    Fix it by populating the disable_val in pbias_reg_info for the
    various platforms and assign it to the disable_val of
    pbias regulator descriptor. This will be used by
    regulator_disable_regmap while disabling pbias regulator.

    Signed-off-by: Kishon Vijay Abraham I
    Signed-off-by: Mark Brown
    Cc:

    Kishon Vijay Abraham I
     

13 Aug, 2015

1 commit


12 Aug, 2015

3 commits


07 Aug, 2015

1 commit


05 Aug, 2015

1 commit

  • This allows the module to be autoloaded.

    Together with 07949bf9c63c ("cpufreq: dt: allow driver to boot
    automatically") this is sufficient to allow a modular kernel (such
    as Debian's) to enable cpufreq on a Cubietruck.

    Signed-off-by: Ian Campbell
    Signed-off-by: Mark Brown

    Ian Campbell
     

04 Aug, 2015

2 commits


01 Aug, 2015

1 commit


29 Jul, 2015

1 commit

  • Use regmap helpers for get_voltage_sel and set_voltage_sel ops
    if the DVS GPIO is not set.

    The DVS GPIO allows on the fly selection of the VSEL register
    from two choices. However, if it is not set, the VSEL register
    will stay fixed and we can use the regmap ops. This allows use
    of the *hardware_vsel* regulator APIs.

    Signed-off-by: Mikko Perttunen
    Signed-off-by: Mark Brown

    Mikko Perttunen
     

25 Jul, 2015

3 commits


24 Jul, 2015

2 commits


23 Jul, 2015

1 commit

  • of_regulator_match.driver_data is (void *). tps6586x uses it to store an
    anonymous enum value (those TPS6586X_ID_ values).

    Later, it tries to extract the ID by casting directly to an int, which is a
    no-no ([-Wpointer-to-int-cast]):

    drivers/regulator/tps6586x-regulator.c: In function 'tps6586x_parse_regulator_dt':
    drivers/regulator/tps6586x-regulator.c:430:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    id = (int)tps6586x_matches[i].driver_data;
    ^

    Instead of casting to int, uintptr_t is better suited for receiving and
    comparing integers extracted from void *. This is especially true on
    64-bit systems where sizeof(void *) != sizeof(int).

    Signed-off-by: Daniel Kurtz
    Signed-off-by: Mark Brown

    Daniel Kurtz