Re: [PATCH v2 3/4] drm/bridge: dw-hdmi: add cec driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/02/2017 12:32 AM, Laurent Pinchart wrote:
>> +
>> +	cec_register_cec_notifier(cec->adap, cec->notify);
>> +
>> +	return 0;
>> +}
>> +
>> +static int dw_hdmi_cec_remove(struct platform_device *pdev)
>> +{
>> +	struct dw_hdmi_cec *cec = platform_get_drvdata(pdev);
>> +
>> +	cec_unregister_adapter(cec->adap);
>> +	cec_notifier_put(cec->notify);
>> +
>> +	return 0;
>> +}
>> +
>> +static struct platform_driver dw_hdmi_cec_driver = {
>> +	.probe	= dw_hdmi_cec_probe,
>> +	.remove	= dw_hdmi_cec_remove,
>> +	.driver = {
>> +		.name = "dw-hdmi-cec",
>> +	},
>> +};
>> +module_platform_driver(dw_hdmi_cec_driver);
> 
> Is there a particular reason why this has to be a separate module instead of 
> simply calling the CEC init/cleanup functions directly from the main dw-hdmi 
> driver ?

Not all SoCs that use dw-hdmi also use the dw-hdmi CEC implementation. Some
use their own implementation (amlogic). So by implementing the cec-notifier in
the dw-hdmi driver and keeping dw-hdmi CEC separate you can easily choose
whether or not you want to use this CEC driver or another SoC CEC driver.

Regards,

	Hans

> 
>> +MODULE_AUTHOR("Russell King <rmk+kernel@xxxxxxxxxxxxxxx>");
>> +MODULE_DESCRIPTION("Synopsys Designware HDMI CEC driver for i.MX");
>> +MODULE_LICENSE("GPL");
>> +MODULE_ALIAS(PLATFORM_MODULE_PREFIX "dw-hdmi-cec");
> 

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux