Home
last modified time | relevance | path

Searched refs:cs_gpio (Results 1 – 19 of 19) sorted by relevance

/Linux-v5.4/drivers/spi/
Dspi-mpc512x-psc.c131 if (mps->cs_control && gpio_is_valid(spi->cs_gpio)) in mpc512x_psc_spi_activate_cs()
139 if (mps->cs_control && gpio_is_valid(spi->cs_gpio)) in mpc512x_psc_spi_deactivate_cs()
377 if (gpio_is_valid(spi->cs_gpio)) { in mpc512x_psc_spi_setup()
378 ret = gpio_request(spi->cs_gpio, dev_name(&spi->dev)); in mpc512x_psc_spi_setup()
385 gpio_direction_output(spi->cs_gpio, in mpc512x_psc_spi_setup()
400 if (gpio_is_valid(spi->cs_gpio)) in mpc512x_psc_spi_cleanup()
401 gpio_free(spi->cs_gpio); in mpc512x_psc_spi_cleanup()
482 gpio_set_value(spi->cs_gpio, onoff); in mpc512x_spi_cs_control()
Dspi-meson-spicc.c474 else if (gpio_is_valid(spi->cs_gpio)) in meson_spicc_setup()
476 else if (spi->cs_gpio == -ENOENT) in meson_spicc_setup()
479 if (gpio_is_valid(spi->cs_gpio)) { in meson_spicc_setup()
480 ret = gpio_request(spi->cs_gpio, dev_name(&spi->dev)); in meson_spicc_setup()
488 ret = gpio_direction_output(spi->cs_gpio, in meson_spicc_setup()
496 if (gpio_is_valid(spi->cs_gpio)) in meson_spicc_cleanup()
497 gpio_free(spi->cs_gpio); in meson_spicc_cleanup()
Dspi-orion.c332 if (gpio_is_valid(spi->cs_gpio)) in orion_spi_set_cs()
508 if (gpio_is_valid(spi->cs_gpio)) { in orion_spi_setup()
509 gpio_direction_output(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH)); in orion_spi_setup()
689 int cs_gpio; in orion_spi_probe() local
708 cs_gpio = of_get_named_gpio(pdev->dev.of_node, "cs-gpios", cs); in orion_spi_probe()
709 if (cs_gpio > 0) { in orion_spi_probe()
729 status = devm_gpio_request_one(&pdev->dev, cs_gpio, in orion_spi_probe()
Dspi-at91-usart.c495 int cs_gpio = of_get_named_gpio(np, "cs-gpios", i); in at91_usart_gpio_setup() local
497 if (cs_gpio < 0) in at91_usart_gpio_setup()
498 return cs_gpio; in at91_usart_gpio_setup()
500 if (gpio_is_valid(cs_gpio)) { in at91_usart_gpio_setup()
501 ret = devm_gpio_request_one(&pdev->dev, cs_gpio, in at91_usart_gpio_setup()
Dspi-img-spfi.c458 ret = gpio_request_one(spi->cs_gpio, in img_spfi_setup()
464 spi->cs_gpio); in img_spfi_setup()
468 if (gpio_is_valid(spi->cs_gpio)) { in img_spfi_setup()
472 ret = gpio_direction_output(spi->cs_gpio, mode); in img_spfi_setup()
475 spi->cs_gpio, ret); in img_spfi_setup()
487 gpio_free(spi->cs_gpio); in img_spfi_cleanup()
Dspi-s3c64xx.c789 spi->cs_gpio = cs->line; in s3c64xx_spi_setup()
798 if (gpio_is_valid(spi->cs_gpio)) { in s3c64xx_spi_setup()
799 err = gpio_request_one(spi->cs_gpio, GPIOF_OUT_INIT_HIGH, in s3c64xx_spi_setup()
804 spi->cs_gpio, err); in s3c64xx_spi_setup()
862 if (gpio_is_valid(spi->cs_gpio)) in s3c64xx_spi_setup()
863 gpio_free(spi->cs_gpio); in s3c64xx_spi_setup()
877 if (gpio_is_valid(spi->cs_gpio)) { in s3c64xx_spi_cleanup()
878 gpio_free(spi->cs_gpio); in s3c64xx_spi_cleanup()
887 spi->cs_gpio = -ENOENT; in s3c64xx_spi_cleanup()
Dspi-bcm2835aux.c453 if (gpio_is_valid(spi->cs_gpio)) { in bcm2835aux_spi_setup()
458 ret = gpio_direction_output(spi->cs_gpio, in bcm2835aux_spi_setup()
463 spi->cs_gpio, ret); in bcm2835aux_spi_setup()
Dspi-fsl-lpspi.c867 int cs_gpio = of_get_named_gpio(np, "cs-gpios", i); in fsl_lpspi_probe() local
869 if (!gpio_is_valid(cs_gpio) && lpspi_platform_info) in fsl_lpspi_probe()
870 cs_gpio = lpspi_platform_info->chipselect[i]; in fsl_lpspi_probe()
872 fsl_lpspi->chipselect[i] = cs_gpio; in fsl_lpspi_probe()
873 if (!gpio_is_valid(cs_gpio)) in fsl_lpspi_probe()
Dspi-omap2-mcspi.c1045 if (gpio_is_valid(spi->cs_gpio)) { in omap2_mcspi_setup()
1046 ret = gpio_request(spi->cs_gpio, dev_name(&spi->dev)); in omap2_mcspi_setup()
1051 gpio_direction_output(spi->cs_gpio, in omap2_mcspi_setup()
1106 if (gpio_is_valid(spi->cs_gpio)) in omap2_mcspi_cleanup()
1107 gpio_free(spi->cs_gpio); in omap2_mcspi_cleanup()
1177 if (gpio_is_valid(spi->cs_gpio)) in omap2_mcspi_transfer_one()
1266 if (gpio_is_valid(spi->cs_gpio)) in omap2_mcspi_transfer_one()
Dspi-sirf.c780 gpio_direction_output(spi->cs_gpio, in spi_sirfsoc_chipselect()
784 gpio_direction_output(spi->cs_gpio, in spi_sirfsoc_chipselect()
1000 if (spi->cs_gpio == -ENOENT) in spi_sirfsoc_setup()
1010 ret = gpio_is_valid(spi->cs_gpio); in spi_sirfsoc_setup()
1016 ret = gpio_request(spi->cs_gpio, DRIVER_NAME); in spi_sirfsoc_setup()
1033 gpio_free(spi->cs_gpio); in spi_sirfsoc_cleanup()
Dspi-st-ssc4.c176 gpio_free(spi->cs_gpio); in spi_st_cleanup()
186 int cs = spi->cs_gpio; in spi_st_setup()
Dspi-pl022.c2184 int cs_gpio = of_get_named_gpio(np, "cs-gpios", i); in pl022_probe() local
2186 if (cs_gpio == -EPROBE_DEFER) { in pl022_probe()
2191 pl022->chipselects[i] = cs_gpio; in pl022_probe()
2193 if (gpio_is_valid(cs_gpio)) { in pl022_probe()
2194 if (devm_gpio_request(dev, cs_gpio, "ssp-pl022")) in pl022_probe()
2197 cs_gpio); in pl022_probe()
2198 else if (gpio_direction_output(cs_gpio, 1)) in pl022_probe()
2201 cs_gpio); in pl022_probe()
Dspi-imx.c720 if (!gpio_is_valid(spi->cs_gpio)) in mx31_prepare_transfer()
821 if (!gpio_is_valid(spi->cs_gpio)) in mx21_prepare_transfer()
1059 if (!gpio_is_valid(spi->cs_gpio)) in spi_imx_chipselect()
1062 gpio_set_value(spi->cs_gpio, dev_is_lowactive ^ active); in spi_imx_chipselect()
1523 if (gpio_is_valid(spi->cs_gpio)) in spi_imx_setup()
1524 gpio_direction_output(spi->cs_gpio, in spi_imx_setup()
Dspi-pic32.c595 if (!gpio_is_valid(spi->cs_gpio)) in pic32_spi_setup()
598 gpio_direction_output(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH)); in pic32_spi_setup()
606 gpio_direction_output(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH)); in pic32_spi_cleanup()
Dspi-stm32.c983 if (!gpio_is_valid(spi_dev->cs_gpio)) { in stm32_spi_setup()
985 spi_dev->cs_gpio); in stm32_spi_setup()
990 spi_dev->cs_gpio, in stm32_spi_setup()
993 ret = gpio_direction_output(spi_dev->cs_gpio, in stm32_spi_setup()
Dspi.c512 spi->cs_gpio = -ENOENT; in spi_alloc_device()
588 spi->cs_gpio = ctlr->cs_gpios[spi->chip_select]; in spi_add_device()
781 if (spi->cs_gpiod || gpio_is_valid(spi->cs_gpio)) { in spi_set_cs()
794 gpio_set_value_cansleep(spi->cs_gpio, !enable); in spi_set_cs()
3062 if (gpio_is_valid(spi->cs_gpio)) in spi_setup()
3146 gpio_is_valid(spi->cs_gpio))) { in __spi_validate()
Dspi-mt65xx.c515 if (mdata->dev_comp->need_pad_sel && gpio_is_valid(spi->cs_gpio)) in mtk_spi_setup()
516 gpio_direction_output(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH)); in mtk_spi_setup()
Dspi-lantiq-ssc.c394 if (gpio_is_valid(spidev->cs_gpio)) in lantiq_ssc_setup()
/Linux-v5.4/include/linux/spi/
Dspi.h174 int cs_gpio; /* LEGACY: chip select gpio */ member