RE: [PATCH 2/2] mei: Add MEI hardware support for IVSC device

From: Wu, Wentong
Date: Wed Nov 29 2023 - 08:56:23 EST


> From: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
> On 28/11/2023 13:34, Wentong Wu wrote:
> > The protocol used for the IVSC device to communicate with HOST is MEI.
> > The MEI hardware interfaces for the IVSC device are implemented.
> >
>
> ...
>
> > +static DEFINE_SIMPLE_DEV_PM_OPS(mei_vsc_pm_ops, mei_vsc_suspend,
> > +mei_vsc_resume);
> > +
> > +static struct platform_driver mei_vsc_drv = {
> > + .probe = mei_vsc_probe,
> > + .remove = mei_vsc_remove,
> > + .driver = {
> > + .name = "intel_vsc",
> > + .pm = &mei_vsc_pm_ops,
> > + .probe_type = PROBE_PREFER_ASYNCHRONOUS,
> > + },
> > +};
> > +module_platform_driver(mei_vsc_drv);
> > +
> > +MODULE_AUTHOR("Wentong Wu <wentong.wu@xxxxxxxxx>");
> > +MODULE_AUTHOR("Zhifeng Wang <zhifeng.wang@xxxxxxxxx>");
> > +MODULE_DESCRIPTION("Intel Visual Sensing Controller Interface");
> > +MODULE_ALIAS("platform:intel_vsc");
>
> You should not need MODULE_ALIAS() in normal cases. If you need it, usually it
> means your device ID table is wrong (e.g. misses either entries or
> MODULE_DEVICE_TABLE()). MODULE_ALIAS() is not a substitute for incomplete
> ID table.

Agree, I forgot the id table and it will be added in next version, thanks

#define MEI_VSC_DRV_NAME "intel_vsc"

static const struct platform_device_id mei_vsc_id_table[] = {
{ MEI_VSC_DRV_NAME },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(platform, mei_vsc_id_table);

static struct platform_driver mei_vsc_drv = {
.probe = mei_vsc_probe,
.remove = mei_vsc_remove,
.id_table = mei_vsc_id_table,
.driver = {
.name = MEI_VSC_DRV_NAME,
.pm = &mei_vsc_pm_ops,
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
};
module_platform_driver(mei_vsc_drv);

MODULE_AUTHOR("Wentong Wu <wentong.wu@xxxxxxxxx>");
MODULE_AUTHOR("Zhifeng Wang <zhifeng.wang@xxxxxxxxx>");
MODULE_DESCRIPTION("Intel Visual Sensing Controller Interface");
MODULE_LICENSE("GPL");
MODULE_IMPORT_NS(VSC_TP);

BR,
Wentong
>
>
> Best regards,
> Krzysztof