1. 05 Feb, 2021 2 commits
    • Heikki Krogerus's avatar
      software node: Provide replacement for device_add_properties() · 151f6ff7
      Heikki Krogerus authored
      At the moment the function device_del() is calling
      device_remove_properties() unconditionally. That will result into the
      reference count of the software node attached to the device being
      decremented, and in most cases it will hit 0 at that point. So in
      practice device_del() will unregister the software node attached to
      the device, even if that was not the intention of the caller. Right
      now software nodes can not be reused or shared because of that.
      
      So device_del() can not unregister the software nodes unconditionally
      like that. Unfortunately some of the users of device_add_properties()
      are now relying on this behaviour. Because of that, and also in
      general, we do need a function that can offer similar behaviour where
      the lifetime of the software node is bound to the lifetime of the
      device. But it just has to be a separate function so the behaviour is
      optional. We can not remove the device_remove_properties() call from
      device_del() before we have that new function, and before we have
      replaced device_add_properties() calls with it in all the places that
      require that behaviour.
      
      This adds function device_create_managed_software_node() that can be
      used for exactly that purpose. Software nodes created with it are
      declared "managed", and separate handling for those nodes is added to
      the software node code. The reference count of the "managed" nodes is
      decremented when the device they are attached to is removed. This will
      not affect the other nodes that are not declared "managed".
      
      The function device_create_managed_software_node() has also one
      additional feature that device_add_properties() does not have. It
      allows the software nodes created with it to be part of a node
      hierarchy by taking also an optional parent node as parameter.
      Reviewed-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Link: https://lore.kernel.org/r/20210204141711.53775-2-heikki.krogerus@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      151f6ff7
    • Greg Kroah-Hartman's avatar
      Merge tag... · 89451aab
      Greg Kroah-Hartman authored
      Merge tag 'tag-ib-usb-typec-chrome-platform-cros-ec-typec-clear-pd-discovery-events-for-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux into usb-next
      
      Benson writes:
      
      clear-pd-discovery-events
      
      This pair of patches fixes an issue where cros_ec_typec creates stale
      cable nodes on detach because of uncleared pd discovery status events.
      
      * tag 'tag-ib-usb-typec-chrome-platform-cros-ec-typec-clear-pd-discovery-events-for-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
        platform/chrome: cros_ec_typec: Clear Type C disc events
        platform/chrome: cros_ec: Import Type C control command
      89451aab
  2. 04 Feb, 2021 6 commits
  3. 03 Feb, 2021 4 commits
  4. 02 Feb, 2021 12 commits
  5. 01 Feb, 2021 3 commits
  6. 29 Jan, 2021 13 commits