diff options
author | Haibo Chen <haibo.chen@nxp.com> | 2022-05-24 16:23:50 +0800 |
---|---|---|
committer | Jason Liu <jason.hui.liu@nxp.com> | 2022-05-25 11:47:47 +0800 |
commit | 0754cb64dd728b3b2dd894b859070c92147d41eb (patch) | |
tree | c54dd323af871377dab98ad0ca332bd46f4857cb /drivers | |
parent | 90de7467f2f5e5cf8abe9361436c89f0a84f1154 (diff) |
LF-6143-1 iio: accel: fxls8962af: support set interrupt pin as open-drain
This patch add the support to set interrupt pin as open-drain even
this interrupt pin is not used at all. There is a specail case on
imx8ulp-9x9 evk board. Three sensors share their interrupt pin, and
this pin belong to M core side, need M image implement the interrupt
handler. So for linux on A core side, driver can't use this shared
interrupt pin. But need to make sure all the three sensors interrupt
pin is open-drain, otherwise may impact the share interrupt pad behavior.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Clark Wang <xiaoning.wang@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iio/accel/fxls8962af-core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c index c055b7f02181..e37c3a32f1e1 100644 --- a/drivers/iio/accel/fxls8962af-core.c +++ b/drivers/iio/accel/fxls8962af-core.c @@ -931,6 +931,13 @@ int fxls8962af_core_probe(struct device *dev, struct regmap *regmap, int irq) &fxls8962af_buffer_ops); if (ret) return ret; + } else if (device_property_read_bool(dev, "drive-open-drain")) { + ret = regmap_update_bits(data->regmap, FXLS8962AF_SENS_CONFIG4, + FXLS8962AF_SC4_INT_PP_OD_MASK, + FXLS8962AF_SC4_INT_PP_OD_PREP(1)); + if (ret) + return ret; + } ret = pm_runtime_set_active(dev); |