* ASoC legacy i2c client driver probing issue
@ 2011-05-02 18:18 Feng Ye
2011-05-04 4:55 ` rajeev
0 siblings, 1 reply; 4+ messages in thread
From: Feng Ye @ 2011-05-02 18:18 UTC (permalink / raw)
To: alsa-devel@alsa-project.org
Hello,
I have a legacy i2c client driver probing issue.
I use kernel version 2.6.27, and wm8750 external codec. The wm8750.c in sound/soc/codecs has a legacy i2c interface (e.g. use attach_adapter() callback). The callback just calls to i2c_probe(). Inside i2c_probe() it checks if the i2c address already been used, and fails there.
In our i2c bus driver, we used i2c_register_board_info() with a static i2c_board_info structure. And then i2c_add_numbered_adapter() is called.
>From code trace, it eventually calls i2c_attach_client(). So I think the probe function will for sure to fail.
I wonder how this would work? How can i2c_probe() succeed if it checks for address in use?
This question is more related to i2c instead of alsa soc. I am sure the SoC part is good, the i2c address is passed to wm8750 through snd_soc_codec_device.
Thanks,
Feng
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ASoC legacy i2c client driver probing issue
2011-05-02 18:18 ASoC legacy i2c client driver probing issue Feng Ye
@ 2011-05-04 4:55 ` rajeev
2011-05-04 5:52 ` Feng Ye
2011-05-04 10:38 ` Mark Brown
0 siblings, 2 replies; 4+ messages in thread
From: rajeev @ 2011-05-04 4:55 UTC (permalink / raw)
To: Feng Ye; +Cc: alsa-devel@alsa-project.org
Hi Freg
On 5/2/2011 11:48 PM, Feng Ye wrote:
> Hello,
>
> I have a legacy i2c client driver probing issue.
> I use kernel version 2.6.27, and wm8750 external codec. The wm8750.c in sound/soc/codecs has a legacy i2c interface (e.g. use attach_adapter() callback). The callback just calls to i2c_probe(). Inside i2c_probe() it checks if the i2c address already been used, and fails there.
>
> In our i2c bus driver, we used i2c_register_board_info() with a static i2c_board_info structure. And then i2c_add_numbered_adapter() is called.
>>From code trace, it eventually calls i2c_attach_client(). So I think the probe function will for sure to fail.
>
How does these two related ? You are calling i2c_attach_client() then why your probe function will fail.
In fact it will never called.
> I wonder how this would work? How can i2c_probe() succeed if it checks for address in use?
If it is not called then how can you decide whether it succeeded or not?
Rgds
Rajeev
> This question is more related to i2c instead of alsa soc. I am sure the SoC part is good, the i2c address is passed to wm8750 through snd_soc_codec_device.
>
>
>
> Thanks,
> Feng
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ASoC legacy i2c client driver probing issue
2011-05-04 4:55 ` rajeev
@ 2011-05-04 5:52 ` Feng Ye
2011-05-04 10:38 ` Mark Brown
1 sibling, 0 replies; 4+ messages in thread
From: Feng Ye @ 2011-05-04 5:52 UTC (permalink / raw)
To: rajeev; +Cc: alsa-devel@alsa-project.org
I didn't call i2c_attach_client(), it's called from i2c_add_numbered_adapter().
I think the problem is in I2C side: i2c_add_numbered_adapter() is a new interface while attach_adapter() is legacy interface, these two can not work together.
I am trying to port the kernel to newer version so the drivers in sound/soc/codecs uses the new interface (probe()).
Feng
-----Original Message-----
From: rajeev [mailto:rajeev-dlh.kumar@st.com]
Sent: Tuesday, May 03, 2011 9:56 PM
To: Feng Ye
Cc: alsa-devel@alsa-project.org
Subject: Re: [alsa-devel] ASoC legacy i2c client driver probing issue
Hi Freg
On 5/2/2011 11:48 PM, Feng Ye wrote:
> Hello,
>
> I have a legacy i2c client driver probing issue.
> I use kernel version 2.6.27, and wm8750 external codec. The wm8750.c in sound/soc/codecs has a legacy i2c interface (e.g. use attach_adapter() callback). The callback just calls to i2c_probe(). Inside i2c_probe() it checks if the i2c address already been used, and fails there.
>
> In our i2c bus driver, we used i2c_register_board_info() with a static i2c_board_info structure. And then i2c_add_numbered_adapter() is called.
>>From code trace, it eventually calls i2c_attach_client(). So I think the probe function will for sure to fail.
>
How does these two related ? You are calling i2c_attach_client() then why your probe function will fail.
In fact it will never called.
> I wonder how this would work? How can i2c_probe() succeed if it checks for address in use?
If it is not called then how can you decide whether it succeeded or not?
Rgds
Rajeev
> This question is more related to i2c instead of alsa soc. I am sure the SoC part is good, the i2c address is passed to wm8750 through snd_soc_codec_device.
>
>
>
> Thanks,
> Feng
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ASoC legacy i2c client driver probing issue
2011-05-04 4:55 ` rajeev
2011-05-04 5:52 ` Feng Ye
@ 2011-05-04 10:38 ` Mark Brown
1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2011-05-04 10:38 UTC (permalink / raw)
To: rajeev; +Cc: alsa-devel@alsa-project.org, Feng Ye
On Wed, May 04, 2011 at 10:25:41AM +0530, rajeev wrote:
> On 5/2/2011 11:48 PM, Feng Ye wrote:
Please always CC maintainers on mails, and fix your MUA to word wrap
within paragraphs so your mails are legible. I've reflowed your text.
> > I use kernel version 2.6.27, and wm8750 external codec. The wm8750.c
Version 2.6.27 is extremely old, none of these issues exist in current
kernels.
> > In our i2c bus driver, we used i2c_register_board_info() with a
> > static i2c_board_info structure. And then i2c_add_numbered_adapter()
> > is called.
With these very old kernels you shouldn't do this. With modern kernels
you can register the I2C devices normally.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-04 10:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-02 18:18 ASoC legacy i2c client driver probing issue Feng Ye
2011-05-04 4:55 ` rajeev
2011-05-04 5:52 ` Feng Ye
2011-05-04 10:38 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.