1. Nov 23, 2022
  2. Nov 19, 2022
    • Mark Brown's avatar
      regulator: Add of_regulator_bulk_get_all() · db6f6ba7
      Mark Brown authored
      Merge series from Corentin Labbe <clabbe@baylibre.com>:
      
      This adds a new regulator_bulk_get_all() which grab all supplies
      properties in a DT node, for use in implementing generic handling
      for things like MDIO PHYs where the physical standardisation of
      the bus does not extend to power supplies.
      db6f6ba7
  3. Nov 18, 2022
  4. Nov 16, 2022
  5. Nov 15, 2022
  6. Nov 10, 2022
  7. Nov 04, 2022
    • Mark Brown's avatar
      regulator: Add DT support for regulator-output connectors · 3078d0c3
      Mark Brown authored
      Merge series from Zev Weiss <zev@bewilderbeest.net>:
      
      This series adds support for userspace-controlled regulator-supplied
      power outputs [2].  This is an important feature for some kinds of BMC
      (baseboard management controller) systems where the BMC provides an
      operator with manual control of a set of DC power outputs.
      
      As in a broadly similar patchset that was recently almost merged [0],
      this takes the approach of providing support by extending the existing
      userspace-consumer regulator driver.  A couple questions about the
      userspace-consumer driver came up along the way, however.
      
      First, how (if at all) is it currently being used?  It appears the
      last in-tree use of it was removed a bit over two years ago in commit
      9d323914 ("ARM: pxa: remove Compulab pxa2xx boards").  Aside from
      just adding DT support I've made a couple small tweaks to the driver
      in patch 3 that I hope are compatible with any current usage, but
      without any extant examples to look at it's kind of hard to say.
      
      Second, how critical is its support for controlling multiple
      regulators?  (i.e. its use of regulator_bulk_data and friends instead
      of a single struct regulator.)  As far as I can see every in-tree use
      of it that's ever existed has used num_supplies = 1.  If it's not
      important to retain, patch 1 of this series could be supplanted by one
      that instead simplifies the driver slightly by removing that
      functionality.
      
      The DT binding added in patch 2 is essentially identical to one I
      posted in a previous patchset that had an R-B from Rob [1], but has
      had some minor rewording and been moved from the extcon subsystem to
      the regulator subsystem.
      3078d0c3
  8. Nov 03, 2022
  9. Nov 02, 2022
  10. Oct 17, 2022
    • Linus Torvalds's avatar
      Linux 6.1-rc1 · 9abf2313
      Linus Torvalds authored
      9abf2313
    • Linus Torvalds's avatar
      Merge tag 'random-6.1-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random · f1947d7c
      Linus Torvalds authored
      Pull more random number generator updates from Jason Donenfeld:
       "This time with some large scale treewide cleanups.
      
        The intent of this pull is to clean up the way callers fetch random
        integers. The current rules for doing this right are:
      
         - If you want a secure or an insecure random u64, use get_random_u64()
      
         - If you want a secure or an insecure random u32, use get_random_u32()
      
           The old function prandom_u32() has been deprecated for a while
           now and is just a wrapper around get_random_u32(). Same for
           get_random_int().
      
         - If you want a secure or an insecure random u16, use get_random_u16()
      
         - If you want a secure or an insecure random u8, use get_random_u8()
      
         - If you want secure or insecure random bytes, use get_random_bytes().
      
           The old function prandom_bytes() has been deprecated for a while
           now and has long been a wrapper around get_random_bytes()
      
         - If you want a non-uniform random u32, u16, or u8 bounded by a
           certain open interval maximum, use prandom_u32_max()
      
           I say "non-uniform", because it doesn't do any rejection sampling
           or divisions. Hence, it stays within the prandom_*() namespace, not
           the get_random_*() namespace.
      
           I'm currently investigating a "uniform" function for 6.2. We'll see
           what comes of that.
      
        By applying these rules uniformly, we get several benefits:
      
         - By using prandom_u32_max() with an upper-bound that the compiler
           can prove at compile-time is ≤65536 or ≤256, internally
           get_random_u16() or get_random_u8() is used, which wastes fewer
           batched random bytes, and hence has higher throughput.
      
         - By using prandom_u32_max() instead of %, when the upper-bound is
           not a constant, division is still avoided, because
           prandom_u32_max() uses a faster multiplication-based trick instead.
      
         - By using get_random_u16() or get_random_u8() in cases where the
           return value is intended to indeed be a u16 or a u8, we waste fewer
           batched random bytes, and hence have higher throughput.
      
        This series was originally done by hand while I was on an airplane
        without Internet. Later, Kees and I worked on retroactively figuring
        out what could be done with Coccinelle and what had to be done
        manually, and then we split things up based on that.
      
        So while this touches a lot of files, the actual amount of code that's
        hand fiddled is comfortably small"
      
      * tag 'random-6.1-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random:
        prandom: remove unused functions
        treewide: use get_random_bytes() when possible
        treewide: use get_random_u32() when possible
        treewide: use get_random_{u8,u16}() when possible, part 2
        treewide: use get_random_{u8,u16}() when possible, part 1
        treewide: use prandom_u32_max() when possible, part 2
        treewide: use prandom_u32_max() when possible, part 1
      f1947d7c