zpa2326.c (8a2252201656a147a9d7b1892028cef15869032e) zpa2326.c (44f14695bd936043de25313cfeb1c863a1060ad7)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Murata ZPA2326 pressure and temperature sensor IIO driver
4 *
5 * Copyright (c) 2016 Parrot S.A.
6 *
7 * Author: Gregor Boirie <gregor.boirie@parrot.com>
8 */

--- 89 unchanged lines hidden (view full) ---

98/* Return the highest hardware sampling frequency available. */
99static const struct zpa2326_frequency *zpa2326_highest_frequency(void)
100{
101 return &zpa2326_sampling_frequencies[
102 ARRAY_SIZE(zpa2326_sampling_frequencies) - 1];
103}
104
105/**
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Murata ZPA2326 pressure and temperature sensor IIO driver
4 *
5 * Copyright (c) 2016 Parrot S.A.
6 *
7 * Author: Gregor Boirie <gregor.boirie@parrot.com>
8 */

--- 89 unchanged lines hidden (view full) ---

98/* Return the highest hardware sampling frequency available. */
99static const struct zpa2326_frequency *zpa2326_highest_frequency(void)
100{
101 return &zpa2326_sampling_frequencies[
102 ARRAY_SIZE(zpa2326_sampling_frequencies) - 1];
103}
104
105/**
106 * struct zpa_private - Per-device internal private state
106 * struct zpa2326_private - Per-device internal private state
107 * @timestamp: Buffered samples ready datum.
108 * @regmap: Underlying I2C / SPI bus adapter used to abstract slave register
109 * accesses.
110 * @result: Allows sampling logic to get completion status of operations
111 * that interrupt handlers perform asynchronously.
112 * @data_ready: Interrupt handler uses this to wake user context up at sampling
113 * operation completion.
114 * @trigger: Optional hardware / interrupt driven trigger used to notify

--- 1262 unchanged lines hidden (view full) ---

1377 return 0;
1378}
1379
1380static const struct iio_trigger_ops zpa2326_trigger_ops = {
1381 .set_trigger_state = zpa2326_set_trigger_state,
1382};
1383
1384/**
107 * @timestamp: Buffered samples ready datum.
108 * @regmap: Underlying I2C / SPI bus adapter used to abstract slave register
109 * accesses.
110 * @result: Allows sampling logic to get completion status of operations
111 * that interrupt handlers perform asynchronously.
112 * @data_ready: Interrupt handler uses this to wake user context up at sampling
113 * operation completion.
114 * @trigger: Optional hardware / interrupt driven trigger used to notify

--- 1262 unchanged lines hidden (view full) ---

1377 return 0;
1378}
1379
1380static const struct iio_trigger_ops zpa2326_trigger_ops = {
1381 .set_trigger_state = zpa2326_set_trigger_state,
1382};
1383
1384/**
1385 * zpa2326_init_trigger() - Create an interrupt driven / hardware trigger
1385 * zpa2326_init_managed_trigger() - Create interrupt driven / hardware trigger
1386 * allowing to notify external devices a new sample is
1387 * ready.
1388 * @parent: Hardware sampling device @indio_dev is a child of.
1389 * @indio_dev: The IIO device associated with the sampling hardware.
1390 * @private: Internal private state related to @indio_dev.
1391 * @irq: Optional interrupt line the hardware uses to notify new data
1392 * samples are ready. Negative or zero values indicate no interrupts
1393 * are available, meaning polling is required.

--- 322 unchanged lines hidden ---
1386 * allowing to notify external devices a new sample is
1387 * ready.
1388 * @parent: Hardware sampling device @indio_dev is a child of.
1389 * @indio_dev: The IIO device associated with the sampling hardware.
1390 * @private: Internal private state related to @indio_dev.
1391 * @irq: Optional interrupt line the hardware uses to notify new data
1392 * samples are ready. Negative or zero values indicate no interrupts
1393 * are available, meaning polling is required.

--- 322 unchanged lines hidden ---