Searched refs:spi_dev (Results 1 - 16 of 16) sorted by relevance

/linux-4.4.14/drivers/staging/iio/addac/
H A Dadt7316-spi.c28 struct spi_device *spi_dev = client; adt7316_spi_multi_read() local
38 ret = spi_write(spi_dev, cmd, 2); adt7316_spi_multi_read()
40 dev_err(&spi_dev->dev, "SPI fail to select reg\n"); adt7316_spi_multi_read()
46 ret = spi_write_then_read(spi_dev, cmd, 1, data, count); adt7316_spi_multi_read()
48 dev_err(&spi_dev->dev, "SPI read data error\n"); adt7316_spi_multi_read()
57 struct spi_device *spi_dev = client; adt7316_spi_multi_write() local
69 ret = spi_write(spi_dev, buf, count + 2); adt7316_spi_multi_write()
71 dev_err(&spi_dev->dev, "SPI write error\n"); adt7316_spi_multi_write()
92 static int adt7316_spi_probe(struct spi_device *spi_dev) adt7316_spi_probe() argument
95 .client = spi_dev, adt7316_spi_probe()
96 .irq = spi_dev->irq, adt7316_spi_probe()
105 if (spi_dev->max_speed_hz > ADT7316_SPI_MAX_FREQ_HZ) { adt7316_spi_probe()
106 dev_err(&spi_dev->dev, "SPI CLK %d Hz?\n", adt7316_spi_probe()
107 spi_dev->max_speed_hz); adt7316_spi_probe()
112 adt7316_spi_write(spi_dev, 0, 0); adt7316_spi_probe()
113 adt7316_spi_write(spi_dev, 0, 0); adt7316_spi_probe()
114 adt7316_spi_write(spi_dev, 0, 0); adt7316_spi_probe()
116 return adt7316_probe(&spi_dev->dev, &bus, spi_dev->modalias); adt7316_spi_probe()
/linux-4.4.14/drivers/hwmon/
H A Dad7314.c39 struct spi_device *spi_dev; member in struct:ad7314_data
48 ret = spi_read(chip->spi_dev, (u8 *)&chip->rx, sizeof(chip->rx)); ad7314_spi_read()
50 dev_err(&chip->spi_dev->dev, "SPI read error\n"); ad7314_spi_read()
68 switch (spi_get_device_id(chip->spi_dev)->driver_data) { ad7314_show_temperature()
111 static int ad7314_probe(struct spi_device *spi_dev) ad7314_probe() argument
116 chip = devm_kzalloc(&spi_dev->dev, sizeof(*chip), GFP_KERNEL); ad7314_probe()
120 spi_set_drvdata(spi_dev, chip); ad7314_probe()
122 ret = sysfs_create_group(&spi_dev->dev.kobj, &ad7314_group); ad7314_probe()
126 chip->hwmon_dev = hwmon_device_register(&spi_dev->dev); ad7314_probe()
131 chip->spi_dev = spi_dev; ad7314_probe()
135 sysfs_remove_group(&spi_dev->dev.kobj, &ad7314_group); ad7314_probe()
139 static int ad7314_remove(struct spi_device *spi_dev) ad7314_remove() argument
141 struct ad7314_data *chip = spi_get_drvdata(spi_dev); ad7314_remove()
144 sysfs_remove_group(&spi_dev->dev.kobj, &ad7314_group); ad7314_remove()
/linux-4.4.14/drivers/media/i2c/s5c73m3/
H A Ds5c73m3-spi.c41 static int spi_xmit(struct spi_device *spi_dev, void *addr, const int len, spi_xmit() argument
55 if (spi_dev == NULL) { spi_xmit()
63 r = spi_sync(spi_dev, &msg); spi_xmit()
65 dev_err(&spi_dev->dev, "%s spi_sync failed %d\n", __func__, r); spi_xmit()
73 struct spi_device *spi_dev = state->spi_dev; s5c73m3_spi_write() local
83 r = spi_xmit(spi_dev, (void *)addr + j, tx_size, SPI_DIR_TX); s5c73m3_spi_write()
90 r = spi_xmit(spi_dev, (void *)addr + j, extra, SPI_DIR_TX); s5c73m3_spi_write()
95 return spi_xmit(spi_dev, padding, sizeof(padding), SPI_DIR_TX); s5c73m3_spi_write()
101 struct spi_device *spi_dev = state->spi_dev; s5c73m3_spi_read() local
108 r = spi_xmit(spi_dev, addr + j, tx_size, SPI_DIR_RX); s5c73m3_spi_read()
115 return spi_xmit(spi_dev, addr + j, extra, SPI_DIR_RX); s5c73m3_spi_read()
134 state->spi_dev = spi; s5c73m3_spi_probe()
H A Ds5c73m3.h388 struct spi_device *spi_dev; member in struct:s5c73m3
/linux-4.4.14/drivers/staging/iio/adc/
H A Dad7816.c46 struct spi_device *spi_dev; member in struct:ad7816_chip_info
60 struct spi_device *spi_dev = chip->spi_dev; ad7816_spi_read() local
66 ret = spi_write(spi_dev, &chip->channel_id, sizeof(chip->channel_id)); ad7816_spi_read()
68 dev_err(&spi_dev->dev, "SPI channel setting error\n"); ad7816_spi_read()
86 ret = spi_read(spi_dev, &buf, sizeof(*data)); ad7816_spi_read()
88 dev_err(&spi_dev->dev, "SPI data read error\n"); ad7816_spi_read()
99 struct spi_device *spi_dev = chip->spi_dev; ad7816_spi_write() local
104 ret = spi_write(spi_dev, &data, sizeof(data)); ad7816_spi_write()
106 dev_err(&spi_dev->dev, "SPI oti data write error\n"); ad7816_spi_write()
182 dev_err(&chip->spi_dev->dev, "Invalid channel id %lu for %s.\n", ad7816_store_channel()
186 dev_err(&chip->spi_dev->dev, ad7816_store_channel()
190 dev_err(&chip->spi_dev->dev, ad7816_store_channel()
344 static int ad7816_probe(struct spi_device *spi_dev) ad7816_probe() argument
348 unsigned short *pins = spi_dev->dev.platform_data; ad7816_probe()
353 dev_err(&spi_dev->dev, "No necessary GPIO platform data.\n"); ad7816_probe()
357 indio_dev = devm_iio_device_alloc(&spi_dev->dev, sizeof(*chip)); ad7816_probe()
362 dev_set_drvdata(&spi_dev->dev, indio_dev); ad7816_probe()
364 chip->spi_dev = spi_dev; ad7816_probe()
371 ret = devm_gpio_request(&spi_dev->dev, chip->rdwr_pin, ad7816_probe()
372 spi_get_device_id(spi_dev)->name); ad7816_probe()
374 dev_err(&spi_dev->dev, "Fail to request rdwr gpio PIN %d.\n", ad7816_probe()
379 ret = devm_gpio_request(&spi_dev->dev, chip->convert_pin, ad7816_probe()
380 spi_get_device_id(spi_dev)->name); ad7816_probe()
382 dev_err(&spi_dev->dev, "Fail to request convert gpio PIN %d.\n", ad7816_probe()
387 ret = devm_gpio_request(&spi_dev->dev, chip->busy_pin, ad7816_probe()
388 spi_get_device_id(spi_dev)->name); ad7816_probe()
390 dev_err(&spi_dev->dev, "Fail to request busy gpio PIN %d.\n", ad7816_probe()
396 indio_dev->name = spi_get_device_id(spi_dev)->name; ad7816_probe()
397 indio_dev->dev.parent = &spi_dev->dev; ad7816_probe()
401 if (spi_dev->irq) { ad7816_probe()
403 ret = devm_request_threaded_irq(&spi_dev->dev, spi_dev->irq, ad7816_probe()
413 ret = devm_iio_device_register(&spi_dev->dev, indio_dev); ad7816_probe()
417 dev_info(&spi_dev->dev, "%s temperature sensor and ADC registered.\n", ad7816_probe()
/linux-4.4.14/drivers/net/ethernet/qualcomm/
H A Dqca_7k.c62 spi_sync(qca->spi_dev, msg); qcaspi_read_register()
74 ret = spi_sync(qca->spi_dev, msg); qcaspi_read_register()
104 spi_sync(qca->spi_dev, msg); qcaspi_write_register()
116 ret = spi_sync(qca->spi_dev, msg); qcaspi_write_register()
140 ret = spi_sync(qca->spi_dev, msg); qcaspi_tx_cmd()
H A Dqca_debug.c108 qca->spi_dev->irq); qcaspi_info_show()
115 (unsigned long)qca->spi_dev->max_speed_hz); qcaspi_info_show()
117 qca->spi_dev->mode); qcaspi_info_show()
119 (unsigned int)qca->spi_dev->chip_select); qcaspi_info_show()
186 strlcpy(p->bus_info, dev_name(&qca->spi_dev->dev), qcaspi_get_drvinfo()
H A Dqca_spi.c116 ret = spi_sync(qca->spi_dev, msg); qcaspi_write_burst()
137 ret = spi_sync(qca->spi_dev, msg); qcaspi_write_legacy()
164 ret = spi_sync(qca->spi_dev, msg); qcaspi_read_burst()
185 ret = spi_sync(qca->spi_dev, msg); qcaspi_read_legacy()
628 ret = request_irq(qca->spi_dev->irq, qcaspi_intr_handler, 0, qcaspi_netdev_open()
632 QCASPI_DRV_NAME, qca->spi_dev->irq, ret); qcaspi_netdev_open()
650 free_irq(qca->spi_dev->irq, qca); qcaspi_netdev_close()
911 qca->spi_dev = spi; qca_spi_probe()
H A Dqca_spi.h80 struct spi_device *spi_dev; member in struct:qcaspi
/linux-4.4.14/drivers/nfc/st-nci/
H A Dspi.c51 struct spi_device *spi_dev; member in struct:st_nci_spi_phy
72 enable_irq(phy->spi_dev->irq); st_nci_spi_enable()
83 disable_irq_nosync(phy->spi_dev->irq); st_nci_spi_disable()
96 struct spi_device *dev = phy->spi_dev; st_nci_spi_write()
144 struct spi_device *dev = phy->spi_dev; st_nci_spi_read()
197 if (!phy || !phy->ndlc || irq != phy->spi_dev->irq) { st_nci_irq_thread_fn()
202 dev = phy->spi_dev; st_nci_irq_thread_fn()
323 phy->spi_dev = dev; st_nci_spi_probe()
/linux-4.4.14/drivers/video/fbdev/omap2/displays-new/
H A Dpanel-tpo-td028ttec1.c42 struct spi_device *spi_dev; member in struct:panel_drv_data
72 rc = spi_write(ddata->spi_dev, (u8 *)&tx_buf, jbt_ret_write_0()
75 dev_err(&ddata->spi_dev->dev, jbt_ret_write_0()
88 rc = spi_write(ddata->spi_dev, (u8 *)tx_buf, jbt_reg_write_1()
91 dev_err(&ddata->spi_dev->dev, jbt_reg_write_1()
106 rc = spi_write(ddata->spi_dev, (u8 *)tx_buf, jbt_reg_write_2()
110 dev_err(&ddata->spi_dev->dev, jbt_reg_write_2()
433 ddata->spi_dev = spi; td028ttec1_panel_probe()
476 dev_dbg(&ddata->spi_dev->dev, "%s\n", __func__); td028ttec1_panel_remove()
/linux-4.4.14/drivers/tty/serial/
H A Difx6x60.c155 pm_runtime_get(&ifx_dev->spi_dev->dev); ifx_spi_power_state_set()
178 pm_runtime_put(&ifx_dev->spi_dev->dev); ifx_spi_power_state_clear()
283 dev_warn(&ifx_dev->spi_dev->dev, "*** SPI Timeout ***"); ifx_spi_timeout()
668 dev_dbg(&ifx_dev->spi_dev->dev, ifx_spi_complete()
673 dev_dbg(&ifx_dev->spi_dev->dev, ifx_spi_complete()
691 dev_dbg(&ifx_dev->spi_dev->dev, "SPI transfer error %d", ifx_spi_complete()
761 ifx_dev->spi_xfer.speed_hz = ifx_dev->spi_dev->max_speed_hz; ifx_spi_io()
764 ifx_dev->spi_dev->bits_per_word; ifx_spi_io()
793 retval = spi_async(ifx_dev->spi_dev, &ifx_dev->spi_msg); ifx_spi_io()
843 ifx_dev->minor, &ifx_dev->spi_dev->dev); ifx_spi_create_port()
845 dev_dbg(&ifx_dev->spi_dev->dev, ifx_spi_create_port()
941 dma_free_coherent(&ifx_dev->spi_dev->dev, ifx_spi_free_device()
945 dma_free_coherent(&ifx_dev->spi_dev->dev, ifx_spi_free_device()
980 dev_warn(&ifx_dev->spi_dev->dev, "Modem reset timeout: (state:%lx)", ifx_spi_reset()
1024 ifx_dev->spi_dev = spi; ifx_spi_spi_probe()
1058 ifx_dev->tx_buffer = dma_alloc_coherent(ifx_dev->spi_dev->dev.parent, ifx_spi_spi_probe()
1067 ifx_dev->rx_buffer = dma_alloc_coherent(ifx_dev->spi_dev->dev.parent, ifx_spi_spi_probe()
H A Difx6x60.h72 struct spi_device *spi_dev; member in struct:ifx_spi_device
/linux-4.4.14/drivers/video/backlight/
H A Dtdo24m.c29 struct spi_device *spi_dev; member in struct:tdo24m
212 err = spi_sync(lcd->spi_dev, &lcd->msg); tdo24m_writes()
359 lcd->spi_dev = spi; tdo24m_probe()
H A Dcorgi_lcd.c87 struct spi_device *spi_dev; member in struct:corgi_lcd
188 return spi_sync(lcd->spi_dev, &msg); corgi_ssp_lcdtg_send()
488 struct spi_device *spi = lcd->spi_dev; setup_gpio_backlight()
550 lcd->spi_dev = spi; corgi_lcd_probe()
/linux-4.4.14/drivers/spi/
H A Dspi-dw.c31 /* Slave spi_dev related */

Completed in 694 milliseconds