Lines Matching refs:gpios
716 int gpio = pinfo->gpios[cs]; in fsl_spi_cs_control()
741 pinfo->gpios = kmalloc(ngpios * sizeof(*pinfo->gpios), GFP_KERNEL); in of_fsl_spi_get_chipselects()
742 if (!pinfo->gpios) in of_fsl_spi_get_chipselects()
744 memset(pinfo->gpios, -1, ngpios * sizeof(*pinfo->gpios)); in of_fsl_spi_get_chipselects()
770 pinfo->gpios[i] = gpio; in of_fsl_spi_get_chipselects()
773 ret = gpio_direction_output(pinfo->gpios[i], in of_fsl_spi_get_chipselects()
789 if (gpio_is_valid(pinfo->gpios[i])) in of_fsl_spi_get_chipselects()
790 gpio_free(pinfo->gpios[i]); in of_fsl_spi_get_chipselects()
797 kfree(pinfo->gpios); in of_fsl_spi_get_chipselects()
798 pinfo->gpios = NULL; in of_fsl_spi_get_chipselects()
808 if (!pinfo->gpios) in of_fsl_spi_free_chipselects()
812 if (gpio_is_valid(pinfo->gpios[i])) in of_fsl_spi_free_chipselects()
813 gpio_free(pinfo->gpios[i]); in of_fsl_spi_free_chipselects()
816 kfree(pinfo->gpios); in of_fsl_spi_free_chipselects()