1. Jul 12, 2021
  2. Jul 07, 2021
  3. Jul 01, 2021
  4. Jun 30, 2021
  5. Jun 29, 2021
  6. Jun 23, 2021
  7. Jun 22, 2021
    • Axel Lin's avatar
      regulator: hi6421v600: Fix setting wrong driver_data · 9bc146ac
      Axel Lin authored
      Current code set "config.driver_data = sreg" but sreg only init the mutex,
      the othere fields are just zero. Fix it by pass *info to config.driver_data
      so each regulator can get corresponding data by rdev_get_drvdata().
      
      Separate enable_mutex from struct hi6421_spmi_reg_info since only need one
      mutex for the driver.
      
      Fixes: d2dfd50a
      
       ("staging: hikey9xx: hi6421v600-regulator: move LDO config from DT")
      Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
      Link: https://lore.kernel.org/r/20210622043329.392072-1-axel.lin@ingics.com
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      9bc146ac
    • Mark Brown's avatar
      Merge series "regulator: qcom,rpmh-regulator: Add support for pmic available... · d1c02a74
      Mark Brown authored
      Merge series "regulator: qcom,rpmh-regulator: Add support for pmic available on SA8155p-adp board" from Bhupesh Sharma <bhupesh.sharma@linaro.org>:
      
      Changes since v2:
      -----------------
      - v2 series can be found here: https://lore.kernel.org/linux-arm-msm/20210615074543.26700-1-bhupesh.sharma@linaro.org/T/#m8303d27d561b30133992da88198abb78ea833e21
      - Addressed review comments from Bjorn and Mark.
      - As per suggestion from Bjorn, seperated the patches in different
        patchsets (specific to each subsystem) to ease review and patch application.
      
      Changes since v1:
      -----------------
      - v1 series can be found here: https://lore.kernel.org/linux-arm-msm/20210607113840.15435-1-bhupesh.sharma@linaro.org/T/#mc524fe82798d4c4fb75dd0333318955e0406ad18
      - Addressed review comments from Bjorn and Vinod received on the v1
        series.
      
      This series adds the regulator support code for SA8155p-adp board
      which is based on Qualcomm snapdragon sa8155p SoC which in turn is
      simiar to the sm8150 SoC.
      
      This board supports a new PMIC PMM8155AU.
      
      While at it, also make some cosmetic changes to the regulator driver
      and dt-bindings to make sure the compatibles are alphabetical and also
      fix issues with extra comma(s) at the end of terminator line(s).
      
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
      
      Bhupesh Sharma (5):
        dt-bindings: regulator: qcom,rpmh-regulator: Arrange compatibles
          alphabetically
        dt-bindings: regulator: qcom,rpmh-regulator: Add compatible for
          SA8155p-adp board pmic
        regulator: qcom-rpmh: Cleanup terminator line commas
        regulator: qcom-rpmh: Add terminator at the end of pm7325x_vreg_data[]
          array
        regulator: qcom-rpmh: Add new regulator found on SA8155p adp board
      
       .../regulator/qcom,rpmh-regulator.yaml        | 17 ++---
       drivers/regulator/qcom-rpmh-regulator.c       | 62 +++++++++++++++----
       2 files changed, 59 insertions(+), 20 deletions(-)
      
      --
      2.31.1
      d1c02a74
    • Mark Brown's avatar
      Merge series "Extend regulator notification support" from Matti Vaittinen... · 9d598cd7
      Mark Brown authored
      Merge series "Extend regulator notification support" from Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>:
      
      Extend regulator notification support
      
      This series extends the regulator notification and error flag support.
      Initial discussion on the topic can be found here:
      https://lore.kernel.org/lkml/6046836e22b8252983f08d5621c35ececb97820d.camel@fi.rohmeurope.com/
      
      In a nutshell - the series adds:
      
      1. WARNING level events/error flags. (Patch 3)
        Current regulator 'ERROR' event notifications for over/under
        voltage, over current and over temperature are used to indicate
        condition where monitored entity is so badly "off" that it actually
        indicates a hardware error which can not be recovered. The most
        typical hanling for that is believed to be a (graceful)
        system-shutdown. Here we add set of 'WARNING' level flags to allow
        sending notifications to consumers before things are 'that badly off'
        so that consumer drivers can implement recovery-actions.
      2. Device-tree properties for specifying limit values. (Patches 1, 5)
        Add limits for above mentioned 'ERROR' and 'WARNING' levels (which
        send notifications to consumers) and also for a 'PROTECTION' level
        (which will be used to immediately shut-down the regulator(s) W/O
        informing consumer drivers. Typically implemented by hardware).
        Property parsing is implemented in regulator core which then calls
        callback operations for limit setting from the IC drivers. A
        warning is emitted if protection is requested by device tree but the
        underlying IC does not support configuring requested protection.
      3. Helpers which can be registered by IC. (Patch 4)
        Target is to avoid implementing IRQ handling and IRQ storm protection
        in each IC driver. (Many of the ICs implementin these IRQs do not allow
        masking or acking the IRQ but keep the IRQ asserted for the whole
        duration of problem keeping the processor in IRQ handling loop).
      4. Emergency poweroff function (refactored out of the thermal_core to
        kernel/reboot.c) which is called if IC fires error IRQs but IC reading
        fails and given retry-count is exceeded. (Patches 2, 4)
        Please note that the mutex in the emergency shutdown was replaced by a
        simple atomic in order to allow call from any context.
      
      The helper was attempted to be done so it could be used to implement
      roughly same logic as is used in qcom-labibb regulator. This means
      amongst other things a safety shut-down if IC registers are not readable.
      Using these shut-down retry counters are optional. The idea is that the
      helper could be also used by simpler ICs which do not provide status
      register(s) which can be used to check if error is still active.
      
      ICs which do not have such status register can simply omit the 'renable'
      callback (and retry-counts etc) - and helper assumes the situation is Ok
      and re-enables IRQ after given time period. If problem persists the
      handler is ran again and another notification is sent - but at least the
      delay allows processor to avoid IRQ loop.
      
      Patch 7 takes this notification support in use at BD9576MUF.
      Patch 8 is related to MFD change which is not really related to the RFC
      here. It was added to this series in order to avoid potential conflicts.
      Patch 9 adds a maintainers entry.
      
      Changelog v10-RESEND:
         - rebased on v5.13-rc4
      Changelog v10:
         - rebased on v5.13-rc2
         - Move rdev_*() print macros to the internal.h and use rdev_dbg()
           from irq_helpers.c
         - Export rdev_get_name() and move it from coupler.h to driver.h for
           others to use. (It was already in coupler.h but not exported -
           usage was limited and coupler.h does not sound like optimal place
           as rdev_name is not only used by coupled regulators)
         - Send all regulator notifications from irq_helpers.c at one OR'd
           event for the sake of simplicity. For BD9576 this does not matter
           as it has own IRQ for each event case. Header defining events says
           they may be OR'd.
         - Change WARN() at protection shutdown to pr_emerg as suggested by
           Petr.
      Changelog v9:
         - rebases on v5.13-rc1
         - Update thermal documentation
         - Fix regulator notification event number
      Changelog v8:
         - split shutdown API adding and thermal core taking it in use to
           own patches.
         - replace the spinlock with atomic when ensuring the emergency
           shutdown is only called once.
      Changelog v7:
        general:
         - rebased on v5.12-rc7
         - new patch for refactoring the hw-failure reboot logic out of
           thermal_core.c for others to use.
        notification helpers:
         - fix regulator error_flags query
         - grammar/typos
         - do not BUG() but attempt to shut-down the system
         - use BITS_PER_TYPE()
      
      Changelog v6:
        Add MAINTAINERS entry
        Changes to IRQ notifiers
         - move devm functions to drivers/regulator/devres.c
         - drop irq validity check
         - use devm_add_action_or_reset()
         - fix styling issues
         - fix kerneldocs
      
      Changelog v5:
         - Fix the badly formatted pr_emerg() call.
      
      Changelog v4:
         - rebased on v5.12-rc6
         - dropped RFC
         - fix external FET DT-binding.
         - improve prints for cases when expecting HW failure.
         - styling and typos
      
      Changelog v3:
        Regulator core:
         - Fix dangling pointer access at regulator_irq_helper()
        stpmic1_regulator:
         - fix function prototype (compile error)
        bd9576-regulator:
         - Update over current limits to what was given in new data-sheet
           (REV00K)
         - Allow over-current monitoring without external FET. Set limits to
           values given in data-sheet (REV00K).
      
      Changelog v2:
        Generic:
        - rebase on v5.12-rc2 + BD9576 series
        - Split devm variant of delayed wq to own series
        Regulator framework:
        - Provide non devm variant of IRQ notification helpers
        - shorten dt-property names as suggested by Rob
        - unconditionally call map_event in IRQ handling and require it to be
          populated
        BD9576 regulators:
        - change the FET resistance property to micro-ohms
        - fix voltage computation in OC limit setting
      9d598cd7
  8. Jun 21, 2021
  9. Jun 16, 2021
  10. Jun 15, 2021