struct gb_gpio_activate_request request;
int ret;
- if (which > ggc->line_max)
- return -EINVAL;
-
request.which = which;
ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_ACTIVATE,
&request, sizeof(request), NULL, 0);
struct gb_gpio_deactivate_request request;
int ret;
- if (which > ggc->line_max)
- return -EINVAL;
-
request.which = which;
ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_DEACTIVATE,
&request, sizeof(request), NULL, 0);
int ret;
u8 direction;
- if (which > ggc->line_max)
- return -EINVAL;
-
request.which = which;
ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_GET_DIRECTION,
&request, sizeof(request),
struct gb_gpio_direction_in_request request;
int ret;
- if (which > ggc->line_max)
- return -EINVAL;
-
request.which = which;
ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_DIRECTION_IN,
&request, sizeof(request), NULL, 0);
struct gb_gpio_direction_out_request request;
int ret;
- if (which > ggc->line_max)
- return -EINVAL;
-
request.which = which;
request.value = value_high ? 1 : 0;
ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_DIRECTION_OUT,
int ret;
u8 value;
- if (which > ggc->line_max)
- return -EINVAL;
-
request.which = which;
ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_GET_VALUE,
&request, sizeof(request),
struct gb_gpio_set_value_request request;
int ret;
- if (which > ggc->line_max)
- return -EINVAL;
-
request.which = which;
request.value = value_high ? 1 : 0;
ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_SET_VALUE,
struct gb_gpio_set_debounce_request request;
int ret;
- if (which > ggc->line_max)
- return -EINVAL;
-
request.which = which;
request.usec = cpu_to_le16(debounce_usec);
ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_SET_DEBOUNCE,