| /linux/Documentation/driver-api/iio/ |
| H A D | hw-consumer.rst | 2 HW consumer 4 An IIO device can be directly connected to another device in hardware. In this 5 case the buffers between IIO provider and IIO consumer are handled by hardware. 6 The Industrial I/O HW consumer offers a way to bond these IIO devices without 8 :file:`drivers/iio/buffer/hw-consumer.c` 11 * struct iio_hw_consumer — Hardware consumer structure 12 * :c:func:`iio_hw_consumer_alloc` — Allocate IIO hardware consumer 13 * :c:func:`iio_hw_consumer_free` — Free IIO hardware consumer 14 * :c:func:`iio_hw_consumer_enable` — Enable IIO hardware consumer 15 * :c:func:`iio_hw_consumer_disable` — Disable IIO hardware consumer [all …]
|
| /linux/drivers/iio/buffer/ |
| H A D | industrialio-hw-consumer.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Author: Lars-Peter Clausen <lars@metafoo.de> 12 #include <linux/iio/iio.h> 13 #include <linux/iio/consumer.h> 14 #include <linux/iio/hw-consumer.h> 15 #include <linux/iio/buffer_impl.h> 18 * struct iio_hw_consumer - IIO hw consumer block 20 * @channels: IIO provider channels. 58 list_for_each_entry(buf, &hwc->buffers, head) { in iio_hw_consumer_get_buffer() 59 if (buf->indio_dev == indio_dev) in iio_hw_consumer_get_buffer() [all …]
|
| H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 8 tristate "IIO callback buffer used for push in-kernel interfaces" 10 Should be selected by any drivers that do in-kernel push 11 usage. That is, those where the data is pushed to the consumer. 16 Provides the generic IIO DMA buffer infrastructure that can be used by 17 drivers for devices with DMA support to implement the IIO buffer. 26 Provides a bonding of the generic IIO DMA buffer infrastructure with the 36 Provides a way to bonding when an IIO device has a direct connection 40 Should be selected by drivers that want to use the generic Hw consumer
|
| /linux/drivers/staging/iio/Documentation/ |
| H A D | inkernel.txt | 3 The IIO subsystem can act as a layer under other elements of the kernel 7 Describing the channel mapping (iio/machine.h) 17 adc_channel_label identifies the channel on the IIO device by being 20 consumer_dev_name allows identification of the consumer device. 21 This are then used to find the channel mapping from the consumer device (see 24 Finally consumer_channel is a string identifying the channel to the consumer. 27 An array of these structures is then passed to the IIO driver. 36 The result of this is that the IIO core now has all the information needed 37 to associate a given channel with the consumer requesting it. 39 Acting as an IIO consumer (consumer.h) [all …]
|
| /linux/drivers/iio/ |
| H A D | industrialio-backend.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Framework to handle complex IIO aggregate devices. 6 * can be "linked" against one or multiple backend devices. All the IIO and 11 * ------------------------------------------------------- 12 * ------------------ | ------------ ------------ ------- FPGA| 13 * | ADC |------------------------| | ADC CORE |---------| DMA CORE |------| RAM | | 14 * | (Frontend/IIO) | Serial Data (eg: LVDS) | |(backend) |---------| |------| | | 15 * | |------------------------| ------------ ------------ ------- | 16 * ------------------ ------------------------------------------------------- 19 * - Backends should register themselves with devm_iio_backend_register() [all …]
|
| H A D | industrialio-trigger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 16 #include <linux/iio/iio.h> 17 #include <linux/iio/iio-opaque.h> 18 #include <linux/iio/trigger.h> 21 #include <linux/iio/trigger_consumer.h> 23 /* RFC - Question of approach 41 * name_show() - retrieve useful identifying name 55 return sysfs_emit(buf, "%s\n", trig->name); in name_show() 72 trig_info->id = ida_alloc(&iio_trigger_ida, GFP_KERNEL); in iio_trigger_register() 73 if (trig_info->id < 0) in iio_trigger_register() [all …]
|
| /linux/drivers/iio/light/ |
| H A D | cm3605.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 #include <linux/iio/iio.h> 15 #include <linux/iio/sysfs.h> 16 #include <linux/iio/events.h> 17 #include <linux/iio/consumer.h> /* To get our ADC channel */ 18 #include <linux/iio/types.h> /* To deal with our ADC channel */ 23 #include <linux/regulator/consumer.h> 24 #include <linux/gpio/consumer.h> 36 * struct cm3605 - CM3605 state 40 * @aout: IIO ADC channel to convert the AOUT signal [all …]
|
| /linux/drivers/iio/adc/ |
| H A D | ad7766.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 12 #include <linux/gpio/consumer.h> 14 #include <linux/regulator/consumer.h> 18 #include <linux/iio/iio.h> 19 #include <linux/iio/buffer.h> 20 #include <linux/iio/trigger.h> 21 #include <linux/iio/trigger_consumer.h> 22 #include <linux/iio/triggered_buffer.h> 69 struct iio_dev *indio_dev = pf->indio_dev; in ad7766_trigger_handler() 73 ret = spi_sync(ad7766->spi, &ad7766->msg); in ad7766_trigger_handler() [all …]
|
| H A D | sd_adc_modulator.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved 9 #include <linux/iio/backend.h> 10 #include <linux/iio/iio.h> 11 #include <linux/iio/triggered_buffer.h> 16 #include <linux/regulator/consumer.h> 39 if (priv->vref) in iio_sd_mod_enable() 40 return regulator_enable(priv->vref); in iio_sd_mod_enable() 49 if (priv->vref) in iio_sd_mod_disable() 50 regulator_disable(priv->vref); in iio_sd_mod_disable() [all …]
|
| H A D | ti-lmp92064.c | 1 // SPDX-License-Identifier: GPL-2.0 7 * Based on linux/drivers/iio/adc/ti-tsc2046.c 12 #include <linux/gpio/consumer.h> 15 #include <linux/regulator/consumer.h> 18 #include <linux/iio/iio.h> 19 #include <linux/iio/buffer.h> 20 #include <linux/iio/driver.h> 21 #include <linux/iio/triggered_buffer.h> 22 #include <linux/iio/trigger_consumer.h> 46 * - IN Current (INC) [all …]
|
| H A D | max11100.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * iio/adc/max11100.c 4 * Maxim max11100 ADC Driver with IIO interface 6 * Copyright (C) 2016-17 Renesas Electronics Corporation 7 * Copyright (C) 2016-17 Jacopo Mondi 13 #include <linux/regulator/consumer.h> 17 #include <linux/iio/iio.h> 18 #include <linux/iio/driver.h> 55 ret = spi_read(state->spi, state->buffer, sizeof(state->buffer)); in max11100_read_single() 57 dev_err(&indio_dev->dev, "SPI transfer failed\n"); in max11100_read_single() [all …]
|
| H A D | max1241.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * MAX1241 low-power, 12-bit serial ADC 5 * Datasheet: https://datasheets.maximintegrated.com/en/ds/MAX1240-MAX1241.pdf 9 #include <linux/gpio/consumer.h> 10 #include <linux/iio/iio.h> 12 #include <linux/regulator/consumer.h> 57 .rx_buf = &adc->data, in max1241_read() 62 return spi_sync_transfer(adc->spi, xfers, ARRAY_SIZE(xfers)); in max1241_read() 74 mutex_lock(&adc->lock); in max1241_read_raw() 76 if (adc->shutdown) { in max1241_read_raw() [all …]
|
| H A D | ad7780.c | 1 // SPDX-License-Identifier: GPL-2.0 15 #include <linux/regulator/consumer.h> 18 #include <linux/gpio/consumer.h> 22 #include <linux/iio/iio.h> 23 #include <linux/iio/sysfs.h> 24 #include <linux/iio/adc/ad_sigma_delta.h> 100 gpiod_set_value(st->powerdown_gpio, val); in ad7780_set_mode() 118 voltage_uv = regulator_get_voltage(st->reg); in ad7780_read_raw() 122 *val = voltage_uv * st->gain; in ad7780_read_raw() 123 *val2 = chan->scan_type.realbits - 1; in ad7780_read_raw() [all …]
|
| H A D | ti-ads8344.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * ADS8344 16-bit 8-Channel ADC driver 11 #include <linux/iio/buffer.h> 12 #include <linux/iio/iio.h> 14 #include <linux/regulator/consumer.h> 26 * Lock protecting access to adc->tx_buff and rx_buff, 79 struct spi_device *spi = adc->spi; in ads8344_adc_conversion() 82 adc->tx_buf = ADS8344_START; in ads8344_adc_conversion() 84 adc->tx_buf |= ADS8344_SINGLE_END; in ads8344_adc_conversion() 85 adc->tx_buf |= ADS8344_CHANNEL(channel); in ads8344_adc_conversion() [all …]
|
| /linux/drivers/iio/dac/ |
| H A D | dpot-dac.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * IIO DAC emulation driver using a digital potentiometer 15 * .------. 16 * .-----------. | | 17 * | vref |--' .---. 18 * | regulator |--. | | 19 * '-----------' | | d | 22 * | | t |<---------+ 24 * | '---' dac output voltage 26 * '------+------------+ [all …]
|
| H A D | ad8801.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * IIO DAC driver for Analog Devices AD8801 DAC 5 * Copyright (C) 2016 Gwenhael Goavec-Merou 8 #include <linux/iio/iio.h> 10 #include <linux/regulator/consumer.h> 33 state->data = cpu_to_be16((channel << AD8801_CFG_ADDR_OFFSET) | value); in ad8801_spi_write() 34 return spi_write(state->spi, &state->data, sizeof(state->data)); in ad8801_spi_write() 46 return -EINVAL; in ad8801_write_raw() 48 ret = ad8801_spi_write(state, chan->channel, val); in ad8801_write_raw() 50 state->dac_cache[chan->channel] = val; in ad8801_write_raw() [all …]
|
| H A D | mcp4922.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 14 #include <linux/iio/iio.h> 15 #include <linux/iio/sysfs.h> 16 #include <linux/regulator/consumer.h> 47 .shift = 12 - (bits), \ 53 state->mosi[1] = val & 0xff; in mcp4922_spi_write() 54 state->mosi[0] = (addr == 0) ? 0x00 : 0x80; in mcp4922_spi_write() 55 state->mosi[0] |= 0x30 | ((val >> 8) & 0x0f); in mcp4922_spi_write() 57 return spi_write(state->spi, state->mosi, 2); in mcp4922_spi_write() 70 *val = state->value[chan->channel]; in mcp4922_read_raw() [all …]
|
| /linux/Documentation/devicetree/bindings/iio/adc/ |
| H A D | ingenic,adc.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 # Copyright 2019-2020 Artur Rojek 4 --- 5 $id: http://devicetree.org/schemas/iio/adc/ingenic,adc.yaml# 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: Ingenic JZ47xx ADC controller IIO 11 - Artur Rojek <contact@artur-rojek.eu> 18 https://github.com/devicetree-org/dt-schema/blob/master/schemas/iio/iio-consumer.yaml, 19 giving a phandle and IIO specifier pair ("io-channels") to the ADC controller. 24 - ingenic,jz4725b-adc [all …]
|
| /linux/drivers/iio/imu/bmi160/ |
| H A D | bmi160.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 5 #include <linux/iio/iio.h> 6 #include <linux/regulator/consumer.h>
|
| /linux/drivers/iio/potentiometer/ |
| H A D | x9250.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * x9250.c -- Renesas X9250 potentiometers IIO driver 12 #include <linux/gpio/consumer.h> 13 #include <linux/iio/iio.h> 16 #include <linux/regulator/consumer.h> 43 return spi_write_then_read(x9250->spi, txbuf, ARRAY_SIZE(txbuf), NULL, 0); in x9250_write8() 53 return spi_write_then_read(x9250->spi, txbuf, ARRAY_SIZE(txbuf), val, 1); in x9250_read8() 77 int ch = chan->channel; in x9250_read_raw() 90 *val = 1000 * x9250->cfg->kohms; in x9250_read_raw() 95 return -EINVAL; in x9250_read_raw() [all …]
|
| /linux/Documentation/devicetree/bindings/input/ |
| H A D | adc-joystick.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 # Copyright 2019-2020 Artur Rojek 4 --- 5 $id: http://devicetree.org/schemas/input/adc-joystick.yaml# 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 11 - Artur Rojek <contact@artur-rojek.eu> 18 - $ref: input.yaml# 22 const: adc-joystick 24 io-channels: 28 List of phandle and IIO specifier pairs. [all …]
|
| /linux/drivers/iio/multiplexer/ |
| H A D | iio-mux.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * IIO multiplexer driver 12 #include <linux/iio/consumer.h> 13 #include <linux/iio/iio.h> 17 #include <linux/mux/consumer.h> 42 struct mux_child *child = &mux->child[idx]; in iio_mux_select() 43 struct iio_chan_spec const *chan = &mux->chan[idx]; in iio_mux_select() 47 ret = mux_control_select_delay(mux->control, chan->channel, in iio_mux_select() 48 mux->delay_us); in iio_mux_select() 50 mux->cached_state = -1; in iio_mux_select() [all …]
|
| /linux/drivers/iio/imu/st_lsm9ds0/ |
| H A D | st_lsm9ds0_core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 #include <linux/regulator/consumer.h> 16 #include <linux/iio/common/st_sensors.h> 17 #include <linux/iio/iio.h> 24 struct device *dev = lsm9ds0->dev; in st_lsm9ds0_probe_accel() 27 settings = st_accel_get_settings(lsm9ds0->name); in st_lsm9ds0_probe_accel() 29 return dev_err_probe(dev, -ENODEV, "device name %s not recognized.\n", in st_lsm9ds0_probe_accel() 30 lsm9ds0->name); in st_lsm9ds0_probe_accel() 32 lsm9ds0->accel = devm_iio_device_alloc(dev, sizeof(*data)); in st_lsm9ds0_probe_accel() 33 if (!lsm9ds0->accel) in st_lsm9ds0_probe_accel() [all …]
|
| /linux/drivers/iio/magnetometer/ |
| H A D | af8133j.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * af8133j.c - Voltafield AF8133J magnetometer driver 10 #include <linux/gpio/consumer.h> 15 #include <linux/regulator/consumer.h> 17 #include <linux/iio/iio.h> 18 #include <linux/iio/trigger_consumer.h> 19 #include <linux/iio/triggered_buffer.h> 68 return &data->orientation; in af8133j_get_mount_matrix() 103 struct device *dev = &data->client->dev; in af8133j_product_check() 107 ret = regmap_read(data->regmap, AF8133J_REG_PCODE, &val); in af8133j_product_check() [all …]
|
| /linux/drivers/input/touchscreen/ |
| H A D | colibri-vf50-ts.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 12 #include <linux/gpio/consumer.h> 13 #include <linux/iio/consumer.h> 14 #include <linux/iio/types.h> 20 #include <linux/pinctrl/consumer.h> 25 #define DRIVER_NAME "colibri-vf50-ts" 27 #define VF_ADC_MAX ((1 << 12) - 1) 88 gpiod_set_value(vf50_ts->gpio_ym, 1); in vf50_ts_enable_touch_detection() 92 * Pull-Up on GPIO in vf50_ts_enable_touch_detection() 94 pinctrl_pm_select_idle_state(&vf50_ts->pdev->dev); in vf50_ts_enable_touch_detection() [all …]
|