mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
power/supply: bq2597x: Put regs dump under POWER_SUPPLY_DEBUG
Change-Id: I6dbc2144869f6ef06e33d83b9af7814a19534ba6 Signed-off-by: Alexander Winkowski <dereference23@outlook.com> Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This commit is contained in:
parent
685899aacf
commit
eb51dd0be2
@ -1371,14 +1371,21 @@ static int bq2597x_detect_device(struct bq2597x *bq)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
static void bq2597x_dump_reg(struct bq2597x *bq);
|
||||
#endif
|
||||
|
||||
#define RUNNING_PERIOD_S (60 * 1000)
|
||||
|
||||
static void bq2597x_monitor_work(struct work_struct *work)
|
||||
{
|
||||
struct bq2597x *bq = container_of(work, struct bq2597x,
|
||||
monitor_work.work);
|
||||
|
||||
#ifdef DEBUG
|
||||
bq2597x_dump_reg(bq);
|
||||
#endif
|
||||
|
||||
schedule_delayed_work(&bq->monitor_work,
|
||||
msecs_to_jiffies(RUNNING_PERIOD_S));
|
||||
}
|
||||
@ -2024,6 +2031,7 @@ static int bq2597x_psy_register(struct bq2597x *bq)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
static void bq2597x_dump_reg(struct bq2597x *bq)
|
||||
{
|
||||
|
||||
@ -2039,7 +2047,7 @@ static void bq2597x_dump_reg(struct bq2597x *bq)
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bq2597x_dump_reg);
|
||||
|
||||
#endif
|
||||
|
||||
static void bq2597x_check_alarm_status(struct bq2597x *bq)
|
||||
{
|
||||
@ -2159,9 +2167,12 @@ static irqreturn_t bq2597x_charger_interrupt(int irq, void *dev_id)
|
||||
/* TODO */
|
||||
bq2597x_check_alarm_status(bq);
|
||||
bq2597x_check_fault_status(bq);
|
||||
|
||||
bq2597x_charger_info(bq);
|
||||
|
||||
#ifdef DEBUG
|
||||
bq2597x_dump_reg(bq);
|
||||
#endif
|
||||
|
||||
mutex_unlock(&bq->irq_complete);
|
||||
power_supply_changed(bq->fc2_psy);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user