charger/rt946X: Set boost current threshold correctly
charger/rt946X: Set boost current threshold correctly

rt946x_closest_reg_via_tbl() is buggy and doesn't
return the right reg value because of misuse of ARRAY_SIZE().
We should fix it.

Meanwhile, since rt946x_closest_reg_via_tbl() is only called in
rt946x_set_boost_current(), let's just delete rt946x_closest_reg_via_tbl()
and move its code to rt946x_set_boost_current().

BUG=b:70524967
BRANCH=none
TEST=Confirm reg 0x0a is set correctly

Change-Id: Ie9c90ebf63596a52f864ff5809488731edc41fff
Signed-off-by: Philip Chen <3ee404f9ef892bc3fda6e6a76e65843b5fa44db2@google.com>
Reviewed-on: https://chromium-review.googlesource.com/830895
Commit-Ready: Philip Chen <3ee404f9ef892bc3fda6e6a76e65843b5fa44db2@chromium.org>
Tested-by: Philip Chen <3ee404f9ef892bc3fda6e6a76e65843b5fa44db2@chromium.org>
Reviewed-by: Shawn N <5259333ce42e3ace6a73988cec7115ed9d3a661a@chromium.org>

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