devm_gpiod_get usage to get the gpio num

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
 devm_gpiod_get method takes 3 params after kernel 3.16 .

struct gpio_desc *gpiod;

gpiod = devm_gpiod_get(dev, "data-pin",GPIOD_OUT_HIGH)

where data-pin defintion in the device tree is :

data-pin = <&gpio2 51 GPIO_ACTIVE_HIGH>;

But this on inserting ht module givees "failed to parse DT (-2)

GPIOD_OUT_HIGH is one of the gpiod flags :

  enum gpiod_flags {
         GPIOD_ASIS      = 0,
          GPIOD_IN        = GPIOD_FLAGS_BIT_DIR_SET,
        GPIOD_OUT_LOW   = GPIOD_FLAGS_BIT_DIR_SET |
GPIOD_FLAGS_BIT_DIR_OUT,
          GPIOD_OUT_HIGH  = GPIOD_FLAGS_BIT_DIR_SET | GPIOD_FLAGS_BIT_DIR_OUT |
                           GPIOD_FLAGS_BIT_DIR_VAL,
 };

what is wrong here?I just want to extract the gpio number for the dt parser.

Thanks and Rgds,
Rp
--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux