lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1341858795-27504-1-git-send-email-broonie@opensource.wolfsonmicro.com>
Date:	Mon,  9 Jul 2012 19:33:14 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Samuel Ortiz <sameo@...ux.intel.com>
Cc:	linux-kernel@...r.kernel.org, patches@...nsource.wolfsonmicro.com,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: [PATCH 1/2] mfd: arizona: Add support for multiple PDM speaker outputs

The registers have stride 2 so we can write the loop properly now.

Signed-off-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>
---
 drivers/mfd/arizona-core.c        |    5 ++---
 include/linux/mfd/arizona/pdata.h |    2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 83558b5..b4978b5 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -462,18 +462,17 @@ int __devinit arizona_dev_init(struct arizona *arizona)
 				   ARIZONA_OUT1_MONO, val);
 	}
 
-	BUILD_BUG_ON(ARIZONA_MAX_PDM_SPK > 1);
 	for (i = 0; i < ARIZONA_MAX_PDM_SPK; i++) {
 		if (arizona->pdata.spk_mute[i])
 			regmap_update_bits(arizona->regmap,
-					   ARIZONA_PDM_SPK1_CTRL_1,
+					   ARIZONA_PDM_SPK1_CTRL_1 + (i * 2),
 					   ARIZONA_SPK1_MUTE_ENDIAN_MASK |
 					   ARIZONA_SPK1_MUTE_SEQ1_MASK,
 					   arizona->pdata.spk_mute[i]);
 
 		if (arizona->pdata.spk_fmt[i])
 			regmap_update_bits(arizona->regmap,
-					   ARIZONA_PDM_SPK1_CTRL_2,
+					   ARIZONA_PDM_SPK1_CTRL_2 + (i * 2),
 					   ARIZONA_SPK1_FMT_MASK,
 					   arizona->pdata.spk_fmt[i]);
 	}
diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h
index fa2cb98..68ff91a 100644
--- a/include/linux/mfd/arizona/pdata.h
+++ b/include/linux/mfd/arizona/pdata.h
@@ -62,7 +62,7 @@
 
 #define ARIZONA_MAX_OUTPUT 5
 
-#define ARIZONA_MAX_PDM_SPK 1
+#define ARIZONA_MAX_PDM_SPK 2
 
 struct regulator_init_data;
 
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ