Lines Matching refs:pinfo
703 struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata); in fsl_spi_cs_control() local
705 int gpio = pinfo->gpios[cs]; in fsl_spi_cs_control()
706 bool alow = pinfo->alow_flags[cs]; in fsl_spi_cs_control()
715 struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata); in of_fsl_spi_get_chipselects() local
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()
735 pinfo->alow_flags = kzalloc(ngpios * sizeof(*pinfo->alow_flags), in of_fsl_spi_get_chipselects()
737 if (!pinfo->alow_flags) { in of_fsl_spi_get_chipselects()
759 pinfo->gpios[i] = gpio; in of_fsl_spi_get_chipselects()
760 pinfo->alow_flags[i] = flags & OF_GPIO_ACTIVE_LOW; in of_fsl_spi_get_chipselects()
762 ret = gpio_direction_output(pinfo->gpios[i], in of_fsl_spi_get_chipselects()
763 pinfo->alow_flags[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()
783 kfree(pinfo->alow_flags); in of_fsl_spi_get_chipselects()
784 pinfo->alow_flags = NULL; 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()
794 struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata); in of_fsl_spi_free_chipselects() local
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()
806 kfree(pinfo->alow_flags); in of_fsl_spi_free_chipselects()