1. 17 3月, 2016 1 次提交
  2. 25 1月, 2016 1 次提交
  3. 21 1月, 2016 1 次提交
  4. 06 8月, 2015 1 次提交
  5. 22 7月, 2015 2 次提交
  6. 08 6月, 2015 1 次提交
  7. 14 5月, 2015 1 次提交
  8. 19 4月, 2015 2 次提交
  9. 17 4月, 2015 1 次提交
  10. 30 1月, 2015 3 次提交
    • S
      dm: gpio: Add better functions to request GPIOs · 3669e0e7
      Simon Glass 提交于
      At present U-Boot sort-of supports the standard way of reading GPIOs from
      device tree nodes, but the support is incomplete, a bit clunky and only
      works for GPIO bindings where #gpio-cells is 2.
      
      Add new functions to request GPIOs, taking full account of the device
      tree binding. These permit requesting a GPIO with a simple call like:
      
         gpio_request_by_name(dev, "cd-gpios", 0, &desc, GPIOD_IS_IN);
      
      This will request the GPIO, looking at the device's node which might be
      this, for example:
      
         cd-gpios = <&gpio TEGRA_GPIO(B, 3) GPIO_ACTIVE_LOW>;
      
      The GPIO will be set to input mode in this case and polarity will be
      honoured by the GPIO calls.
      
      It is also possible to request and free a list of GPIOs.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      3669e0e7
    • S
      dm: gpio: Add a driver GPIO translation method · 0dac4d51
      Simon Glass 提交于
      Only the GPIO driver knows about the full GPIO device tree binding used by
      a device. Add a method to allow the driver to provide this information to the
      uclass, including the GPIO offset within the device and flags such as the
      polarity.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      0dac4d51
    • S
      dm: gpio: Add a native driver model API · ae7123f8
      Simon Glass 提交于
      So far driver model's GPIO uclass just implements the existing GPIO API.
      This has some limitations:
      
      - it requires manual device tree munging to support GPIOs in device tree
          (fdtdec_get_gpio() and friends)
      - it does not understand polarity
      - it is somewhat slower since we must scan for the GPIO device each time
      - Global GPIO numbering can change if other GPIO drivers are probed
      - it requires extra steps to set the GPIO direction and value
      
      The new functions have a dm_ prefix where necessary to avoid name conflicts
      but we can remove that when it is no-longer needed. The new struct gpio_desc
      holds all required information about the GPIO. For now this is intended to
      be stored by the client requesting the GPIO, but in future it might be
      brought into the uclass in some way.
      
      With these changes the old GPIO API still works, and uses the driver model
      API underneath.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      ae7123f8
  11. 21 11月, 2014 1 次提交
  12. 24 10月, 2014 5 次提交
  13. 21 6月, 2014 1 次提交
  14. 27 5月, 2014 1 次提交
    • H
      dm: rename device struct to udevice · 54c5d08a
      Heiko Schocher 提交于
      using UBI and DM together leads in compiler error, as
      both define a "struct device", so rename "struct device"
      in include/dm/device.h to "struct udevice", as we use
      linux code (MTD/UBI/UBIFS some USB code,...) and cannot
      change the linux "struct device"
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Marek Vasut <marex@denx.de>
      54c5d08a
  15. 05 3月, 2014 1 次提交
    • S
      dm: Add GPIO support and tests · 96495d90
      Simon Glass 提交于
      Add driver model support for GPIOs. Since existing GPIO drivers do not use
      driver model, this feature must be enabled by CONFIG_DM_GPIO. After all
      GPO drivers are converted over we can perhaps remove this config.
      
      Tests are provided for the sandbox implementation, and are a sufficient
      sanity check for basic operation.
      
      The GPIO uclass understands the concept of named banks of GPIOs, with each
      GPIO device providing a single bank. Within each bank the GPIOs are numbered
      using an offset from 0 to n-1. For example a bank named 'b' with 20
      offsets will provide GPIOs named b0 to b19.
      
      Anonymous GPIO banks are also supported, and are just numbered without any
      prefix.
      
      Each time a GPIO driver is added to the uclass, the GPIOs are renumbered
      accordinging, so there is always a global GPIO numbering order.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Signed-off-by: NPavel Herrmann <morpheus.ibis@gmail.com>
      Signed-off-by: NViktor Křivák <viktor.krivak@gmail.com>
      Signed-off-by: NTomas Hlavacek <tmshlvck@gmail.com>
      96495d90