Skip to content
  1. Nov 22, 2018
    • Douglas Anderson's avatar
      regulator: core: Only count load for enabled consumers · 5451781d
      Douglas Anderson authored
      
      
      In general when the consumer of a regulator requests that the
      regulator be disabled it no longer will be drawing much load from the
      regulator--it should just be the leakage current and that should be
      very close to 0.
      
      Up to this point the regulator framework has continued to count a
      consumer's load request for disabled regulators.  This has led to code
      patterns that look like this:
      
        enable_my_thing():
          regular_set_load(reg, load_uA)
          regulator_enable(reg)
      
        disable_my_thing():
          regulator_disable(reg)
          regulator_set_load(reg, 0)
      
      Sometimes disable_my_thing() sets a nominal (<= 100 uA) load instead
      of setting a 0 uA load.  I will make the assertion that nearly all (if
      not all) places where we set a nominal load of 100 uA or less we end
      up with a result that is the same as if we had set a load of 0 uA.
      Specifically:
      - The whole point of setting the load is to help set the operating
        mode of the regulator.  Higher loads may need less efficient
        operating modes.
      - The only time this matters at all is if there is another consumer of
        the regulator that wants the regulator on.  If there are no other
        consumers of the regulator then the regulator will turn off and we
        don't care about the operating mode.
      - If there's another consumer that actually wants the regulator on
        then presumably it is requesting a load that makes our nominal
        <= 100 uA load insignificant.
      
      A quick survey of the existing callers to regulator_set_load() to see
      how everyone uses it:
      
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      5451781d
  2. Nov 21, 2018
  3. Nov 20, 2018
  4. Nov 19, 2018
  5. Nov 16, 2018
  6. Nov 14, 2018
  7. Nov 09, 2018
  8. Nov 08, 2018
    • Dmitry Osipenko's avatar
      regulator: core: Don't allow to get regulator until all couples resolved · 79d6f049
      Dmitry Osipenko authored
      
      
      Don't allow to get regulator until all of its couples resolved because
      consumer will get EPERM and coupling shall be transparent for the drivers.
      
      Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      79d6f049
    • Dmitry Osipenko's avatar
      regulator: core: Mutually resolve regulators coupling · f9503385
      Dmitry Osipenko authored
      
      
      If registered regulator found a couple, then the couple can find the
      registered regulator too and hence coupling can be mutually resolved
      at the registration time.
      
      Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      f9503385
    • Maciej Purski's avatar
      regulator: core: Change voltage setting path · 9243a195
      Maciej Purski authored
      
      
      On Odroid XU3/4 and other Exynos5422 based boards there is a case, that
      different devices on the board are supplied by different regulators
      with non-fixed voltages. If one of these devices temporarily requires
      higher voltage, there might occur a situation that the spread between
      two devices' voltages is so high, that there is a risk of changing
      'high' and 'low' states on the interconnection between devices powered
      by those regulators.
      
      Uncoupled regulators should be a special case of coupled regulators, so
      they should share a common voltage setting path. When enabling,
      disabling or setting voltage of a coupled regulator, all coupled
      regulators should be locked. Regulator's supplies should be locked, when
      setting voltage of a single regulator. Enabling a coupled regulator or
      setting its voltage should not be possible if some of its coupled
      regulators, has not been registered.
      
      Add function for locking coupled regulators and supplies. Extract
      a new function regulator_set_voltage_rdev() from
      regulator_set_voltage_unlocked(), which is called when setting
      voltage of a single regulator.
      
      Signed-off-by: default avatarMaciej Purski <m.purski@samsung.com>
      Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      9243a195
    • Maciej Purski's avatar
      regulator: core: Add voltage balancing mechanism · c054c6c7
      Maciej Purski authored
      
      
      On Odroid XU3/4 and other Exynos5422 based boards there is a case, that
      different devices on the board are supplied by different regulators
      with non-fixed voltages. If one of these devices temporarily requires
      higher voltage, there might occur a situation that the spread between
      two devices' voltages is so high, that there is a risk of changing
      'high' and 'low' states on the interconnection between devices powered
      by those regulators.
      
      Introduce new function regulator_balance_voltage(), which
      keeps max_spread constraint fulfilled between a group of coupled
      regulators. It should be called if a regulator changes its
      voltage or after disabling or enabling. Disabled regulators should
      follow changes of the enabled ones, but their consumers' demands
      shouldn't be taken into account while calculating voltage of other
      coupled regulators.
      
      Find voltages, which are closest to suiting all the consumers' demands,
      while fulfilling max_spread constraint, keeping the following rules:
      - if one regulator is about to rise its voltage, rise others
        voltages in order to keep the max_spread
      - if a regulator, which has caused rising other regulators, is
        lowered, lower other regulators if possible
      - if one regulator is about to lower its voltage, but it hasn't caused
        rising other regulators, change its voltage so that it doesn't break the
        max_spread
      
      Change regulators' voltages step by step, keeping max_spread constraint
      fulfilled all the time. Function regulator_get_optimal_voltage()
      should find the best possible change for the regulator, which doesn't
      break max_spread constraint. In function regulator_balance_voltage()
      optimize number of steps by finding highest voltage difference on
      each iteration.
      
      If a regulator, which is about to change its voltage, is not coupled,
      method regulator_get_optimal_voltage() should simply return the lowest
      voltage fulfilling consumers' demands.
      
      Coupling should be checked only if the system is in PM_SUSPEND_ON state.
      
      Signed-off-by: default avatarMaciej Purski <m.purski@samsung.com>
      Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      c054c6c7
    • Charles Keepax's avatar
      regulator: lochnagar: Explicitly include register headers · fa2bb8b9
      Charles Keepax authored
      
      
      Review of the MFD component has stated we should not include the
      register headers through lochnagar.h and thus removed them from that
      header. Explicitly include them in the end drivers manually.
      
      Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      fa2bb8b9
  9. Nov 07, 2018
  10. Nov 05, 2018
    • Linus Torvalds's avatar
      Linux 4.20-rc1 · 65102238
      Linus Torvalds authored
      65102238
    • Linus Torvalds's avatar
      Merge tag 'tags/upstream-4.20-rc1' of git://git.infradead.org/linux-ubifs · 42bd06e9
      Linus Torvalds authored
      Pull UBIFS updates from Richard Weinberger:
      
       - Full filesystem authentication feature, UBIFS is now able to have the
         whole filesystem structure authenticated plus user data encrypted and
         authenticated.
      
       - Minor cleanups
      
      * tag 'tags/upstream-4.20-rc1' of git://git.infradead.org/linux-ubifs: (26 commits)
        ubifs: Remove unneeded semicolon
        Documentation: ubifs: Add authentication whitepaper
        ubifs: Enable authentication support
        ubifs: Do not update inode size in-place in authenticated mode
        ubifs: Add hashes and HMACs to default filesystem
        ubifs: authentication: Authenticate super block node
        ubifs: Create hash for default LPT
        ubfis: authentication: Authenticate master node
        ubifs: authentication: Authenticate LPT
        ubifs: Authenticate replayed journal
        ubifs: Add auth nodes to garbage collector journal head
        ubifs: Add authentication nodes to journal
        ubifs: authentication: Add hashes to index nodes
        ubifs: Add hashes to the tree node cache
        ubifs: Create functions to embed a HMAC in a node
        ubifs: Add helper functions for authentication support
        ubifs: Add separate functions to init/crc a node
        ubifs: Format changes for authentication support
        ubifs: Store read superblock node
        ubifs: Drop write_node
        ...
      42bd06e9
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-4.20-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 4710e789
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights include:
      
        Bugfix:
         - Fix build issues on architectures that don't provide 64-bit cmpxchg
      
        Cleanups:
         - Fix a spelling mistake"
      
      * tag 'nfs-for-4.20-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFS: fix spelling mistake, EACCESS -> EACCES
        SUNRPC: Use atomic(64)_t for seq_send(64)
      4710e789
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 35e74524
      Linus Torvalds authored
      Pull more timer updates from Thomas Gleixner:
       "A set of commits for the new C-SKY architecture timers"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        dt-bindings: timer: gx6605s SOC timer
        clocksource/drivers/c-sky: Add gx6605s SOC system timer
        dt-bindings: timer: C-SKY Multi-processor timer
        clocksource/drivers/c-sky: Add C-SKY SMP timer
      35e74524
    • Linus Torvalds's avatar
      Merge tag 'ntb-4.20' of git://github.com/jonmason/ntb · 04578e84
      Linus Torvalds authored
      Pull NTB updates from Jon Mason:
       "Fairly minor changes and bug fixes:
      
        NTB IDT thermal changes and hook into hwmon, ntb_netdev clean-up of
        private struct, and a few bug fixes"
      
      * tag 'ntb-4.20' of git://github.com/jonmason/ntb:
        ntb: idt: Alter the driver info comments
        ntb: idt: Discard temperature sensor IRQ handler
        ntb: idt: Add basic hwmon sysfs interface
        ntb: idt: Alter temperature read method
        ntb_netdev: Simplify remove with client device drvdata
        NTB: transport: Try harder to alloc an aligned MW buffer
        ntb: ntb_transport: Mark expected switch fall-throughs
        ntb: idt: Set PCIe bus address to BARLIMITx
        NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks
        ntb: intel: fix return value for ndev_vec_mask()
        ntb_netdev: fix sleep time mismatch
      04578e84
  11. Nov 04, 2018
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 71e56028
      Linus Torvalds authored
      Pull scheduler fixes from Ingo Molnar:
       "A memory (under-)allocation fix and a comment fix"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/topology: Fix off by one bug
        sched/rt: Update comment in pick_next_task_rt()
      71e56028
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 601a8807
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "A number of fixes and some late updates:
      
         - make in_compat_syscall() behavior on x86-32 similar to other
           platforms, this touches a number of generic files but is not
           intended to impact non-x86 platforms.
      
         - objtool fixes
      
         - PAT preemption fix
      
         - paravirt fixes/cleanups
      
         - cpufeatures updates for new instructions
      
         - earlyprintk quirk
      
         - make microcode version in sysfs world-readable (it is already
           world-readable in procfs)
      
         - minor cleanups and fixes"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        compat: Cleanup in_compat_syscall() callers
        x86/compat: Adjust in_compat_syscall() to generic code under !COMPAT
        objtool: Support GCC 9 cold subfunction naming scheme
        x86/numa_emulation: Fix uniform-split numa emulation
        x86/paravirt: Remove unused _paravirt_ident_32
        x86/mm/pat: Disable preemption around __flush_tlb_all()
        x86/paravirt: Remove GPL from pv_ops export
        x86/traps: Use format string with panic() call
        x86: Clean up 'sizeof x' => 'sizeof(x)'
        x86/cpufeatures: Enumerate MOVDIR64B instruction
        x86/cpufeatures: Enumerate MOVDIRI instruction
        x86/earlyprintk: Add a force option for pciserial device
        objtool: Support per-function rodata sections
        x86/microcode: Make revision and processor flags world-readable
      601a8807