Skip to content

Commit

Permalink
power: supply: bq2597x: Remove unused functions
Browse files Browse the repository at this point in the history
../drivers/power/supply/ti/bq2597x_charger_pipa.c:528:12: warning: unused function 'bq2597x_set_wdt' [-Wunused-function]
static int bq2597x_set_wdt(struct bq2597x *bq, int ms)
           ^
../drivers/power/supply/ti/bq2597x_charger_pipa.c:1187:  CC      drivers/staging/android/ion/ion_carveout_heap.o
12: warning: unused function 'bq2597x_clear_alarm_int_mask' [-Wunused-function]
static int bq2597x_clear_alarm_int_mask(struct bq2597x *bq, u8 mask)
           ^
../drivers/power/supply/ti/bq2597x_charger_pipa.c:1221:12: warning: unused function 'bq2597x_clear_fault_int_mask' [-Wunused-function]
static int bq2597x_clear_fault_int_mask(struct bq2597x *bq, u8 mask)
           ^

Change-Id: I71deb1501da58a8f8c4e298407683e2ab44c8f6d
Signed-off-by: Yuan Si <[email protected]>
  • Loading branch information
YumeMichi authored and itsshashanksp committed Jun 1, 2024
1 parent c5ffbf5 commit ef62e34
Showing 1 changed file with 0 additions and 58 deletions.
58 changes: 0 additions & 58 deletions drivers/power/supply/ti/bq2597x_charger_2.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,30 +526,6 @@ static int bq2597x_enable_wdt(struct bq2597x *bq, bool enable)
}
EXPORT_SYMBOL_GPL(bq2597x_enable_wdt);

static int bq2597x_set_wdt(struct bq2597x *bq, int ms)
{
int ret;
u8 val;

if (ms == 500)
val = BQ2597X_WATCHDOG_0P5S;
else if (ms == 1000)
val = BQ2597X_WATCHDOG_1S;
else if (ms == 5000)
val = BQ2597X_WATCHDOG_5S;
else if (ms == 30000)
val = BQ2597X_WATCHDOG_30S;
else
val = BQ2597X_WATCHDOG_30S;

val <<= BQ2597X_WATCHDOG_SHIFT;

ret = bq2597x_update_bits(bq, BQ2597X_REG_0B,
BQ2597X_WATCHDOG_MASK, val);
return ret;
}
EXPORT_SYMBOL_GPL(bq2597x_set_wdt);

static int bq2597x_enable_batovp(struct bq2597x *bq, bool enable)
{
int ret;
Expand Down Expand Up @@ -1183,23 +1159,6 @@ static int bq2597x_set_alarm_int_mask(struct bq2597x *bq, u8 mask)
}
EXPORT_SYMBOL_GPL(bq2597x_set_alarm_int_mask);

static int bq2597x_clear_alarm_int_mask(struct bq2597x *bq, u8 mask)
{
int ret;
u8 val;

ret = bq2597x_read_byte(bq, BQ2597X_REG_0F, &val);
if (ret)
return ret;

val &= ~mask;

ret = bq2597x_write_byte(bq, BQ2597X_REG_0F, val);

return ret;
}
EXPORT_SYMBOL_GPL(bq2597x_clear_alarm_int_mask);

static int bq2597x_set_fault_int_mask(struct bq2597x *bq, u8 mask)
{
int ret;
Expand All @@ -1217,23 +1176,6 @@ static int bq2597x_set_fault_int_mask(struct bq2597x *bq, u8 mask)
}
EXPORT_SYMBOL_GPL(bq2597x_set_fault_int_mask);

static int bq2597x_clear_fault_int_mask(struct bq2597x *bq, u8 mask)
{
int ret;
u8 val;

ret = bq2597x_read_byte(bq, BQ2597X_REG_12, &val);
if (ret)
return ret;

val &= ~mask;

ret = bq2597x_write_byte(bq, BQ2597X_REG_12, val);

return ret;
}
EXPORT_SYMBOL_GPL(bq2597x_clear_fault_int_mask);

static int sc8551_set_bypass_mode_en(struct bq2597x *bq, int enable)
{
if (bq->chip_vendor != SC8551)
Expand Down

0 comments on commit ef62e34

Please sign in to comment.