1. 26 Nov, 2018 1 commit
    • Olliver Schinagl's avatar
      regulator: core: enable power when setting up constraints · 2bb16663
      Olliver Schinagl authored
      When a regulator is marked as always on, it is enabled early on, when
      checking and setting up constraints. It makes the assumption that the
      bootloader properly initialized the regulator, and just in case enables
      the regulator anyway.
      
      Some constraints however currently get missed, such as the soft-start
      and ramp-delay. This causes the regulator to be enabled, without the
      soft-start and ramp-delay being applied, which in turn can cause
      high-currents or other start-up problems.
      
      By moving the always-enabled constraints later in the constraints check,
      we can at least ensure all constraints for the regulator are followed.
      Signed-off-by: default avatarOlliver Schinagl <oliver@schinagl.nl>
      Signed-off-by: default avatarPriit Laes <plaes@plaes.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      2bb16663
  2. 20 Nov, 2018 1 commit
  3. 08 Nov, 2018 1 commit
  4. 19 Oct, 2018 2 commits
  5. 15 Oct, 2018 1 commit
  6. 12 Oct, 2018 2 commits
    • Linus Walleij's avatar
      regulator/gpio: Allow nonexclusive GPIO access · b0ce7b29
      Linus Walleij authored
      This allows nonexclusive (simultaneous) access to a single
      GPIO line for the fixed regulator enable line. This happens
      when several regulators use the same GPIO for enabling and
      disabling a regulator, and all need a handle on their GPIO
      descriptor.
      
      This solution with a special flag is not entirely elegant
      and should ideally be replaced by something more careful as
      this makes it possible for several consumers to
      enable/disable the same GPIO line to the left and right
      without any consistency. The current use inside the regulator
      core should however be fine as it takes special care to
      handle this.
      
      For the state of the GPIO backend, this is still the
      lesser evil compared to going back to global GPIO
      numbers.
      
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Jon Hunter <jonathanh@nvidia.com>
      Fixes: efdfeb07 ("regulator: fixed: Convert to use GPIO descriptor only")
      Reported-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Tested-by: default avatarJon Hunter <jonathanh@nvidia.com>
      Tested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      b0ce7b29
    • Charles Keepax's avatar
      regulator: lochnagar: Add support for the Cirrus Logic Lochnagar · bef9391c
      Charles Keepax authored
      Lochnagar is an evaluation and development board for Cirrus
      Logic Smart CODEC and Amp devices. It allows the connection of
      most Cirrus Logic devices on mini-cards, as well as allowing
      connection of various application processor systems to provide a
      full evaluation platform. This driver supports the board
      controller chip on the Lochnagar board.
      
      The Lochnagar board provides power supplies for the attached
      CODEC/Amp device. Currently this driver supports the microphone
      supplies and the digital core voltage for the attached
      device. There are some additional supplies that will be
      added in time but these supplies are sufficient for most
      systems/use-cases.
      Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      bef9391c
  7. 10 Oct, 2018 1 commit
  8. 08 Oct, 2018 2 commits
  9. 04 Oct, 2018 1 commit
  10. 02 Oct, 2018 1 commit
  11. 28 Sep, 2018 9 commits
  12. 21 Sep, 2018 1 commit
  13. 20 Sep, 2018 2 commits
  14. 19 Sep, 2018 1 commit
  15. 17 Sep, 2018 1 commit
    • Linus Walleij's avatar
      regulator: fixed: Convert to use GPIO descriptor only · efdfeb07
      Linus Walleij authored
      As we augmented the regulator core to accept a GPIO descriptor instead
      of a GPIO number, we can augment the fixed GPIO regulator to look up
      and pass that descriptor directly from device tree or board GPIO
      descriptor look up tables.
      
      Some boards just auto-enumerate their fixed regulator platform devices
      and I have assumed they get names like "fixed-regulator.0" but it's
      pretty hard to guess this. I need some testing from board maintainers to
      be sure. Other boards are straight forward, using just plain
      "fixed-regulator" (ID -1) or "fixed-regulator.1" hammering down the
      device ID.
      
      It seems the da9055 and da9211 has never got around to actually passing
      any enable gpio into its platform data (not the in-tree code anyway) so we
      can just decide to simply pass a descriptor instead.
      
      The fixed GPIO-controlled regulator in mach-pxa/ezx.c was confusingly named
      "*_dummy_supply_device" while it is a very real device backed by a GPIO
      line. There is nothing dummy about it at all, so I renamed it with the
      infix *_regulator_* as part of this patch set.
      
      Intel MID portions tested by Andy.
      
      Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Check the x86 BCM stuff
      Acked-by: Tony Lindgren <tony@atomide.com> # OMAP1,2,3 maintainer
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Reviewed-by: default avatarJanusz Krzysztofik <jmkrzyszt@gmail.com>
      Reviewed-by: default avatarMike Rapoport <rppt@linux.vnet.ibm.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      efdfeb07
  16. 04 Sep, 2018 1 commit
  17. 03 Sep, 2018 2 commits
    • Marek Szyprowski's avatar
      regulator: Fix useless O^2 complexity in suspend/resume · cd7e36ab
      Marek Szyprowski authored
      regulator_pm_ops with regulator_suspend and regulator_resume functions are
      assigned to every regulator device registered in the system, so there is no
      need to iterate over all again in them. Replace class_for_each_device()
      construction with direct operation on the rdev embedded in the given
      regulator device. This saves a lots of useless operations in suspend and
      resume paths.
      
      Fixes: f7efad10: regulator: add PM suspend and resume hooks
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      cd7e36ab
    • Marek Szyprowski's avatar
      regulator: Fix 'do-nothing' value for regulators without suspend state · 3edd79cf
      Marek Szyprowski authored
      Some regulators don't have all states defined and in such cases regulator
      core should not assume anything. However in current implementation
      of of_get_regulation_constraints() DO_NOTHING_IN_SUSPEND enable value was
      set only for regulators which had suspend node defined, otherwise the
      default 0 value was used, what means DISABLE_IN_SUSPEND. This lead to
      broken system suspend/resume on boards, which had simple regulator
      constraints definition (without suspend state nodes).
      
      To avoid further mismatches between the default and uninitialized values
      of the suspend enabled/disabled states, change the values of the them,
      so default '0' means DO_NOTHING_IN_SUSPEND.
      
      Fixes: 72069f99: regulator: leave one item to record whether regulator is enabled
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Cc: stable@vger.kernel.org
      3edd79cf
  18. 31 Aug, 2018 1 commit
    • Philipp Zabel's avatar
      regulator: da9063: fix DT probing with constraints · ef394f3f
      Philipp Zabel authored
      Commit 1c892e38 ("regulator: da9063: Handle less LDOs on DA9063L")
      reordered the da9063_regulator_info[] array, but not the DA9063_ID_*
      regulator ids and not the da9063_matches[] array, because ids are used
      as indices in the array initializer. This mismatch between regulator id
      and da9063_regulator_info[] array index causes the driver probe to fail
      because constraints from DT are not applied to the correct regulator:
      
        da9063 0-0058: Device detected (chip-ID: 0x61, var-ID: 0x50)
        DA9063_BMEM: Bringing 900000uV into 3300000-3300000uV
        DA9063_LDO9: Bringing 3300000uV into 2500000-2500000uV
        DA9063_LDO1: Bringing 900000uV into 3300000-3300000uV
        DA9063_LDO1: failed to apply 3300000-3300000uV constraint(-22)
      
      This patch reorders the DA9063_ID_* as apparently intended, and with
      them the entries in the da90630_matches[] array.
      
      Fixes: 1c892e38 ("regulator: da9063: Handle less LDOs on DA9063L")
      Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
      Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: default avatarMarek Vasut <marek.vasut@gmail.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      ef394f3f
  19. 29 Aug, 2018 1 commit
  20. 28 Aug, 2018 8 commits