Skip to contentSkip to conversation

ASoC: fsi-ak4642: Remove ak4642_add_i2c_device

PATCH In review Kuninori Morimoto 3 participants 8 messages Dec 14, 2009 – Dec 30, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: fsi-ak4642: Remove ak4642_add_i2c_device

I2C devices should be registered when platform board setting in latest ASoC.

---
 sound/soc/sh/fsi-ak4642.c |   30 ------------------------------
 1 files changed, 0 insertions(+), 30 deletions(-)
sound/soc/sh/fsi-ak4642.c +0 -30
index c7af097..5263ab1 100644
@@ -42,42 +42,12 @@ static struct snd_soc_device fsi_snd_devdata = {
 	.codec_dev	= &soc_codec_dev_ak4642,
 };
 
-#define AK4642_BUS 0
-#define AK4642_ADR 0x12
-static int ak4642_add_i2c_device(void)
-{
-	struct i2c_board_info info;
-	struct i2c_adapter *adapter;
-	struct i2c_client *client;
-
-	memset(&info, 0, sizeof(struct i2c_board_info));
-	info.addr = AK4642_ADR;
-	strlcpy(info.type, "ak4642", I2C_NAME_SIZE);
-
-	adapter = i2c_get_adapter(AK4642_BUS);
-	if (!adapter) {
-		printk(KERN_DEBUG "can't get i2c adapter\n");
-		return -ENODEV;
-	}
-
-	client = i2c_new_device(adapter, &info);
-	i2c_put_adapter(adapter);
-	if (!client) {
-		printk(KERN_DEBUG "can't add i2c device\n");
-		return -ENODEV;
-	}
-
-	return 0;
-}
-
 static struct platform_device *fsi_snd_device;
 
 static int __init fsi_ak4642_init(void)
 {
 	int ret = -ENOMEM;
 
-	ak4642_add_i2c_device();
-
 	fsi_snd_device = platform_device_alloc("soc-audio", -1);
 	if (!fsi_snd_device)
 		goto out;
Signature · 1 line
1.6.3.3
#1 lore raw
Quoted 4 lines · Kuninori Morimoto

I2C devices should be registered when platform board setting in latest ASoC.

It'd be better to do a single patch which updates both ASoC and MIPS trees simultaneously in order to ensure that bisection continues to work. Of course, if the MIPS side has been updated separately then we should just apply this code - has that happened?

#2 lore raw

Dear Mark

Quoted 4 lines

It'd be better to do a single patch which updates both ASoC and MIPS trees simultaneously in order to ensure that bisection continues to work. Of course, if the MIPS side has been updated separately then we should just apply this code - has that happened?

Ohh.. sorry. My plan was sending patch to Paul (= SuperH) I send this patch now.

Best regards
--
Kuninori Morimoto

#3 lore raw

On 15 Dec 2009, at 00:07, Kuninori Morimoto <[email protected]

Quoted 5 lines

wrote:

Dear Mark

Quoted 8 lines
Quoted 5 lines

It'd be better to do a single patch which updates both ASoC and MIPS trees simultaneously in order to ensure that bisection continues to work. Of course, if the MIPS side has been updated separately then we
should just apply this code - has that happened?

Ohh.. sorry. My plan was sending patch to Paul (= SuperH) I send this patch now.

No problem, feel free to add my ack to the combined patch.

#4 lore raw

Dear Mark

Quoted 10 lines
Quoted 8 lines
Quoted 5 lines

It'd be better to do a single patch which updates both ASoC and MIPS trees simultaneously in order to ensure that bisection continues to work. Of course, if the MIPS side has been updated separately then we
should just apply this code - has that happened?

Ohh.. sorry. My plan was sending patch to Paul (= SuperH) I send this patch now.

No problem, feel free to add my ack to the combined patch.

I sent patch which is for SuperH platform, and Paul already applied it. I can find it on latest linus git (9f815a1765b0ce766ab1d26ef192d30410f70b2b). So sorry, can you please re-check this email ?
[fsi-ak4642: Remove ak4642_add_i2c_device]

Best regards
--
Kuninori Morimoto

#5 lore raw
Quoted 6 lines · Kuninori Morimoto
Quoted 1 line

No problem, feel free to add my ack to the combined patch.

I sent patch which is for SuperH platform, and Paul already applied it. I can find it on latest linus git (9f815a1765b0ce766ab1d26ef192d30410f70b2b). So sorry, can you please re-check this email ?
[fsi-ak4642: Remove ak4642_add_i2c_device]

Oh, what a shame. I'll apply the patch.

#6 lore raw
Quoted 10 lines · Mark Brown
Quoted 6 lines · Kuninori Morimoto
Quoted 1 line

No problem, feel free to add my ack to the combined patch.

I sent patch which is for SuperH platform, and Paul already applied it. I can find it on latest linus git (9f815a1765b0ce766ab1d26ef192d30410f70b2b). So sorry, can you please re-check this email ?
[fsi-ak4642: Remove ak4642_add_i2c_device]

Oh, what a shame. I'll apply the patch.

I missed the rest of this discussion, but if your conerns are about bisection, it's not an issue in this case. Board patches that add i2c or platform device data with no unmet dependencies I usually merge early. The main rationale for this is that the driver often shows up quite a bit later, and the board code will likely have had more paches piled up on top of it and merge conflicts ensue.

For patches that depend on headers and definitions added by the driver patch, we either apply them together, or I just hold off on the board patch until the driver is upstream. patchwork helps keep track of the ones that are still pending at least. These sorts of ordering issues happen a lot, but are generally always resolved by rc2.

#7 lore raw
Quoted 6 lines · Paul Mundt

I missed the rest of this discussion, but if your conerns are about bisection, it's not an issue in this case. Board patches that add i2c or platform device data with no unmet dependencies I usually merge early. The main rationale for this is that the driver often shows up quite a bit later, and the board code will likely have had more paches piled up on top of it and merge conflicts ensue.

What I was hoping for was a single patch which removed the existing code within ASoC and added the matching arch code so that there wouldn't be any versions which either had duplicate adds or missing adds. There's no build time dependency, only a runtime one.