* [PATCH 3/6] btwilink: add minimal device tree support
@ 2015-01-09 3:47 Gigi Joseph
[not found] ` <1420775239-24745-1-git-send-email-gigi.joseph-l0cyMroinI0@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Gigi Joseph @ 2015-01-09 3:47 UTC (permalink / raw)
To: Marcel Holtmann, Gustavo Padovan, Johan Hedberg, Grant Likely,
Rob Herring, linux-bluetooth, linux-kernel, devicetree
Cc: Gigi Joseph, Eyal Reizer, bvijay
Add minimal device tree support to the btwilink driver that is used
for binding bluetooth with the ti-st shared transport driver.
Signed-off-by: Eyal Reizer <eyalr@ti.com>
Signed-off-by: bvijay <bvijay@ti.com>
Signed-off-by: Gigi Joseph <gigi.joseph@ti.com>
---
drivers/bluetooth/btwilink.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/bluetooth/btwilink.c b/drivers/bluetooth/btwilink.c
index 55c135b..95adec3 100644
--- a/drivers/bluetooth/btwilink.c
+++ b/drivers/bluetooth/btwilink.c
@@ -30,6 +30,7 @@
#include <linux/ti_wilink_st.h>
#include <linux/module.h>
+#include <linux/of.h>
/* Bluetooth Driver Version */
#define VERSION "1.0"
@@ -286,6 +287,14 @@ static int ti_st_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
return 0;
}
+static const struct of_device_id btwilink_of_match[] = {
+{
+ .compatible = "btwilink",
+ },
+ {}
+};
+MODULE_DEVICE_TABLE(of, btwilink_of_match);
+
static int bt_ti_probe(struct platform_device *pdev)
{
static struct ti_st *hst;
@@ -349,6 +358,8 @@ static struct platform_driver btwilink_driver = {
.remove = bt_ti_remove,
.driver = {
.name = "btwilink",
+ .owner = THIS_MODULE,
+ .of_match_table = of_match_ptr(btwilink_of_match),
},
};
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1420775239-24745-1-git-send-email-gigi.joseph-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH 3/6] btwilink: add minimal device tree support [not found] ` <1420775239-24745-1-git-send-email-gigi.joseph-l0cyMroinI0@public.gmane.org> @ 2015-01-09 4:04 ` Varka Bhadram 2015-01-09 7:07 ` Marcel Holtmann 1 sibling, 0 replies; 3+ messages in thread From: Varka Bhadram @ 2015-01-09 4:04 UTC (permalink / raw) To: Gigi Joseph Cc: Marcel Holtmann, Gustavo Padovan, Johan Hedberg, Grant Likely, Rob Herring, linux-bluetooth-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Gigi Joseph, Eyal Reizer, bvijay Hi, On Fri, Jan 9, 2015 at 9:17 AM, Gigi Joseph <gigi.joseph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > Add minimal device tree support to the btwilink driver that is used > for binding bluetooth with the ti-st shared transport driver. > > Signed-off-by: Eyal Reizer <eyalr-l0cyMroinI0@public.gmane.org> > Signed-off-by: bvijay <bvijay-l0cyMroinI0@public.gmane.org> > Signed-off-by: Gigi Joseph <gigi.joseph-l0cyMroinI0@public.gmane.org> > --- > drivers/bluetooth/btwilink.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/bluetooth/btwilink.c b/drivers/bluetooth/btwilink.c > index 55c135b..95adec3 100644 > --- a/drivers/bluetooth/btwilink.c > +++ b/drivers/bluetooth/btwilink.c > @@ -30,6 +30,7 @@ > > #include <linux/ti_wilink_st.h> > #include <linux/module.h> > +#include <linux/of.h> > > /* Bluetooth Driver Version */ > #define VERSION "1.0" > @@ -286,6 +287,14 @@ static int ti_st_send_frame(struct hci_dev *hdev, struct sk_buff *skb) > return 0; > } > > +static const struct of_device_id btwilink_of_match[] = { > +{ > + .compatible = "btwilink", compatible property include the manufacturer name also... compatible="<manufacturer>,<model>" > + }, > + {} > +}; > +MODULE_DEVICE_TABLE(of, btwilink_of_match); > + > static int bt_ti_probe(struct platform_device *pdev) > { > static struct ti_st *hst; > @@ -349,6 +358,8 @@ static struct platform_driver btwilink_driver = { > .remove = bt_ti_remove, > .driver = { > .name = "btwilink", > + .owner = THIS_MODULE, No need to update this field. It will be updated by driver core. > + .of_match_table = of_match_ptr(btwilink_of_match), > }, > }; > > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe devicetree" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Thanks and Regards, Varka Bhadram. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 3/6] btwilink: add minimal device tree support [not found] ` <1420775239-24745-1-git-send-email-gigi.joseph-l0cyMroinI0@public.gmane.org> 2015-01-09 4:04 ` Varka Bhadram @ 2015-01-09 7:07 ` Marcel Holtmann 1 sibling, 0 replies; 3+ messages in thread From: Marcel Holtmann @ 2015-01-09 7:07 UTC (permalink / raw) To: Gigi Joseph Cc: Gustavo F. Padovan, Johan Hedberg, Grant Likely, Rob Herring, BlueZ development, Linux Kernel Mailing List, devicetree-u79uwXL29TY76Z2rM5mHXA, Gigi Joseph, Eyal Reizer, bvijay Hi Gigi, > Add minimal device tree support to the btwilink driver that is used > for binding bluetooth with the ti-st shared transport driver. > > Signed-off-by: Eyal Reizer <eyalr-l0cyMroinI0@public.gmane.org> > Signed-off-by: bvijay <bvijay-l0cyMroinI0@public.gmane.org> > Signed-off-by: Gigi Joseph <gigi.joseph-l0cyMroinI0@public.gmane.org> > --- > drivers/bluetooth/btwilink.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/bluetooth/btwilink.c b/drivers/bluetooth/btwilink.c > index 55c135b..95adec3 100644 > --- a/drivers/bluetooth/btwilink.c > +++ b/drivers/bluetooth/btwilink.c > @@ -30,6 +30,7 @@ > > #include <linux/ti_wilink_st.h> > #include <linux/module.h> > +#include <linux/of.h> > > /* Bluetooth Driver Version */ > #define VERSION "1.0" > @@ -286,6 +287,14 @@ static int ti_st_send_frame(struct hci_dev *hdev, struct sk_buff *skb) > return 0; > } > > +static const struct of_device_id btwilink_of_match[] = { > +{ > + .compatible = "btwilink", > + }, > + {} > +}; this formatting is bogus. Please construct it similar to what other drivers are doing. static const struct .. = { { .compatible = ".." }, { } /* Terminating entry */ }; And add an extra empty line before MODULE_DEVICE_TABLE. > +MODULE_DEVICE_TABLE(of, btwilink_of_match); > + > static int bt_ti_probe(struct platform_device *pdev) > { > static struct ti_st *hst; > @@ -349,6 +358,8 @@ static struct platform_driver btwilink_driver = { > .remove = bt_ti_remove, > .driver = { > .name = "btwilink", > + .owner = THIS_MODULE, > + .of_match_table = of_match_ptr(btwilink_of_match), > }, > }; Regards Marcel -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-09 7:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-09 3:47 [PATCH 3/6] btwilink: add minimal device tree support Gigi Joseph
[not found] ` <1420775239-24745-1-git-send-email-gigi.joseph-l0cyMroinI0@public.gmane.org>
2015-01-09 4:04 ` Varka Bhadram
2015-01-09 7:07 ` Marcel Holtmann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).