Hi, On Mon, Nov 09, 2026 at 08:09:44AM +0100, Patrick Fischer wrote: > Hi Sebastian, > > On Mon, Nov 09, 2026 at 01:08:13AM +0100, Sebastian Reichel wrote: > > Looks like bq24190_charger_get_ntc_status can just be updated to > > handle a single temperature sensor as warm/cool and dual-sensor as > > overheat/cold? > > Thanks for looking at this. If I understand you correctly, codes 1-4 > (one sensor out of range) would become warm/cool and codes 5/6 (both > sensors) cold/overheat, for all chips. > > I don't think that is right for the BQ24190, BQ24192 and BQ24192I. Their > datasheet (SLUSAW5B) says for both TS pins "Charge suspends when either > TS pin is out of range", so a single hot or cold sensor stops charging > there. Reporting that as Warm or Cool would understate it. Ok, I will just take it as is then. Sorry for the delay. Greetings, -- Sebastian > The BQ24193 is different in that its TS1 and TS2 must be connected > together and its codes are a JEITA profile (SLUSBG7A): 010 is Warm and > 011 is Cool, and charging continues in both states. > > That is why I used the per-chip .get_ntc_status hook, like the BQ24296. > I can make it smaller, though, by handling only the two JEITA states and > falling back to the existing function for everything else: > > static int bq24193_charger_get_ntc_status(u8 value) > { > switch (value >> BQ24190_REG_F_NTC_FAULT_SHIFT & 0x7) { > case 0x2: /* Warm */ > return POWER_SUPPLY_HEALTH_WARM; > case 0x3: /* Cool */ > return POWER_SUPPLY_HEALTH_COOL; > default: > return bq24190_charger_get_ntc_status(value); > } > } > > Would that work for you, or did you have something else in mind? I'll > send a v2 once I know which way you prefer. > > Greetings, > > Patrick >