1. 12 6月, 2019 20 次提交
  2. 10 6月, 2019 2 次提交
  3. 08 6月, 2019 4 次提交
  4. 03 6月, 2019 1 次提交
  5. 31 5月, 2019 1 次提交
  6. 28 5月, 2019 3 次提交
  7. 24 5月, 2019 2 次提交
  8. 21 5月, 2019 2 次提交
  9. 08 5月, 2019 1 次提交
  10. 01 5月, 2019 1 次提交
  11. 25 4月, 2019 1 次提交
    • G
      gpio: Fix gpiochip_add_data_with_key() error path · 35779890
      Geert Uytterhoeven 提交于
      The err_remove_chip block is too coarse, and may perform cleanup that
      must not be done.  E.g. if of_gpiochip_add() fails, of_gpiochip_remove()
      is still called, causing:
      
          OF: ERROR: Bad of_node_put() on /soc/gpio@e6050000
          CPU: 1 PID: 20 Comm: kworker/1:1 Not tainted 5.1.0-rc2-koelsch+ #407
          Hardware name: Generic R-Car Gen2 (Flattened Device Tree)
          Workqueue: events deferred_probe_work_func
          [<c020ec74>] (unwind_backtrace) from [<c020ae58>] (show_stack+0x10/0x14)
          [<c020ae58>] (show_stack) from [<c07c1224>] (dump_stack+0x7c/0x9c)
          [<c07c1224>] (dump_stack) from [<c07c5a80>] (kobject_put+0x94/0xbc)
          [<c07c5a80>] (kobject_put) from [<c0470420>] (gpiochip_add_data_with_key+0x8d8/0xa3c)
          [<c0470420>] (gpiochip_add_data_with_key) from [<c0473738>] (gpio_rcar_probe+0x1d4/0x314)
          [<c0473738>] (gpio_rcar_probe) from [<c052fca8>] (platform_drv_probe+0x48/0x94)
      
      and later, if a GPIO consumer tries to use a GPIO from a failed
      controller:
      
          WARNING: CPU: 0 PID: 1 at lib/refcount.c:156 kobject_get+0x38/0x4c
          refcount_t: increment on 0; use-after-free.
          Modules linked in:
          CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.1.0-rc2-koelsch+ #407
          Hardware name: Generic R-Car Gen2 (Flattened Device Tree)
          [<c020ec74>] (unwind_backtrace) from [<c020ae58>] (show_stack+0x10/0x14)
          [<c020ae58>] (show_stack) from [<c07c1224>] (dump_stack+0x7c/0x9c)
          [<c07c1224>] (dump_stack) from [<c0221580>] (__warn+0xd0/0xec)
          [<c0221580>] (__warn) from [<c02215e0>] (warn_slowpath_fmt+0x44/0x6c)
          [<c02215e0>] (warn_slowpath_fmt) from [<c07c58fc>] (kobject_get+0x38/0x4c)
          [<c07c58fc>] (kobject_get) from [<c068b3ec>] (of_node_get+0x14/0x1c)
          [<c068b3ec>] (of_node_get) from [<c0686f24>] (of_find_node_by_phandle+0xc0/0xf0)
          [<c0686f24>] (of_find_node_by_phandle) from [<c0686fbc>] (of_phandle_iterator_next+0x68/0x154)
          [<c0686fbc>] (of_phandle_iterator_next) from [<c0687fe4>] (__of_parse_phandle_with_args+0x40/0xd0)
          [<c0687fe4>] (__of_parse_phandle_with_args) from [<c0688204>] (of_parse_phandle_with_args_map+0x100/0x3ac)
          [<c0688204>] (of_parse_phandle_with_args_map) from [<c0471240>] (of_get_named_gpiod_flags+0x38/0x380)
          [<c0471240>] (of_get_named_gpiod_flags) from [<c046f864>] (gpiod_get_from_of_node+0x24/0xd8)
          [<c046f864>] (gpiod_get_from_of_node) from [<c0470aa4>] (devm_fwnode_get_index_gpiod_from_child+0xa0/0x144)
          [<c0470aa4>] (devm_fwnode_get_index_gpiod_from_child) from [<c05f425c>] (gpio_keys_probe+0x418/0x7bc)
          [<c05f425c>] (gpio_keys_probe) from [<c052fca8>] (platform_drv_probe+0x48/0x94)
      
      Fix this by splitting the cleanup block, and adding a missing call to
      gpiochip_irqchip_remove().
      
      Fixes: 28355f81 ("gpio: defer probe if pinctrl cannot be found")
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: NMukesh Ojha <mojha@codeaurora.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      35779890
  12. 23 4月, 2019 2 次提交
    • L
      gpio: ixp4xx: Add OF probing support · e4bfb0ff
      Linus Walleij 提交于
      This adds device tree probe and registration support for
      the IXP4xx GPIO driver.
      
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      e4bfb0ff
    • L
      gpio: ixp4xx: Add driver for the IXP4xx GPIO · 813e7d36
      Linus Walleij 提交于
      This adds a driver for the IXP4xx GPIO block found in
      the Intel XScale IXP4xx systems.
      
      The GPIO part of this block is pretty straight-forward and
      just uses the generic MMIO GPIO library.
      
      The irqchip side of this driver is hierarchical where
      the main irqchip will receive a processed level trigger
      in response to the edge detector of the GPIO block,
      so for this reason the v2 version of the irqdomain API
      is used (as well as in the parent IXP4xx irqchip) and
      masking, unmasking and setting up the type on IRQ
      happens on several levels.
      
      Currently this GPIO controller will grab the parent
      irqdomain using a special function, but as the platform
      move toward device tree probing, this will not be needed:
      we can just look up the parent irqdomain from the device
      tree.
      
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      813e7d36