mfd: Switch WM8350 revision detection to a feature based model

Rather than check for chip revisions in the WM8350 drivers have the core
code set flags for relevant differences.

Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
Mark Brown 2008-11-24 20:20:30 +01:00 • committed by Samuel Ortiz
commit d756f4a444
4 changed files with 5 additions and 7 deletions

View file

@ -44,7 +44,7 @@ static int wm8350_read_usb_uvolts(struct wm8350 *wm8350)
static inline int wm8350_charge_time_min(struct wm8350 *wm8350, int min)
{
if (wm8350->rev < WM8350_REV_G)
if (!wm8350->power.rev_g_coeff)
return (((min - 30) / 15) & 0xf) << 8;
else
return (((min - 30) / 30) & 0xf) << 8;