Lines Matching refs:indio_dev
238 static int apds9300_read_raw(struct iio_dev *indio_dev, in apds9300_read_raw() argument
243 struct apds9300_data *data = iio_priv(indio_dev); in apds9300_read_raw()
276 static int apds9300_read_thresh(struct iio_dev *indio_dev, in apds9300_read_thresh() argument
281 struct apds9300_data *data = iio_priv(indio_dev); in apds9300_read_thresh()
297 static int apds9300_write_thresh(struct iio_dev *indio_dev, in apds9300_write_thresh() argument
302 struct apds9300_data *data = iio_priv(indio_dev); in apds9300_write_thresh()
315 static int apds9300_read_interrupt_config(struct iio_dev *indio_dev, in apds9300_read_interrupt_config() argument
320 struct apds9300_data *data = iio_priv(indio_dev); in apds9300_read_interrupt_config()
325 static int apds9300_write_interrupt_config(struct iio_dev *indio_dev, in apds9300_write_interrupt_config() argument
329 struct apds9300_data *data = iio_priv(indio_dev); in apds9300_write_interrupt_config()
410 struct iio_dev *indio_dev; in apds9300_probe() local
413 indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data)); in apds9300_probe()
414 if (!indio_dev) in apds9300_probe()
417 data = iio_priv(indio_dev); in apds9300_probe()
418 i2c_set_clientdata(client, indio_dev); in apds9300_probe()
427 indio_dev->dev.parent = &client->dev; in apds9300_probe()
428 indio_dev->channels = apds9300_channels; in apds9300_probe()
429 indio_dev->num_channels = ARRAY_SIZE(apds9300_channels); in apds9300_probe()
430 indio_dev->name = APDS9300_DRV_NAME; in apds9300_probe()
431 indio_dev->modes = INDIO_DIRECT_MODE; in apds9300_probe()
434 indio_dev->info = &apds9300_info; in apds9300_probe()
436 indio_dev->info = &apds9300_info_no_irq; in apds9300_probe()
442 APDS9300_IRQ_NAME, indio_dev); in apds9300_probe()
449 ret = iio_device_register(indio_dev); in apds9300_probe()
463 struct iio_dev *indio_dev = i2c_get_clientdata(client); in apds9300_remove() local
464 struct apds9300_data *data = iio_priv(indio_dev); in apds9300_remove()
466 iio_device_unregister(indio_dev); in apds9300_remove()
478 struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev)); in apds9300_suspend() local
479 struct apds9300_data *data = iio_priv(indio_dev); in apds9300_suspend()
491 struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev)); in apds9300_resume() local
492 struct apds9300_data *data = iio_priv(indio_dev); in apds9300_resume()