lkml.org 
[lkml]   [2010]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 1/3] gpiolib: add gpio_set_direction()
    From
    > How about something like the following for set_direction, so we're not
    > comparing magic bits?
    >
    > /* gpio direction flags */
    > #define GPIO_DIR_NONE 0
    > #define GPIO_DIR_INPUT (1 << 0)
    > #define GPIO_DIR_OUTPUT (1 << 1)

    Sounds good and it looks like those macros aren't used anywhere else.
    Maybe also add a define for inout?
    #define GPIO_DIR_INOUT (GPIO_DIR_INPUT | GPIO_DIR_OUTPUT)

    Ben


    \
     
     \ /
      Last update: 2010-02-27 06:13    [W:0.018 / U:31.300 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site