battery_fuel_gauge: Check length of device string
battery_fuel_gauge: Check length of device string

In the common battery fuel gauge framework, the boards may specify
strings for the expected battery packs to be used at runtime.  Some
specified battery strings may be shorter than what is provided by the
fuel gauge as the later portion of the string can vary according to lot
code and/or manufacture date.  This commit simply checks up to the
length of the string provided by the board in order to find a match.

BUG=b:183875170
BRANCH=dedede
TEST=Build and flash a dedede device, verify that the battery can be
found.

Signed-off-by: Aseda Aboagye <12c9b286316a940fd31c24070da5ab64cdd4d0e7@google.com>
Change-Id: Ib1c4690ca2b676e6e019015c4dec1d57899479b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2934659
Tested-by: Aseda Aboagye <12c9b286316a940fd31c24070da5ab64cdd4d0e7@chromium.org>
Reviewed-by: Diana Z <cb2016afc7183e5356c690dc63b4ba817470501a@chromium.org>
Commit-Queue: Aseda Aboagye <12c9b286316a940fd31c24070da5ab64cdd4d0e7@chromium.org>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec