-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iio: light: add support for UVIS25 sensor
add support for STMicroelectronics UVIS25 uv sensor http://www.st.com/resource/en/datasheet/uvis25.pdf - continuos mode support - i2c support - spi support - trigger mode support - system PM support Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
- Loading branch information
Lorenzo Bianconi
authored and
Jonathan Cameron
committed
Dec 2, 2017
1 parent
f4457f7
commit 3025c86
Showing
6 changed files
with
560 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* STMicroelectronics uvis25 sensor driver | ||
* | ||
* Copyright 2017 STMicroelectronics Inc. | ||
* | ||
* Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> | ||
* | ||
* Licensed under the GPL-2. | ||
*/ | ||
|
||
#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 */ |
Oops, something went wrong.