Re: [alsa-devel] [PATCH] ASoC: dfbmcs320: make the driver common for other BT modules
On 05/16/2013 08:53 AM, Barry Song wrote:
DFBM-CS320 is only one of bluetooth modules using CSR bluetooth chips, we don't want everyone to have a seperate codec driver. anyway, the feature of Bluetooth handsfree is same on all platforms, so this patch makes the DFBM-CS320 driver become a common BT handsfree driver.
[...]
-static struct platform_driver dfmcs320_driver = { +static struct platform_driver bt_handsfree_driver = { .driver = {
.name = "dfbmcs320",
.owner = THIS_MODULE,.name = "bt-handsfree",
In my opinion it's a good idea to keep a platform_id list of all the supported devices.
},
- .probe = dfbmcs320_probe,
- .remove = dfbmcs320_remove,
- .probe = bt_handsfree_probe,
- .remove = bt_handsfree_remove,
};
-module_platform_driver(dfmcs320_driver); +module_platform_driver(bt_handsfree_driver);
2013/5/16 Lars-Peter Clausen lars@metafoo.de:
On 05/16/2013 08:53 AM, Barry Song wrote:
DFBM-CS320 is only one of bluetooth modules using CSR bluetooth chips, we don't want everyone to have a seperate codec driver. anyway, the feature of Bluetooth handsfree is same on all platforms, so this patch makes the DFBM-CS320 driver become a common BT handsfree driver.
[...]
-static struct platform_driver dfmcs320_driver = { +static struct platform_driver bt_handsfree_driver = { .driver = {
.name = "dfbmcs320",
.name = "bt-handsfree", .owner = THIS_MODULE,
In my opinion it's a good idea to keep a platform_id list of all the supported devices.
i have no idea how many bluetooth handsfree module exist in the world. there must be many. actually the driver works for almost all BT handsfree. so my basic idea is making the codes as common as possible.
and i also want to add dt compatible in this driver, a generic compatible string can be "bluetooth, handsfree", but users can add specific string in its board dts like:
compatible = "delta, dfbmcs320", "bluetooth, handsfree";
so the driver will still work for "delta, dfbmcs320".
},
.probe = dfbmcs320_probe,
.remove = dfbmcs320_remove,
.probe = bt_handsfree_probe,
.remove = bt_handsfree_remove,
};
-module_platform_driver(dfmcs320_driver); +module_platform_driver(bt_handsfree_driver);
-barry
On 05/16/2013 12:31 PM, Barry Song wrote:
2013/5/16 Lars-Peter Clausen lars@metafoo.de:
On 05/16/2013 08:53 AM, Barry Song wrote:
DFBM-CS320 is only one of bluetooth modules using CSR bluetooth chips, we don't want everyone to have a seperate codec driver. anyway, the feature of Bluetooth handsfree is same on all platforms, so this patch makes the DFBM-CS320 driver become a common BT handsfree driver.
[...]
-static struct platform_driver dfmcs320_driver = { +static struct platform_driver bt_handsfree_driver = { .driver = {
.name = "dfbmcs320",
.name = "bt-handsfree", .owner = THIS_MODULE,
In my opinion it's a good idea to keep a platform_id list of all the supported devices.
i have no idea how many bluetooth handsfree module exist in the world. there must be many. actually the driver works for almost all BT handsfree. so my basic idea is making the codes as common as possible.
you don't have to know all the device names, but I'd prefer to keep at least dfbmcs320 in the device id list.
- Lars
2013/5/16 Lars-Peter Clausen lars@metafoo.de:
On 05/16/2013 12:31 PM, Barry Song wrote:
2013/5/16 Lars-Peter Clausen lars@metafoo.de:
On 05/16/2013 08:53 AM, Barry Song wrote:
DFBM-CS320 is only one of bluetooth modules using CSR bluetooth chips, we don't want everyone to have a seperate codec driver. anyway, the feature of Bluetooth handsfree is same on all platforms, so this patch makes the DFBM-CS320 driver become a common BT handsfree driver.
[...]
-static struct platform_driver dfmcs320_driver = { +static struct platform_driver bt_handsfree_driver = { .driver = {
.name = "dfbmcs320",
.name = "bt-handsfree", .owner = THIS_MODULE,
In my opinion it's a good idea to keep a platform_id list of all the supported devices.
i have no idea how many bluetooth handsfree module exist in the world. there must be many. actually the driver works for almost all BT handsfree. so my basic idea is making the codes as common as possible.
you don't have to know all the device names, but I'd prefer to keep at least dfbmcs320 in the device id list.
i did think it is a good idea to have device id list while i sent the last mail. and it matches with the generic device driver engineering sense. the problem is i don't how long the list will be. if you like to keep dfbmcs320 at least for the moment, i would agree.
- Lars
-barry
On Thu, May 16, 2013 at 08:00:17PM +0800, Barry Song wrote:
i did think it is a good idea to have device id list while i sent the last mail. and it matches with the generic device driver engineering sense. the problem is i don't how long the list will be. if you like to keep dfbmcs320 at least for the moment, i would agree.
I'd prefer to see the ID list; we shouldn't be throwing away information. Probably we can go a long way towards cutting down the length of the list if it gets silly with use of wildcards in the device names listed.
participants (3)
-
Barry Song
-
Lars-Peter Clausen
-
Mark Brown