[U-Boot] [PATCH 19/30] dm: sound: exynos: Correct codec bus address

Simon Glass sjg at chromium.org
Mon Dec 3 11:37:35 UTC 2018


The codec is at address 0x11 on the i2c bus, in 7-bit format. The device
tree and code are in 8-bit format (i.e. shifted left one bit). Fix both.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 arch/arm/dts/exynos5250-snow.dts | 4 ++--
 drivers/sound/max98095.c         | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm/dts/exynos5250-snow.dts b/arch/arm/dts/exynos5250-snow.dts
index e99f6e72bf6..cb5067b9669 100644
--- a/arch/arm/dts/exynos5250-snow.dts
+++ b/arch/arm/dts/exynos5250-snow.dts
@@ -214,8 +214,8 @@
 			};
 		};
 
-		soundcodec at 22 {
-			reg = <0x22>;
+		soundcodec at 11 {
+			reg = <0x11>;
 			compatible = "maxim,max98095-codec";
 		};
 	};
diff --git a/drivers/sound/max98095.c b/drivers/sound/max98095.c
index 6a98dac04bb..7a3dbd09840 100644
--- a/drivers/sound/max98095.c
+++ b/drivers/sound/max98095.c
@@ -569,8 +569,7 @@ int max98095_init(const void *blob, enum en_max_audio_interface aif_id,
 
 	i2c_set_bus_num(pcodec_info.i2c_bus);
 
-	/* shift the device address by 1 for 7 bit addressing */
-	max98095_info.i2c_addr = pcodec_info.i2c_dev_addr >> 1;
+	max98095_info.i2c_addr = pcodec_info.i2c_dev_addr;
 	ret = max98095_device_init(&max98095_info);
 	if (ret < 0) {
 		debug("%s: max98095 codec chip init failed\n", __func__);
-- 
2.20.0.rc1.387.gf8505762e3-goog



More information about the U-Boot mailing list