Lines Matching refs:spi
38 struct spi_device *spi; member
73 status = spi_sync(pcap->spi, &m); in ezx_pcap_putget()
180 struct pcap_platform_data *pdata = dev_get_platdata(&pcap->spi->dev); in pcap_isr_work()
383 pdev->dev.parent = &pcap->spi->dev; in pcap_add_subdev()
393 static int ezx_pcap_remove(struct spi_device *spi) in ezx_pcap_remove() argument
395 struct pcap_chip *pcap = spi_get_drvdata(spi); in ezx_pcap_remove()
399 device_for_each_child(&spi->dev, NULL, pcap_remove_subdev); in ezx_pcap_remove()
416 static int ezx_pcap_probe(struct spi_device *spi) in ezx_pcap_probe() argument
418 struct pcap_platform_data *pdata = dev_get_platdata(&spi->dev); in ezx_pcap_probe()
427 pcap = devm_kzalloc(&spi->dev, sizeof(*pcap), GFP_KERNEL); in ezx_pcap_probe()
437 spi_set_drvdata(spi, pcap); in ezx_pcap_probe()
440 spi->bits_per_word = 32; in ezx_pcap_probe()
441 spi->mode = SPI_MODE_0 | (pdata->config & PCAP_CS_AH ? SPI_CS_HIGH : 0); in ezx_pcap_probe()
442 ret = spi_setup(spi); in ezx_pcap_probe()
446 pcap->spi = spi; in ezx_pcap_probe()
453 dev_err(&spi->dev, "can't create pcap thread\n"); in ezx_pcap_probe()
478 irq_set_irq_type(spi->irq, IRQ_TYPE_EDGE_RISING); in ezx_pcap_probe()
479 irq_set_handler_data(spi->irq, pcap); in ezx_pcap_probe()
480 irq_set_chained_handler(spi->irq, pcap_irq_handler); in ezx_pcap_probe()
481 irq_set_irq_wake(spi->irq, 1); in ezx_pcap_probe()
487 ret = devm_request_irq(&spi->dev, adc_irq, pcap_adc_irq, 0, "ADC", in ezx_pcap_probe()
506 device_for_each_child(&spi->dev, NULL, pcap_remove_subdev); in ezx_pcap_probe()