Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1185726 > unrolled thread

Re: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090 codec

Started byMark Brown <broonie@kernel.org>
First post2015-07-16 13:10 +0200
Last post2015-07-16 22:00 +0200
Articles 6 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090 codec Mark Brown <broonie@kernel.org> - 2015-07-16 13:10 +0200
    Re: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090 codec zhengxing <zhengxing@rock-chips.com> - 2015-07-16 13:40 +0200
    Re: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090  codec Paul Bolle <pebolle@tiscali.nl> - 2015-07-16 13:50 +0200
      Re: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090 codec Mark Brown <broonie@kernel.org> - 2015-07-16 17:10 +0200
        Re: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090  codec Paul Bolle <pebolle@tiscali.nl> - 2015-07-16 18:30 +0200
          Re: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090 codec Mark Brown <broonie@kernel.org> - 2015-07-16 22:00 +0200

#1185726 — Re: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090 codec

FromMark Brown <broonie@kernel.org>
Date2015-07-16 13:10 +0200
SubjectRe: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090 codec
Message-ID<pMPd8-4Ps-23@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

On Thu, Jul 16, 2015 at 10:05:44AM +0200, Paul Bolle wrote:

> > +static struct platform_driver snd_rk_mc_driver = {
> > +	.probe = snd_rk_mc_probe,
> > +	.remove = snd_rk_mc_remove,
> > +	.driver = {
> > +		.name = DRV_NAME,

> > +MODULE_ALIAS("platform:" DRV_NAME);

> This seems only useful if there's a corresponding struct
> platform_device. Ie, a platform_device with a "rockchip-snd-max98090"
> .name, which will trigger a "MODALIAS=platform:rockchip-snd-max98090"
> uevent when it's created. But I couldn't find where such a
> platform_device is created.

> Did I miss something? Or is there another way this alias is useful here?

You've got platform_device and platform_driver confused I think.

[toc] | [next] | [standalone]


#1185768

Fromzhengxing <zhengxing@rock-chips.com>
Date2015-07-16 13:40 +0200
Message-ID<pMPG9-5ol-3@gated-at.bofh.it>
In reply to#1185726
On 2015年07月16日 19:00, Mark Brown wrote:
> On Thu, Jul 16, 2015 at 10:05:44AM +0200, Paul Bolle wrote:
>
>>> +static struct platform_driver snd_rk_mc_driver = {
>>> +	.probe = snd_rk_mc_probe,
>>> +	.remove = snd_rk_mc_remove,
>>> +	.driver = {
>>> +		.name = DRV_NAME,
>>> +MODULE_ALIAS("platform:" DRV_NAME);
>> This seems only useful if there's a corresponding struct
>> platform_device. Ie, a platform_device with a "rockchip-snd-max98090"
>> .name, which will trigger a "MODALIAS=platform:rockchip-snd-max98090"
>> uevent when it's created. But I couldn't find where such a
>> platform_device is created.
>> Did I miss something? Or is there another way this alias is useful here?
> You've got platform_device and platform_driver confused I think.
Mark, Thank you.

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

[toc] | [prev] | [next] | [standalone]


#1185785 — Re: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090 codec

FromPaul Bolle <pebolle@tiscali.nl>
Date2015-07-16 13:50 +0200
SubjectRe: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090 codec
Message-ID<pMPPP-5zU-13@gated-at.bofh.it>
In reply to#1185726
On do, 2015-07-16 at 12:00 +0100, Mark Brown wrote:
> You've got platform_device and platform_driver confused I think.

I did? You mean that creating a platform_DRIVER triggers that
MODALIAS=platform:{...] uevent?


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

[toc] | [prev] | [next] | [standalone]


#1185945

FromMark Brown <broonie@kernel.org>
Date2015-07-16 17:10 +0200
Message-ID<pMSXn-1Ro-17@gated-at.bofh.it>
In reply to#1185785

[Multipart message — attachments visible in raw view] — view raw

On Thu, Jul 16, 2015 at 04:15:16PM +0200, Paul Bolle wrote:

> Let's put it this was. If one does
>     sudo find /sys -perm -o=r -name uevent -exec grep -H MODALIAS=platform: {} \;
> 
> or
>     sudo find /sys -perm -o=r -name modalias -exec grep -H platform: {} \;

> (both lists should be similar)

> on the systems this patch is targeting, will
>    platform:rockchip-snd-max98090

> then show up?

Why would this not be the case - what is the difference you beleive this
driver has to other platform drivers?

[toc] | [prev] | [next] | [standalone]


#1186051 — Re: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090 codec

FromPaul Bolle <pebolle@tiscali.nl>
Date2015-07-16 18:30 +0200
SubjectRe: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090 codec
Message-ID<pMUcO-3Ap-3@gated-at.bofh.it>
In reply to#1185945
On do, 2015-07-16 at 16:05 +0100, Mark Brown wrote:
> Why would this not be the case - what is the difference you beleive
> this driver has to other platform drivers?

It's my believe that for MODULE_ALIAS("platform:[...]") to be useful
there needs to be corresponding struct platform_device. For this patch
that would be a platform device named "rockchip-snd-max98090". (This is
something that I try to check rather carefully, because these devices
can be generated on the fly.)

I'm happy to drop this believe if someone shows me another way that
MODULE_ALIAS("platform:[...]") can actually be used.

So, in short, the difference between this driver and other platform
drivers is that, as far as I'm aware, this platform driver lacks a
corresponding platform device. Probably because OF support suffices to
get this module autoloaded.

Thanks,


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

[toc] | [prev] | [next] | [standalone]


#1186217

FromMark Brown <broonie@kernel.org>
Date2015-07-16 22:00 +0200
Message-ID<pMXu2-8b6-5@gated-at.bofh.it>
In reply to#1186051

[Multipart message — attachments visible in raw view] — view raw

On Thu, Jul 16, 2015 at 06:22:45PM +0200, Paul Bolle wrote:
> On do, 2015-07-16 at 16:05 +0100, Mark Brown wrote:
> > Why would this not be the case - what is the difference you beleive
> > this driver has to other platform drivers?

> It's my believe that for MODULE_ALIAS("platform:[...]") to be useful
> there needs to be corresponding struct platform_device. For this patch
> that would be a platform device named "rockchip-snd-max98090". (This is
> something that I try to check rather carefully, because these devices
> can be generated on the fly.)

> I'm happy to drop this believe if someone shows me another way that
> MODULE_ALIAS("platform:[...]") can actually be used.

> So, in short, the difference between this driver and other platform
> drivers is that, as far as I'm aware, this platform driver lacks a
> corresponding platform device. Probably because OF support suffices to
> get this module autoloaded.

This is a patch adding a device driver.  We do not require that patches
adding device drivers also add architecture code to load the driver or
even be part of the same patch series since that isn't really helpful
for anything.  We don't even require that board code be part of mainline
at all, though obviously we do encourage it.

If you want to make a tree wide effort to remove MODULE_ALIAS()s that
do not have any in tree users please do that separately.  Right now it's
perfectly OK to do it.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web