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

Commit 642eb066 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'asoc/fix/nau8825', 'asoc/fix/ops',...

Merge remote-tracking branches 'asoc/fix/nau8825', 'asoc/fix/ops', 'asoc/fix/rcar', 'asoc/fix/rl6231', 'asoc/fix/rockchip' and 'asoc/fix/rt5670' into asoc-linus
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
@@ -1271,6 +1271,36 @@ static int nau8825_i2c_remove(struct i2c_client *client)
	return 0;
}

#ifdef CONFIG_PM_SLEEP
static int nau8825_suspend(struct device *dev)
{
	struct i2c_client *client = to_i2c_client(dev);
	struct nau8825 *nau8825 = dev_get_drvdata(dev);

	disable_irq(client->irq);
	regcache_cache_only(nau8825->regmap, true);
	regcache_mark_dirty(nau8825->regmap);

	return 0;
}

static int nau8825_resume(struct device *dev)
{
	struct i2c_client *client = to_i2c_client(dev);
	struct nau8825 *nau8825 = dev_get_drvdata(dev);

	regcache_cache_only(nau8825->regmap, false);
	regcache_sync(nau8825->regmap);
	enable_irq(client->irq);

	return 0;
}
#endif

static const struct dev_pm_ops nau8825_pm = {
	SET_SYSTEM_SLEEP_PM_OPS(nau8825_suspend, nau8825_resume)
};

static const struct i2c_device_id nau8825_i2c_ids[] = {
	{ "nau8825", 0 },
	{ }
@@ -1297,6 +1327,7 @@ static struct i2c_driver nau8825_driver = {
		.name = "nau8825",
		.of_match_table = of_match_ptr(nau8825_of_ids),
		.acpi_match_table = ACPI_PTR(nau8825_acpi_match),
		.pm = &nau8825_pm,
	},
	.probe = nau8825_i2c_probe,
	.remove = nau8825_i2c_remove,
+4 −2
Original line number Diff line number Diff line
@@ -80,8 +80,10 @@ int rl6231_calc_dmic_clk(int rate)
	}

	for (i = 0; i < ARRAY_SIZE(div); i++) {
		/* find divider that gives DMIC frequency below 3MHz */
		if (3000000 * div[i] >= rate)
		if ((div[i] % 3) == 0)
			continue;
		/* find divider that gives DMIC frequency below 3.072MHz */
		if (3072000 * div[i] >= rate)
			return i;
	}

+6 −6
Original line number Diff line number Diff line
@@ -973,12 +973,12 @@
#define RT5670_SCLK_SRC_MCLK			(0x0 << 14)
#define RT5670_SCLK_SRC_PLL1			(0x1 << 14)
#define RT5670_SCLK_SRC_RCCLK			(0x2 << 14) /* 15MHz */
#define RT5670_PLL1_SRC_MASK			(0x3 << 12)
#define RT5670_PLL1_SRC_SFT			12
#define RT5670_PLL1_SRC_MCLK			(0x0 << 12)
#define RT5670_PLL1_SRC_BCLK1			(0x1 << 12)
#define RT5670_PLL1_SRC_BCLK2			(0x2 << 12)
#define RT5670_PLL1_SRC_BCLK3			(0x3 << 12)
#define RT5670_PLL1_SRC_MASK			(0x7 << 11)
#define RT5670_PLL1_SRC_SFT			11
#define RT5670_PLL1_SRC_MCLK			(0x0 << 11)
#define RT5670_PLL1_SRC_BCLK1			(0x1 << 11)
#define RT5670_PLL1_SRC_BCLK2			(0x2 << 11)
#define RT5670_PLL1_SRC_BCLK3			(0x3 << 11)
#define RT5670_PLL1_PD_MASK			(0x1 << 3)
#define RT5670_PLL1_PD_SFT			3
#define RT5670_PLL1_PD_1			(0x0 << 3)
+1 −1
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ static int rk_spdif_probe(struct platform_device *pdev)
	int ret;

	match = of_match_node(rk_spdif_match, np);
	if ((int) match->data == RK_SPDIF_RK3288) {
	if (match->data == (void *)RK_SPDIF_RK3288) {
		struct regmap *grf;

		grf = syscon_regmap_lookup_by_phandle(np, "rockchip,grf");
+3 −3
Original line number Diff line number Diff line
@@ -28,9 +28,9 @@
#define SPDIF_CFGR_VDW(x)	(x << SPDIF_CFGR_VDW_SHIFT)
#define SDPIF_CFGR_VDW_MASK	(0xf << SPDIF_CFGR_VDW_SHIFT)

#define SPDIF_CFGR_VDW_16	SPDIF_CFGR_VDW(0x00)
#define SPDIF_CFGR_VDW_20	SPDIF_CFGR_VDW(0x01)
#define SPDIF_CFGR_VDW_24	SPDIF_CFGR_VDW(0x10)
#define SPDIF_CFGR_VDW_16	SPDIF_CFGR_VDW(0x0)
#define SPDIF_CFGR_VDW_20	SPDIF_CFGR_VDW(0x1)
#define SPDIF_CFGR_VDW_24	SPDIF_CFGR_VDW(0x2)

/*
 * DMACR
Loading