Lines Matching refs:spi_dev
39 struct spi_device *spi_dev; member
48 ret = spi_read(chip->spi_dev, (u8 *)&chip->rx, sizeof(chip->rx)); in ad7314_spi_read()
50 dev_err(&chip->spi_dev->dev, "SPI read error\n"); in ad7314_spi_read()
68 switch (spi_get_device_id(chip->spi_dev)->driver_data) { in ad7314_show_temperature()
111 static int ad7314_probe(struct spi_device *spi_dev) in ad7314_probe() argument
116 chip = devm_kzalloc(&spi_dev->dev, sizeof(*chip), GFP_KERNEL); in ad7314_probe()
120 spi_set_drvdata(spi_dev, chip); in ad7314_probe()
122 ret = sysfs_create_group(&spi_dev->dev.kobj, &ad7314_group); in ad7314_probe()
126 chip->hwmon_dev = hwmon_device_register(&spi_dev->dev); in ad7314_probe()
131 chip->spi_dev = spi_dev; in ad7314_probe()
135 sysfs_remove_group(&spi_dev->dev.kobj, &ad7314_group); in ad7314_probe()
139 static int ad7314_remove(struct spi_device *spi_dev) in ad7314_remove() argument
141 struct ad7314_data *chip = spi_get_drvdata(spi_dev); in ad7314_remove()
144 sysfs_remove_group(&spi_dev->dev.kobj, &ad7314_group); in ad7314_remove()