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


Groups > linux.kernel > #1479653

Re: [PATCH v2 01/17] rpmsg: Enable matching devices with drivers based on DT

From Bjorn Andersson <bjorn.andersson@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 01/17] rpmsg: Enable matching devices with drivers based on DT
Date 2016-09-09 06:40 +0200
Message-ID <sflLz-6LR-1@gated-at.bofh.it> (permalink)
References <scIEG-7Nd-3@gated-at.bofh.it> <scIOm-7Qu-7@gated-at.bofh.it> <seWDv-7Jo-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed 07 Sep 18:46 PDT 2016, spjoshi@codeaurora.org wrote:

> On 2016-09-01 15:27, Bjorn Andersson wrote:
> >Make it possible to match rpmsg devices based on device tree node, in
> >addition to the id table. In some of these cases the rpmsg driver would
> >not have a id_table, so make this optional.
> >
> >Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> >---
> >
> >Changes since v1:
> >- None
> >
> > drivers/rpmsg/virtio_rpmsg_bus.c | 10 ++++++----
> > 1 file changed, 6 insertions(+), 4 deletions(-)
> >
> >diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c
> >b/drivers/rpmsg/virtio_rpmsg_bus.c
> >index 4a4374cc6a59..495fa0a282d3 100644
> >--- a/drivers/rpmsg/virtio_rpmsg_bus.c
> >+++ b/drivers/rpmsg/virtio_rpmsg_bus.c
> >@@ -33,6 +33,7 @@
> > #include <linux/wait.h>
> > #include <linux/rpmsg.h>
> > #include <linux/mutex.h>
> >+#include <linux/of_device.h>
> >
> > /**
> >  * struct virtproc_info - virtual remote processor state
> >@@ -175,11 +176,12 @@ static int rpmsg_dev_match(struct device *dev,
> >struct device_driver *drv)
> > 	const struct rpmsg_device_id *ids = rpdrv->id_table;
> > 	unsigned int i;
> >
> >-	for (i = 0; ids[i].name[0]; i++)
> >-		if (rpmsg_id_match(rpdev, &ids[i]))
> >-			return 1;
> >+	if (ids)
> >+		for (i = 0; ids[i].name[0]; i++)
> >+			if (rpmsg_id_match(rpdev, &ids[i]))
> >+				return 1;
> >
> >-	return 0;
> >+	return of_driver_match_device(dev, drv);
> 
> Do we care falling back to acpi_driver_match_device if
> of_driver_match_device fails (something similar to what platform_match
> does)?
> 

I'm not sure how this would look in the case of ACPI, so I would prefer
if we defer that until such case arise.

Regards,
Bjorn

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 00/17] Make rpmsg a framework Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:30 +0200
  [PATCH v2 12/17] rpmsg: Split rpmsg core and virtio backend Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:30 +0200
  [PATCH v2 01/17] rpmsg: Enable matching devices with drivers based on DT Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:40 +0200
    Re: [PATCH v2 01/17] rpmsg: Enable matching devices with drivers  based on DT spjoshi@codeaurora.org - 2016-09-08 03:50 +0200
      Re: [PATCH v2 01/17] rpmsg: Enable matching devices with drivers  based on DT Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-09 06:40 +0200
        Re: [PATCH v2 01/17] rpmsg: Enable matching devices with drivers  based on DT Sarangdhar Joshi <spjoshi@codeaurora.org> - 2016-09-10 00:10 +0200
  [PATCH v2 05/17] rpmsg: Clean up rpmsg device vs channel naming Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:40 +0200
  [PATCH v2 11/17] rpmsg: Split off generic tail of create_channel() Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:40 +0200
  [PATCH v2 02/17] rpmsg: Name rpmsg devices based on channel id Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:40 +0200
    Re: [PATCH v2 02/17] rpmsg: Name rpmsg devices based on channel id spjoshi@codeaurora.org - 2016-09-08 03:50 +0200
  [PATCH v2 10/17] rpmsg: Move helper for finding rpmsg devices to core Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:40 +0200
  [PATCH v2 06/17] rpmsg: Introduce indirection table for rpmsg_device operations Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:40 +0200
  [PATCH v2 09/17] rpmsg: Move endpoint related interface to rpmsg core Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:40 +0200
  [PATCH v2 13/17] rpmsg: Hide rpmsg indirection tables Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:40 +0200
  [PATCH v2 04/17] rpmsg: Make rpmsg_create_ept() take channel_info struct Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:40 +0200
  Re: [PATCH v2 00/17] Make rpmsg a framework Lina Iyer <lina.iyer@linaro.org> - 2016-09-12 19:00 +0200
    Re: [PATCH v2 00/17] Make rpmsg a framework Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-12 20:10 +0200
      Re: [PATCH v2 00/17] Make rpmsg a framework Jeffrey Hugo <jhugo@codeaurora.org> - 2016-09-12 20:20 +0200
        Re: [PATCH v2 00/17] Make rpmsg a framework Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-12 21:00 +0200
          Re: [PATCH v2 00/17] Make rpmsg a framework Jeffrey Hugo <jhugo@codeaurora.org> - 2016-09-12 21:30 +0200
            Re: [PATCH v2 00/17] Make rpmsg a framework Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-12 22:00 +0200
              Re: [PATCH v2 00/17] Make rpmsg a framework Karthikeyan Ramasubramanian <kramasub@codeaurora.org> - 2016-09-12 23:40 +0200
                Re: [PATCH v2 00/17] Make rpmsg a framework Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-13 00:00 +0200
    Re: [PATCH v2 00/17] Make rpmsg a framework Lina Iyer <lina.iyer@linaro.org> - 2016-09-13 00:30 +0200
      Re: [PATCH v2 00/17] Make rpmsg a framework Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-13 01:00 +0200

csiph-web