mirror of
https://github.com/torvalds/linux.git
synced 2026-05-02 13:32:40 -04:00
Use iio_push_to_buffers_with_ts() to allow source size runtime check. Also move the structure used as the source to the stack as it is only 16 bytes and not the target of an DMA or similar. Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://patch.msgid.link/20250802164436.515988-12-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
37 lines
799 B
C
37 lines
799 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* STMicroelectronics uvis25 sensor driver
|
|
*
|
|
* Copyright 2017 STMicroelectronics Inc.
|
|
*
|
|
* Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
|
|
*/
|
|
|
|
#ifndef ST_UVIS25_H
|
|
#define ST_UVIS25_H
|
|
|
|
#define ST_UVIS25_DEV_NAME "uvis25"
|
|
|
|
#include <linux/iio/iio.h>
|
|
|
|
/**
|
|
* struct st_uvis25_hw - ST UVIS25 sensor instance
|
|
* @regmap: Register map of the device.
|
|
* @trig: The trigger in use by the driver.
|
|
* @enabled: Status of the sensor (false->off, true->on).
|
|
* @irq: Device interrupt line (I2C or SPI).
|
|
*/
|
|
struct st_uvis25_hw {
|
|
struct regmap *regmap;
|
|
|
|
struct iio_trigger *trig;
|
|
bool enabled;
|
|
int irq;
|
|
};
|
|
|
|
extern const struct dev_pm_ops st_uvis25_pm_ops;
|
|
|
|
int st_uvis25_probe(struct device *dev, int irq, struct regmap *regmap);
|
|
|
|
#endif /* ST_UVIS25_H */
|