/* SPDX-License-Identifier: GPL-2.0 */ /* * Honeywell TruStability HSC Series pressure/temperature sensor * * Copyright (c) 2023 Petre Rodan <[email protected]> */ #ifndef _HSC030PA_H #define _HSC030PA_H #include <linux/types.h> #include <linux/iio/iio.h> #define HSC_REG_MEASUREMENT_RD_SIZE … #define HSC_RESP_TIME_MS … struct device; struct iio_chan_spec; struct iio_dev; struct hsc_data; struct hsc_chip_data; hsc_recv_fn; /** * struct hsc_data * @dev: current device structure * @chip: structure containing chip's channel properties * @recv_cb: function that implements the chip reads * @is_valid: true if last transfer has been validated * @pmin: minimum measurable pressure limit * @pmax: maximum measurable pressure limit * @outmin: minimum raw pressure in counts (based on transfer function) * @outmax: maximum raw pressure in counts (based on transfer function) * @function: transfer function * @p_scale: pressure scale * @p_scale_dec: pressure scale, decimal places * @p_offset: pressure offset * @p_offset_dec: pressure offset, decimal places * @buffer: raw conversion data */ struct hsc_data { … }; struct hsc_chip_data { … }; enum hsc_func_id { … }; int hsc_common_probe(struct device *dev, hsc_recv_fn recv); #endif