Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2495bc7 authored by Mark Brown's avatar Mark Brown Committed by Samuel Ortiz
Browse files

mfd: Restructure wm8994-core device revision handling



Switch on the device type before revision since anything we do here will
be device as well as revision specific.

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent d1738aef
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -476,10 +476,11 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
		goto err_enable;
	}

	switch (wm8994->type) {
	case WM8994:
		switch (ret) {
		case 0:
		case 1:
		if (wm8994->type == WM8994)
			dev_warn(wm8994->dev,
				 "revision %c not fully supported\n",
				 'A' + ret);
@@ -487,6 +488,10 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
		default:
			break;
		}
		break;
	default:
		break;
	}

	dev_info(wm8994->dev, "%s revision %c\n", devname, 'A' + ret);