1. 16 1月, 2015 1 次提交
  2. 09 1月, 2015 1 次提交
  3. 12 12月, 2014 1 次提交
  4. 04 12月, 2014 2 次提交
  5. 03 12月, 2014 2 次提交
  6. 02 12月, 2014 1 次提交
  7. 28 11月, 2014 4 次提交
  8. 27 11月, 2014 8 次提交
  9. 26 11月, 2014 1 次提交
  10. 11 11月, 2014 1 次提交
  11. 06 11月, 2014 1 次提交
  12. 05 11月, 2014 4 次提交
    • R
      ACPI / GPIO: Driver GPIO mappings for ACPI GPIOs · f028d524
      Rafael J. Wysocki 提交于
      Provide a way for device drivers using GPIOs described by ACPI
      GpioIo resources in _CRS to tell the GPIO subsystem what names
      (connection IDs) to associate with specific GPIO pins defined
      in there.
      
      To do that, a driver needs to define a mapping table as a
      NULL-terminated array of struct acpi_gpio_mapping objects
      that each contain a name, a pointer to an array of line data
      (struct acpi_gpio_params) objects and the size of that array.
      
      Each struct acpi_gpio_params object consists of three fields,
      crs_entry_index, line_index, active_low, representing the index of
      the target GpioIo()/GpioInt() resource in _CRS starting from zero,
      the index of the target line in that resource starting from zero,
      and the active-low flag for that line, respectively.
      
      Next, the mapping table needs to be passed as the second
      argument to acpi_dev_add_driver_gpios() that will register it with
      the ACPI device object pointed to by its first argument.  That
      should be done in the driver's .probe() routine.
      
      On removal, the driver should unregister its GPIO mapping table
      by calling acpi_dev_remove_driver_gpios() on the ACPI device
      object where that table was previously registered.
      
      Included are fixes from Mika Westerberg.
      Acked-by: NAlexandre Courbot <acourbot@nvidia.com>
      Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      f028d524
    • M
      gpio: Support for unified device properties interface · 40b73183
      Mika Westerberg 提交于
      Some drivers need to deal with only firmware representation of its
      GPIOs. An example would be a GPIO button array driver where each button
      is described as a separate firmware node in device tree. Typically these
      child nodes do not have physical representation in the Linux device
      model.
      
      In order to help device drivers to handle such firmware child nodes we
      add dev[m]_get_named_gpiod_from_child() that takes a child firmware
      node pointer as its second argument (the first one is the parent device
      itself), finds the GPIO using whatever is the underlying firmware
      method, and requests the GPIO properly.
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Acked-by: NAlexandre Courbot <acourbot@nvidia.com>
      Acked-by: NGrant Likely <grant.likely@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      40b73183
    • M
      gpio: sch: Consolidate core and resume banks · c479ff09
      Mika Westerberg 提交于
      This is actually a single device with two sets of identical registers,
      which just happen to start from a different offset. Instead of having
      separate GPIO chips created we consolidate them to be single GPIO chip.
      
      In addition having a single GPIO chip allows us to handle ACPI GPIO
      translation in the core in a more generic way, since the two GPIO chips
      share the same parent ACPI device.
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Acked-by: NGrant Likely <grant.likely@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c479ff09
    • M
      gpio / ACPI: Add support for _DSD device properties · 0d9a693c
      Mika Westerberg 提交于
      With release of ACPI 5.1 and _DSD method we can finally name GPIOs (and
      other things as well) returned by _CRS. Previously we were only able to
      use integer index to find the corresponding GPIO, which is pretty error
      prone if the order changes.
      
      With _DSD we can now query GPIOs using name instead of an integer index,
      like the below example shows:
      
        // Bluetooth device with reset and shutdown GPIOs
        Device (BTH)
        {
            Name (_HID, ...)
      
            Name (_CRS, ResourceTemplate ()
            {
                GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly,
                        "\\_SB.GPO0", 0, ResourceConsumer) {15}
                GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly,
                        "\\_SB.GPO0", 0, ResourceConsumer) {27, 31}
            })
      
            Name (_DSD, Package ()
            {
                ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
                Package ()
      	  {
                    Package () {"reset-gpio", Package() {^BTH, 1, 1, 0 }},
                    Package () {"shutdown-gpio", Package() {^BTH, 0, 0, 0 }},
                }
            })
        }
      
      The format of the supported GPIO property is:
      
        Package () { "name", Package () { ref, index, pin, active_low }}
      
        ref - The device that has _CRS containing GpioIo()/GpioInt() resources,
              typically this is the device itself (BTH in our case).
        index - Index of the GpioIo()/GpioInt() resource in _CRS starting from zero.
        pin - Pin in the GpioIo()/GpioInt() resource. Typically this is zero.
        active_low - If 1 the GPIO is marked as active_low.
      
      Since ACPI GpioIo() resource does not have field saying whether it is
      active low or high, the "active_low" argument can be used here. Setting
      it to 1 marks the GPIO as active low.
      
      In our Bluetooth example the "reset-gpio" refers to the second GpioIo()
      resource, second pin in that resource with the GPIO number of 31.
      
      This patch implements necessary support to gpiolib for extracting GPIOs
      using _DSD device properties.
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Acked-by: NGrant Likely <grant.likely@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0d9a693c
  13. 04 11月, 2014 1 次提交
  14. 03 11月, 2014 1 次提交
  15. 31 10月, 2014 1 次提交
  16. 30 10月, 2014 1 次提交
  17. 29 10月, 2014 5 次提交
  18. 28 10月, 2014 2 次提交
    • P
      gpio: grgpio: remove irq_domain resources on failure · 65fdc966
      Pramod Gurav 提交于
      Call irq_domain_remove when gpiochip_add fails to release irq_domain
      resources.
      Signed-off-by: NPramod Gurav <pramod.gurav@smartplayin.com>
      Acked-by: NAlexandre Courbot <acourbot@nvidia.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      65fdc966
    • L
      gpio: dwapb: fix compile errors · 1972c97d
      Linus Walleij 提交于
      Whereas the DWAPB driver does not really depend on the ARM
      architecture, it uses [readl|writel]_relaxed() not found on
      arch such as Blackfin, so restrict this to ARM until there is
      another architecture that can make use of it.
      
      It is also using the of_node of the gpiochip, so fix this
      too by requiring OF_GPIO.
      
      All error/warnings:
      
      make.cross ARCH=blackfin
      drivers/gpio/gpio-dwapb.c: In function 'dwapb_irq_handler':
      drivers/gpio/gpio-dwapb.c:91:2: error: implicit declaration of function 'readl_relaxed' [-Werror=implicit-function-declaration]
      drivers/gpio/gpio-dwapb.c: In function 'dwapb_configure_irqs':
      drivers/gpio/gpio-dwapb.c:212:32: error: 'struct gpio_chip' has no member named 'of_node'
      drivers/gpio/gpio-dwapb.c:221:16: error: 'struct gpio_chip' has no member named 'of_node'
      drivers/gpio/gpio-dwapb.c: In function 'dwapb_gpio_add_port':
      drivers/gpio/gpio-dwapb.c:331:14: error: 'struct gpio_chip' has no member named 'of_node'
      cc1: some warnings being treated as errors
      
      Cc: Jamie Iles <jamie@jamieiles.com>
      Cc: Alan Tull <atull@altera.com>
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      1972c97d
  19. 27 10月, 2014 1 次提交
  20. 24 10月, 2014 1 次提交