Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • include
  • linux
  • reset-controller.h
Find file BlameHistoryPermalink
  • Krzysztof Kozlowski's avatar
    reset: Instantiate reset GPIO controller for shared reset-gpios · c721f189
    Krzysztof Kozlowski authored Jan 29, 2024
    Devices sharing a reset GPIO could use the reset framework for
    coordinated handling of that shared GPIO line.  We have several cases of
    such needs, at least for Devicetree-based platforms.
    
    If Devicetree-based device requests a reset line, while "resets"
    Devicetree property is missing but there is a "reset-gpios" one,
    instantiate a new "reset-gpio" platform device which will handle such
    reset line.  This allows seamless handling of such shared reset-gpios
    without need of changing Devicetree binding [1].
    
    To avoid creating multiple "reset-gpio" platform devices, store the
    Devicetree "reset-gpios" GPIO specifiers used for new devices on a
    linked list.  Later such Devicetree GPIO specifier (phandle to GPIO
    controller, GPIO number and GPIO flags) is used to check if reset
    controller for given GPIO was already registered.
    
    If two devices have conflicting "reset-gpios" property, e.g. with
    different ACTIVE_xxx flags, this would allow to spawn two separate
    "reset-gpio" devices, where the second would fail probing on busy GPIO
    request.
    
    Link: https://lore.kernel.org/all/YXi5CUCEi7YmNxXM@robh.at.kernel.org/
    
     [1]
    Cc: Bartosz Golaszewski <brgl@bgdev.pl>
    Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
    Cc: Sean Anderson <sean.anderson@seco.com>
    Reviewed-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
    Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Acked-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
    Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Link: https://lore.kernel.org/r/20240129115216.96479-5-krzysztof.kozlowski@linaro.org
    
    
    Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
    c721f189
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7