Lines Matching refs:pinfo
714 struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata); in fsl_spi_cs_control() local
716 int gpio = pinfo->gpios[cs]; in fsl_spi_cs_control()
717 bool alow = pinfo->alow_flags[cs]; in fsl_spi_cs_control()
726 struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata); in of_fsl_spi_get_chipselects() local
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()
746 pinfo->alow_flags = kzalloc(ngpios * sizeof(*pinfo->alow_flags), in of_fsl_spi_get_chipselects()
748 if (!pinfo->alow_flags) { in of_fsl_spi_get_chipselects()
770 pinfo->gpios[i] = gpio; in of_fsl_spi_get_chipselects()
771 pinfo->alow_flags[i] = flags & OF_GPIO_ACTIVE_LOW; in of_fsl_spi_get_chipselects()
773 ret = gpio_direction_output(pinfo->gpios[i], in of_fsl_spi_get_chipselects()
774 pinfo->alow_flags[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()
794 kfree(pinfo->alow_flags); in of_fsl_spi_get_chipselects()
795 pinfo->alow_flags = NULL; 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()
805 struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata); in of_fsl_spi_free_chipselects() local
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()
817 kfree(pinfo->alow_flags); in of_fsl_spi_free_chipselects()