Home
last modified time | relevance | path

Searched +full:iio +full:- +full:consumer (Results 1 – 25 of 216) sorted by relevance

123456789

/linux/Documentation/driver-api/iio/
H A Dhw-consumer.rst2 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 Dindustrialio-hw-consumer.c1 // 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 DKconfig1 # 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
H A Dindustrialio-buffer-cb.c1 // SPDX-License-Identifier: GPL-2.0-only
10 #include <linux/iio/iio.h>
11 #include <linux/iio/buffer_impl.h>
12 #include <linux/iio/consumer.h>
30 return cb_buff->cb(data, cb_buff->private); in iio_buffer_cb_store_to()
37 bitmap_free(cb_buff->buffer.scan_mask); in iio_buffer_cb_release()
59 return ERR_PTR(-EINVAL); in iio_channel_get_all_cb()
64 return ERR_PTR(-ENOMEM); in iio_channel_get_all_cb()
66 iio_buffer_init(&cb_buff->buffer); in iio_channel_get_all_cb()
68 cb_buff->private = private; in iio_channel_get_all_cb()
[all …]
/linux/drivers/staging/iio/Documentation/
H A Dinkernel.txt3 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/include/linux/iio/
H A Dconsumer.h1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Industrial I/O in kernel consumer interface
11 #include <linux/iio/types.h>
19 * struct iio_channel - everything needed for a consumer to use a channel
22 * @data: Data about the channel used by consumer.
31 * iio_channel_get() - get description of all that is needed to access channel.
32 * @dev: Pointer to consumer device. Device name must match
34 * with which the desired provider to consumer mapping
36 * @consumer_channel: Unique name to identify the channel on the consumer
38 * the consumer. E.g. 'battery_voltage'
[all …]
/linux/drivers/iio/
H A Dindustrialio-backend.c1 // 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 Dindustrialio-trigger.c1 // 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/adc/
H A Dad7766.c1 // 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 Dsd_adc_modulator.c1 // 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 Dti-lmp92064.c1 // 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 Dti-adc081c.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * TI ADC081C/ADC101C/ADC121C 8/10/12-bit ADC driver
14 * bits handled. For the 8-bit and 10-bit models the least-significant 4 or 2
24 #include <linux/iio/iio.h>
25 #include <linux/iio/buffer.h>
26 #include <linux/iio/trigger_consumer.h>
27 #include <linux/iio/triggered_buffer.h>
28 #include <linux/regulator/consumer.h>
46 static int adc081c_read_raw(struct iio_dev *iio, in adc081c_read_raw() argument
50 struct adc081c *adc = iio_priv(iio); in adc081c_read_raw()
[all …]
H A Dmax11100.c1 // 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 Dti-ads7924.c1 // SPDX-License-Identifier: GPL-2.0
3 * IIO driver for Texas Instruments ADS7924 ADC, 12-bit, 4-Channels, I2C
8 * based on iio/adc/ti-ads1015.c
16 #include <linux/gpio/consumer.h>
23 #include <linux/regulator/consumer.h>
25 #include <linux/iio/iio.h>
26 #include <linux/iio/types.h>
98 * The power-up time is allowed to elapse whenever the device has been shutdown
99 * in idle mode. Power-up time can allow external circuits, such as an
103 * If a power-up time is not required, set the bits to '0' to effectively bypass.
[all …]
H A Dad7780.c1 // 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 …]
/linux/drivers/power/supply/
H A Dlego_ev3_battery.c18 #include <linux/gpio/consumer.h>
19 #include <linux/iio/consumer.h>
20 #include <linux/iio/types.h>
46 val->intval = batt->technology; in lego_ev3_battery_get_property()
49 /* battery voltage is iio channel * 2 + Vce of transistor */ in lego_ev3_battery_get_property()
50 ret = iio_read_channel_processed(batt->iio_v, &val->intval); in lego_ev3_battery_get_property()
54 val->intval *= 2000; in lego_ev3_battery_get_property()
55 val->intval += 50000; in lego_ev3_battery_get_property()
58 ret = iio_read_channel_processed(batt->iio_i, &val2); in lego_ev3_battery_get_property()
64 val->intval += val2; in lego_ev3_battery_get_property()
[all …]
H A Dgeneric-adc-battery.c1 // SPDX-License-Identifier: GPL-2.0
3 * Generic battery driver using IIO
10 #include <linux/gpio/consumer.h>
18 #include <linux/iio/consumer.h>
19 #include <linux/iio/types.h>
21 #include <linux/devm-helpers.h>
62 schedule_delayed_work(&adc_bat->bat_work, msecs_to_jiffies(0)); in gab_ext_power_changed()
71 * should correspond one-to-one with enum chan_type.
82 if (!adc_bat->charge_finished) in gab_charge_finished()
84 return gpiod_get_value(adc_bat->charge_finished); in gab_charge_finished()
[all …]
/linux/Documentation/devicetree/bindings/iio/adc/
H A Dingenic,adc.yaml1 # 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/dac/
H A Dds4424.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * 7-bit, Multi-Channel Sink/Source Current DAC Driver
11 #include <linux/regulator/consumer.h>
14 #include <linux/iio/iio.h>
15 #include <linux/iio/driver.h>
16 #include <linux/iio/machine.h>
17 #include <linux/iio/consumer.h>
76 mutex_lock(&data->lock); in ds4424_get_value()
77 ret = i2c_smbus_read_byte_data(data->client, DS4424_DAC_ADDR(channel)); in ds4424_get_value()
84 mutex_unlock(&data->lock); in ds4424_get_value()
[all …]
H A Dad5764.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Analog devices AD5764, AD5764R, AD5744, AD5744R quad-channel
16 #include <linux/regulator/consumer.h>
18 #include <linux/iio/iio.h>
19 #include <linux/iio/sysfs.h>
33 * struct ad5764_chip_info - chip specific information
34 * @int_vref: Value of the internal reference voltage in uV - 0 if external
44 * struct ad5764_state - driver instance specific data
90 .shift = 16 - (_bits), \
130 mutex_lock(&st->lock); in ad5764_write()
[all …]
/linux/drivers/iio/imu/bmi160/
H A Dbmi160.h1 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <linux/iio/iio.h>
6 #include <linux/regulator/consumer.h>
/linux/drivers/iio/potentiometer/
H A Dx9250.c1 // 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 Dadc-joystick.yaml1 # 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 Diio-mux.c1 // SPDX-License-Identifier: GPL-2.0
3 * IIO multiplexer driver
11 #include <linux/iio/consumer.h>
12 #include <linux/iio/iio.h>
16 #include <linux/mux/consumer.h>
41 struct mux_child *child = &mux->child[idx]; in iio_mux_select()
42 struct iio_chan_spec const *chan = &mux->chan[idx]; in iio_mux_select()
46 ret = mux_control_select_delay(mux->control, chan->channel, in iio_mux_select()
47 mux->delay_us); in iio_mux_select()
49 mux->cached_state = -1; in iio_mux_select()
[all …]
/linux/drivers/iio/imu/st_lsm9ds0/
H A Dst_lsm9ds0_core.c1 // 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 …]

123456789