summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2021-05-26 20:20:36 +0300
committerSebastian Reichel <sebastian.reichel@collabora.com>2021-06-04 12:58:22 +0300
commit8bb2314fc22628333d89df83d695ff9a8d2a6eac (patch)
tree270a365fd03253882532a85672f1431f5470e549 /drivers/power
parent7fbf6b731bca347700e460d94b130f9d734b33e9 (diff)
downloadlinux-8bb2314fc22628333d89df83d695ff9a8d2a6eac.tar.xz
power: supply: max17040: Do not enforce (incorrect) interrupt trigger type
Interrupt line can be configured on different hardware in different way, even inverted. Therefore driver should not enforce specific trigger type - edge falling - but instead rely on Devicetree to configure it. The Maxim 14577/77836 datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU therefore the edge falling is not correct. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Iskren Chernev <iskren.chernev@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/max17040_battery.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/power/supply/max17040_battery.c b/drivers/power/supply/max17040_battery.c
index 1aab868adabf..e80dd9141ae7 100644
--- a/drivers/power/supply/max17040_battery.c
+++ b/drivers/power/supply/max17040_battery.c
@@ -361,12 +361,10 @@ static irqreturn_t max17040_thread_handler(int id, void *dev)
static int max17040_enable_alert_irq(struct max17040_chip *chip)
{
struct i2c_client *client = chip->client;
- unsigned int flags;
int ret;
- flags = IRQF_TRIGGER_FALLING | IRQF_ONESHOT;
ret = devm_request_threaded_irq(&client->dev, client->irq, NULL,
- max17040_thread_handler, flags,
+ max17040_thread_handler, IRQF_ONESHOT,
chip->battery->desc->name, chip);
return ret;