Commit 37fe599
Al Stone
power: supply: ab8500: Standardize BTI resistance
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2071846
Tested: This is one of a series of patch sets to enable Arm SystemReady IR
support in the kernel for NXP i.MX8 platforms. This set updates the
power subsystem. This set has been tested via simple boot tests and
the CI loop.
Conflicts:
drivers/power/supply/ab8500-bm.h
drivers/power/supply/ab8500_bmdata.c
drivers/power/supply/ab8500_btemp.c
drivers/power/supply/ab8500_fg.c
This is not a supported device so these parts of the patch
have been dropped.
commit 1f918e0
Author: Linus Walleij <linus.walleij@linaro.org>
Date: Sat Feb 26 00:27:57 2022 +0100
power: supply: ab8500: Standardize BTI resistance
The Battery Type Indicator (BTI) resistor is a resistor mounted
between a special terminal on the battery and ground. By sending
a fixed current (such as 7mA) through this resistor and measuring
the voltage over it, the resistance can be determined, and this
verifies the battery type.
Typical side view of the battery:
o o o
GND BTI +3.8V
Typical example of the electrical layout:
+3.8 V BTI
| |
| + |
_______ [ ] 7kOhm
___ |
| |
| |
GND GND
By verifying this resistance before attempting to charge the
battery we add an additional level of security.
In some systems this is used for plug-and-play of batteries with
different capacity. In other cases, this is merely used to verify
that the right type of battery is connected, if several batteries
have the same physical shape and can be plugged into the same
slot. Sometimes this is just a surplus security mechanism.
Nokia and Samsung among many other vendors are known to use these
BTI resistors.
Add the BTI properties to struct power_supply_battery_info and
switch the AB8500 charger code over to using it.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
(cherry picked from commit 1f918e0)
Signed-off-by: Al Stone <ahs3@redhat.com>1 parent 92695b7 commit 37fe599
File tree
4 files changed
+44
-10
lines changed- drivers/power/supply
- include/linux
4 files changed
+44
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
135 | 134 | | |
136 | 135 | | |
137 | 136 | | |
138 | | - | |
139 | 137 | | |
140 | 138 | | |
141 | 139 | | |
| |||
153 | 151 | | |
154 | 152 | | |
155 | 153 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
160 | 158 | | |
161 | 159 | | |
162 | 160 | | |
| |||
358 | 356 | | |
359 | 357 | | |
360 | 358 | | |
361 | | - | |
362 | 359 | | |
363 | 360 | | |
364 | 361 | | |
| |||
399 | 396 | | |
400 | 397 | | |
401 | 398 | | |
402 | | - | |
403 | 399 | | |
404 | 400 | | |
405 | 401 | | |
| |||
574 | 570 | | |
575 | 571 | | |
576 | 572 | | |
| 573 | + | |
577 | 574 | | |
578 | 575 | | |
579 | 576 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1077 | 1077 | | |
1078 | 1078 | | |
1079 | 1079 | | |
1080 | | - | |
| 1080 | + | |
1081 | 1081 | | |
1082 | 1082 | | |
1083 | 1083 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
610 | | - | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
611 | 613 | | |
612 | 614 | | |
613 | 615 | | |
| |||
938 | 940 | | |
939 | 941 | | |
940 | 942 | | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
941 | 965 | | |
942 | 966 | | |
943 | 967 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
501 | 509 | | |
502 | 510 | | |
503 | 511 | | |
| |||
624 | 632 | | |
625 | 633 | | |
626 | 634 | | |
| 635 | + | |
| 636 | + | |
627 | 637 | | |
628 | 638 | | |
629 | 639 | | |
| |||
667 | 677 | | |
668 | 678 | | |
669 | 679 | | |
| 680 | + | |
| 681 | + | |
670 | 682 | | |
671 | 683 | | |
672 | 684 | | |
| |||
684 | 696 | | |
685 | 697 | | |
686 | 698 | | |
| 699 | + | |
687 | 700 | | |
688 | 701 | | |
689 | 702 | | |
| |||
0 commit comments