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


Groups > linux.kernel > #1185746 > unrolled thread

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

Started byzhengxing <zhengxing@rock-chips.com>
First post2015-07-16 13:30 +0200
Last post2015-07-16 18:10 +0200
Articles 4 — 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 zhengxing <zhengxing@rock-chips.com> - 2015-07-16 13:30 +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 Jiang Liu <jiang.liu@linux.intel.com> - 2015-07-16 17:30 +0200
        Re: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090  codec Paul Bolle <pebolle@tiscali.nl> - 2015-07-16 18:10 +0200

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

Fromzhengxing <zhengxing@rock-chips.com>
Date2015-07-16 13:30 +0200
SubjectRe: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090 codec
Message-ID<pMPwu-5cU-19@gated-at.bofh.it>
Hi Paul,
     Thank you for your reply.

On 2015年07月16日 16:05, Paul Bolle wrote:
> On wo, 2015-07-15 at 11:15 +0800, Xing Zheng wrote:
>> +static const struct of_device_id rockchip_max98090_of_match[] = {
>> +	{ .compatible = "rockchip,rockchip-audio-max98090", },
>> +	{},
>> +};
>> +
>> +static struct platform_driver snd_rk_mc_driver = {
>> +	.probe = snd_rk_mc_probe,
>> +	.remove = snd_rk_mc_remove,
>> +	.driver = {
>> +		.name = DRV_NAME,
>> +		.owner = THIS_MODULE,
>> +		.pm =&snd_soc_pm_ops,
>> +		.of_match_table = rockchip_max98090_of_match,
>> +	},
>> +};
>> +
>> +module_platform_driver(snd_rk_mc_driver);
> Nit: empty line here.
Done.
>
>> +MODULE_AUTHOR("jianqun<jay.xu@rock-chips.com>");
>> +MODULE_DESCRIPTION("Rockchip max98090 machine ASoC driver");
>> +MODULE_LICENSE("GPL v2");
>> +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?
Yes, I didn't care about this but I think it maybe correct.
>> +MODULE_DEVICE_TABLE(of, rockchip_max98090_of_match);
> The common pattern is to put MODULE_DEVICE_TABLE() directly after the
> table it exports.
Done.
> Likewise for 2/2 (except the empty line nit, that is).
OK, done.

> 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] | [next] | [standalone]


#1185787 — 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<pMPPQ-5zU-19@gated-at.bofh.it>
In reply to#1185746
Hi,

On do, 2015-07-16 at 19:20 +0800, zhengxing wrote:
> > Did I miss something? Or is there another way this alias is useful 
> > here?
> Yes, I didn't care about this but I think it maybe correct.

What is correct: my comment or the use of MODALIAS() in this patch?

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]


#1185971

FromJiang Liu <jiang.liu@linux.intel.com>
Date2015-07-16 17:30 +0200
Message-ID<pMTgM-2eq-45@gated-at.bofh.it>
In reply to#1185787
On 2015/7/16 22:19, Paul Bolle wrote:
> Hi,
> 
> On do, 2015-07-16 at 19:59 +0800, zhengxing wrote:
>> I mean that the use of MODALIAS() in this patch, and I refered to
>> tegra_max98090.c(have been upstreamed) that used it like this also. So
>> I didn't care the using.
> 
> And I think the same problem with MODULE_ALIAS() can be found in that
> driver. Ie, where does the platform device that has a "tegra-snd
> -max98090" .name hide? (See the reply I just sent to mark for more
> details.)
May be that is hidden in some device tree files.
MODULE_ALIAS() is used by a driver to announce that it supports
such types of devices. And bus enumerator will create those
devices by probing hardware or parsing some configuration files.
Thanks!
Gerry
--
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]


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

FromPaul Bolle <pebolle@tiscali.nl>
Date2015-07-16 18:10 +0200
SubjectRe: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090 codec
Message-ID<pMTTt-3dY-27@gated-at.bofh.it>
In reply to#1185971
Hi Gerry,

On do, 2015-07-16 at 23:25 +0800, Jiang Liu wrote:
> May be that is hidden in some device tree files.
> MODULE_ALIAS() is used by a driver to announce that it supports
> such types of devices. And bus enumerator will create those
> devices by probing hardware or parsing some configuration files.

Then someone could simply point me to the device tree file where that
"platform:" alias comes from. (Note that I, of course, do check the tree
for the substrings involved before tossing questions like these onto
lkml.)

Besides, as far as I can tell, for device tree support the magic
actually hides in
    MODULE_DEVICE_TABLE(of, rockchip_max98090_of_match);

Which, I think, implies that any MODULE_ALIAS("platform:[...]") is
pointless for systems booting with device tree support.

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] | [standalone]


Back to top | Article view | linux.kernel


csiph-web