Lines Matching refs:val
22 static int mxl111sf_set_gpo_state(struct mxl111sf_state *state, u8 pin, u8 val)
27 mxl_debug_adv("(%d, %d)", pin, val);
34 tmp |= (val << (pin - 1));
45 tmp |= (val << (pin - 3));
55 static int mxl111sf_get_gpi_state(struct mxl111sf_state *state, u8 pin, u8 *val)
62 *val = 0;
72 *val = (tmp >> (pin + 4)) & 0x01;
81 *val = (tmp >> pin) & 0x01;
89 *val = (tmp >> (pin - 3)) & 0x01;
101 u8 val;
157 gpio_cfg->pin, gpio_cfg->val) :
159 gpio_cfg->pin, &gpio_cfg->val);
166 int gpio, int direction, int val)
171 .val = val,
174 mxl_debug("(%d, %d, %d)", gpio, direction, val);
548 static int mxl111sf_hw_set_gpio(struct mxl111sf_state *state, int gpio, int val)
550 return mxl111sf_hw_do_set_gpio(state, gpio, MXL_GPIO_DIR_OUTPUT, val);
570 static int pca9534_set_gpio(struct mxl111sf_state *state, int gpio, int val)
581 mxl_debug("(%d, %d)", gpio, val);
597 w[1] |= ((val ? 1 : 0) << gpio);
627 int mxl111sf_set_gpio(struct mxl111sf_state *state, int gpio, int val)
629 mxl_debug("(%d, %d)", gpio, val);
637 return pca9534_set_gpio(state, gpio, val);
639 return mxl111sf_hw_set_gpio(state, gpio, val);