Lines Matching refs:names

316  * Note that there is no guarantee that GPIO names are globally unique!
347 * Take the names from gc->names and assign them to their GPIO descriptors.
351 * 1. Non-unique names are still accepted,
359 /* First check all names if they are unique */
363 gpio = gpio_name_to_desc(gc->names[i]);
367 gc->names[i]);
370 /* Then add all names to the GPIO descriptors */
372 gdev->descs[i].name = gc->names[i];
378 * gpiochip_set_names - Set GPIO line names using device properties
381 * Looks for device property "gpio-line-names" and if it exists assigns
382 * GPIO line names for the chip. The memory allocated for the assigned
383 * names belong to the underlying firmware node and should not be released
390 const char **names;
394 count = device_property_string_array_count(dev, "gpio-line-names");
401 * setting friendly names if the specified ones with 'gpio-line-names'
407 dev_warn(dev, "gpio-line-names too short (length %d), cannot map names for the gpiochip at offset %u\n",
412 names = kcalloc(count, sizeof(*names), GFP_KERNEL);
413 if (!names)
416 ret = device_property_read_string_array(dev, "gpio-line-names",
417 names, count);
419 dev_warn(dev, "failed to read GPIO line names\n");
420 kfree(names);
429 * the names to pins from the 'names' array. Since property
430 * 'gpio-line-names' cannot contains gaps, we have to be sure
440 * Allow overriding "fixed" names provided by the GPIO
441 * provider. The "fixed" names are more often than not
442 * generic and less informative than the names given in
445 if (names[chip->offset + i] && names[chip->offset + i][0])
446 gdev->descs[i].name = names[chip->offset + i];
449 kfree(names);
858 if (gc->names) {