aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/light/st_uvis25.h
blob: 78bc56aad1299f3feb659304a1341f3ea4839413 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* 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 */