Lines Matching refs:gpios
705 int gpio = pinfo->gpios[cs]; in fsl_spi_cs_control()
730 pinfo->gpios = kmalloc(ngpios * sizeof(*pinfo->gpios), GFP_KERNEL); in of_fsl_spi_get_chipselects()
731 if (!pinfo->gpios) in of_fsl_spi_get_chipselects()
733 memset(pinfo->gpios, -1, ngpios * sizeof(*pinfo->gpios)); in of_fsl_spi_get_chipselects()
759 pinfo->gpios[i] = gpio; in of_fsl_spi_get_chipselects()
762 ret = gpio_direction_output(pinfo->gpios[i], in of_fsl_spi_get_chipselects()
778 if (gpio_is_valid(pinfo->gpios[i])) in of_fsl_spi_get_chipselects()
779 gpio_free(pinfo->gpios[i]); in of_fsl_spi_get_chipselects()
786 kfree(pinfo->gpios); in of_fsl_spi_get_chipselects()
787 pinfo->gpios = NULL; in of_fsl_spi_get_chipselects()
797 if (!pinfo->gpios) in of_fsl_spi_free_chipselects()
801 if (gpio_is_valid(pinfo->gpios[i])) in of_fsl_spi_free_chipselects()
802 gpio_free(pinfo->gpios[i]); in of_fsl_spi_free_chipselects()
805 kfree(pinfo->gpios); in of_fsl_spi_free_chipselects()