Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0-only */
2
3/*
4 * The industrial I/O ADC firmware property parsing helpers
5 *
6 * Copyright (c) 2025 Matti Vaittinen <mazziesaccount@gmail.com>
7 */
8
9#ifndef _INDUSTRIAL_IO_ADC_HELPERS_H_
10#define _INDUSTRIAL_IO_ADC_HELPERS_H_
11
12#include <linux/property.h>
13
14struct device;
15struct iio_chan_spec;
16
17static inline int iio_adc_device_num_channels(struct device *dev)
18{
19 return device_get_named_child_node_count(dev, "channel");
20}
21
22int devm_iio_adc_device_alloc_chaninfo_se(struct device *dev,
23 const struct iio_chan_spec *template,
24 int max_chan_id,
25 struct iio_chan_spec **cs);
26
27#endif /* _INDUSTRIAL_IO_ADC_HELPERS_H_ */