summaryrefslogtreecommitdiffstats
path: root/drivers/iio/humidity/hts221_core.c
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo.bianconi83@gmail.com>2017-07-17 19:39:01 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2017-07-22 21:21:46 +0100
commite7b4b45e1e1f22585cfc986b1c5c99e124def10e (patch)
tree81d5aa17388b09bcfe082647962678864d71dabd /drivers/iio/humidity/hts221_core.c
parente3e25446a3d2d1beb2443b65a919e59a060182d5 (diff)
downloadlinux-e7b4b45e1e1f22585cfc986b1c5c99e124def10e.tar.bz2
iio: humidity: hts221: support active-low interrupts
Add support for active low interrupts (IRQF_TRIGGER_LOW and IRQF_TRIGGER_FALLING). Configure the device as active high or low according to the requested irq line. Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/humidity/hts221_core.c')
-rw-r--r--drivers/iio/humidity/hts221_core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/humidity/hts221_core.c b/drivers/iio/humidity/hts221_core.c
index dc55d9fbc702..25fcb9993998 100644
--- a/drivers/iio/humidity/hts221_core.c
+++ b/drivers/iio/humidity/hts221_core.c
@@ -135,8 +135,7 @@ static const struct iio_chan_spec hts221_channels[] = {
IIO_CHAN_SOFT_TIMESTAMP(2),
};
-static int hts221_write_with_mask(struct hts221_hw *hw, u8 addr, u8 mask,
- u8 val)
+int hts221_write_with_mask(struct hts221_hw *hw, u8 addr, u8 mask, u8 val)
{
u8 data;
int err;