Skip to content

Commit c8f573f

Browse files
committed
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>
1 parent 44263f5 commit c8f573f

2 files changed

Lines changed: 4 additions & 12 deletions

File tree

drivers/power/supply/generic-adc-battery.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,10 @@ static void gab_work(struct work_struct *work)
227227
static irqreturn_t gab_charged(int irq, void *dev_id)
228228
{
229229
struct gab *adc_bat = dev_id;
230-
struct gab_platform_data *pdata = adc_bat->pdata;
231-
int delay;
232230

233-
delay = pdata->jitter_delay ? pdata->jitter_delay : JITTER_DEFAULT;
234231
schedule_delayed_work(&adc_bat->bat_work,
235-
msecs_to_jiffies(delay));
232+
msecs_to_jiffies(JITTER_DEFAULT));
233+
236234
return IRQ_HANDLED;
237235
}
238236

@@ -358,14 +356,11 @@ static int __maybe_unused gab_suspend(struct device *dev)
358356
static int __maybe_unused gab_resume(struct device *dev)
359357
{
360358
struct gab *adc_bat = dev_get_drvdata(dev);
361-
struct gab_platform_data *pdata = adc_bat->pdata;
362-
int delay;
363-
364-
delay = pdata->jitter_delay ? pdata->jitter_delay : JITTER_DEFAULT;
365359

366360
/* Schedule timer to check current status */
367361
schedule_delayed_work(&adc_bat->bat_work,
368-
msecs_to_jiffies(delay));
362+
msecs_to_jiffies(JITTER_DEFAULT));
363+
369364
return 0;
370365
}
371366

include/linux/power/generic-adc-battery.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,10 @@
1111
* @battery_info: recommended structure to specify static power supply
1212
* parameters
1313
* @cal_charge: calculate charge level.
14-
* @jitter_delay: delay required after the interrupt to check battery
15-
* status.Default set is 10ms.
1614
*/
1715
struct gab_platform_data {
1816
struct power_supply_info battery_info;
1917
int (*cal_charge)(long value);
20-
int jitter_delay;
2118
};
2219

2320
#endif /* GENERIC_ADC_BATTERY_H */

0 commit comments

Comments
 (0)