linux/drivers/power
Linus Torvalds ad8cccc248 Fix Intel Dollar Cove TI battery driver 32-bit build error
The driver is doing a 64-bit divide, rather than using the proper
helpers, causing link errors on i386 allyesconfig builds:

  x86_64-linux-ld: drivers/power/supply/intel_dc_ti_battery.o: in function `dc_ti_battery_get_voltage_and_current_now':
  intel_dc_ti_battery.c:(.text+0x5c): undefined reference to `__udivdi3'
  x86_64-linux-ld: intel_dc_ti_battery.c:(.text+0x96): undefined reference to `__udivdi3'

and while fixing that, fix the double rounding: keep the timing
difference in nanoseconds ('ktime'), and then just convert to usecs at
the end.

Not because the timing precision is likely to matter, but because doing
it right also makes the code simpler.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Cc: Hans de Goede <hansg@kernel.org>
Cc: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2025-11-26 12:31:48 -08:00
..
reset driver: reset: th1520-aon: add driver for poweroff/reboot via AON FW 2025-09-19 12:55:20 +02:00
sequencing power: sequencing: qcom-wcn: fix bluetooth-wifi copypasta for WCN6855 2025-06-30 09:07:57 +02:00
supply Fix Intel Dollar Cove TI battery driver 32-bit build error 2025-11-26 12:31:48 -08:00
Kconfig power: sequencing: implement the pwrseq core 2024-06-12 09:20:13 +02:00
Makefile power: sequencing: implement the pwrseq core 2024-06-12 09:20:13 +02:00