1. 04 12月, 2013 1 次提交
    • L
      gpio/pinctrl: make gpio_chip members typed boolean · 9fb1f39e
      Linus Walleij 提交于
      This switches the two members of struct gpio_chip that were
      defined as unsigned foo:1 to bool, because that is indeed what
      they are. Switch all users in the gpio and pinctrl subsystems
      to assign these values with true/false instead of 0/1. The
      users outside these subsystems will survive since true/false
      is 1/0, atleast we set some kind of more strict typing example.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      9fb1f39e
  2. 25 9月, 2013 1 次提交
    • P
      ARM: davinci: gpio: use gpiolib API instead of inline functions · f1a4c52f
      Philip Avinash 提交于
      Remove NEED_MACH_GPIO_H config select option for ARCH_DAVINCI
      to start using gpiolib interface for davinci platforms. This makes
      it easier to use the gpio driver on other platforms as it breaks
      dependency on mach-davinci.
      
      Latencies for gpio_get/set APIs will increase. On measurement,
      latency was found to have increased by 18 microsecond with
      gpiolib API as compared to inline APIs.
      
      Measurement was done on DA850 EVM for gpio_get_value() API by
      taking the printk timing across the call with interrupts disabled.
      
        inline gpio API with interrupt disabled
        [   29.734337] before gpio_get
        [   29.736847] after gpio_get
      
        Time difference 0.00251
      
        gpio library with interrupt disabled
        [  272.876763] before gpio_get
        [  272.879291] after gpio_get
      
        Time difference 0.002528
        Latency increased by (0.002528 -  0.00251) = 18 microsecond.
      
      While at it, remove GPIO_TYPE_DAVINCI enum definition as
      gpio-davinci.c is converted to Linux device driver model.
      Signed-off-by: NPhilip Avinash <avinashphilip@ti.com>
      Signed-off-by: NLad, Prabhakar <prabhakar.csengg@gmail.com>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      [nsekhar@ti.com: minor edits to commit message]
      Signed-off-by: NSekhar Nori <nsekhar@ti.com>
      f1a4c52f
  3. 22 8月, 2011 1 次提交
  4. 01 3月, 2011 1 次提交
    • H
      davinci: tnetv107x: fix register indexing for GPIOs numbers > 31 · c284d9fa
      Hirosh Dabui 提交于
      This patch fix a bug in the register indexing for GPIOs numbers >  31
      to get the relevant hardware registers of tnetv107x to control the GPIOs.
      
      In the structure tnetv107x_gpio_regs:
      
      struct tnetv107x_gpio_regs {
                  u32     idver;
                  u32     data_in[3];
                  u32     data_out[3];
                  u32     direction[3];
                  u32     enable[3];
      };
      
      The GPIO hardware register addresses of tnetv107x are stored.
      The chip implements 3 registers of each entity to serve 96 GPIOs,
      each register provides a subset of 32 GPIOs.
      The driver provides these macros: gpio_reg_set_bit, gpio_reg_get_bit
      and gpio_reg_clear_bit.
      
      The bug implied the use of macros to access the relevant hardware
      register e.g. the driver code used the macro like this:
      'gpio_reg_clear_bit(&reg->data_out, gpio)'
      
      But it has to be used like this:
      'gpio_reg_clear_bit(reg->data_out, gpio)'.
      
      The different results are shown here:
      - &reg->data_out + 1 (it will add the full array size of data_out i.e. 12 bytes)
      - reg->data_out + 1 (it will increment only the size of data_out i.e. only 4 bytes)
      Acked-by: NCyril Chemparathy <cyril@ti.com>
      Signed-off-by: NHirosh Dabui <hirosh.dabui@snom.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      c284d9fa
  5. 22 6月, 2010 1 次提交
    • C
      Davinci: tnetv107x initial gpio support · d92c7962
      Cyril Chemparathy 提交于
      This patch adds support for the tnetv107x gpio controller.
      
      Key differences between davinci and tnetv107x controllers:
       - register map - davinci's controller is organized into banks of 32 gpios,
         tnetv107x has a single space with arrays of registers for in, out,
         direction, etc.
       - davinci's controller has separate set/clear registers for output, tnetv107x
         has a single direct mapped register.
      
      This patch does not yet add gpio irq support on this controller.
      Signed-off-by: NCyril Chemparathy <cyril@ti.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      d92c7962