diff options
author | 2023-03-17 23:56:58 +0100 | |
---|---|---|
committer | 2023-03-29 22:38:56 +0200 | |
commit | c8f573f312f36861db8e40d9953b6d4b84f1321b (patch) | |
tree | ce98d9e9d3745bffa10ed5795841b80ee10fcdef /drivers | |
parent | power: supply: generic-adc-battery: fix unit scaling (diff) | |
download | linux-c8f573f312f36861db8e40d9953b6d4b84f1321b.tar.gz linux-c8f573f312f36861db8e40d9953b6d4b84f1321b.tar.bz2 linux-c8f573f312f36861db8e40d9953b6d4b84f1321b.zip |
power: supply: generic-adc-battery: drop jitter delay support
Drop support for configuring IRQ jitter delay by using big
enough fixed value.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/power/supply/generic-adc-battery.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/power/supply/generic-adc-battery.c b/drivers/power/supply/generic-adc-battery.c index 535972a332b3..e20894460d7f 100644 --- a/drivers/power/supply/generic-adc-battery.c +++ b/drivers/power/supply/generic-adc-battery.c @@ -227,12 +227,10 @@ static void gab_work(struct work_struct *work) static irqreturn_t gab_charged(int irq, void *dev_id) { struct gab *adc_bat = dev_id; - struct gab_platform_data *pdata = adc_bat->pdata; - int delay; - delay = pdata->jitter_delay ? pdata->jitter_delay : JITTER_DEFAULT; schedule_delayed_work(&adc_bat->bat_work, - msecs_to_jiffies(delay)); + msecs_to_jiffies(JITTER_DEFAULT)); + return IRQ_HANDLED; } @@ -358,14 +356,11 @@ static int __maybe_unused gab_suspend(struct device *dev) static int __maybe_unused gab_resume(struct device *dev) { struct gab *adc_bat = dev_get_drvdata(dev); - struct gab_platform_data *pdata = adc_bat->pdata; - int delay; - - delay = pdata->jitter_delay ? pdata->jitter_delay : JITTER_DEFAULT; /* Schedule timer to check current status */ schedule_delayed_work(&adc_bat->bat_work, - msecs_to_jiffies(delay)); + msecs_to_jiffies(JITTER_DEFAULT)); + return 0; } |