Lines Matching refs:descs

299 	struct gpio_desc **descs;
304 unsigned long tmp[]; /* values and descs for multiple ops */
311 return gpiod_get_direction(fwd->descs[offset]);
318 return gpiod_direction_input(fwd->descs[offset]);
326 return gpiod_direction_output(fwd->descs[offset], value);
333 return chip->can_sleep ? gpiod_get_value_cansleep(fwd->descs[offset])
334 : gpiod_get_value(fwd->descs[offset]);
340 struct gpio_desc **descs;
347 descs = (void *)&fwd->tmp[BITS_TO_LONGS(fwd->chip.ngpio)];
351 descs[j++] = fwd->descs[i];
354 error = gpiod_get_array_value_cansleep(j, descs, NULL, values);
356 error = gpiod_get_array_value(j, descs, NULL, values);
392 gpiod_set_value_cansleep(fwd->descs[offset], value);
394 gpiod_set_value(fwd->descs[offset], value);
400 struct gpio_desc **descs;
406 descs = (void *)&fwd->tmp[BITS_TO_LONGS(fwd->chip.ngpio)];
410 descs[j++] = fwd->descs[i];
414 gpiod_set_array_value_cansleep(j, descs, NULL, values);
416 gpiod_set_array_value(j, descs, NULL, values);
441 return gpiod_set_config(fwd->descs[offset], config);
448 * @descs: Array containing the GPIO descriptors to forward to.
460 struct gpio_desc *descs[])
482 struct gpio_chip *parent = gpiod_to_chip(descs[i]);
484 dev_dbg(dev, "%u => gpio-%d\n", i, desc_to_gpio(descs[i]));
486 if (gpiod_cansleep(descs[i]))
504 fwd->descs = descs;
526 struct gpio_desc **descs;
534 descs = devm_kmalloc_array(dev, n, sizeof(*descs), GFP_KERNEL);
535 if (!descs)
539 descs[i] = devm_gpiod_get_index(dev, NULL, i, GPIOD_ASIS);
540 if (IS_ERR(descs[i]))
541 return PTR_ERR(descs[i]);
544 fwd = gpiochip_fwd_create(dev, n, descs);