From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Frank Rowand
<frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Russell King <linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 00/22] of: Introduce of_match_device()
Date: Mon, 6 Jun 2016 10:31:42 +0200 [thread overview]
Message-ID: <20160606083204.19760-1-thierry.reding@gmail.com> (raw)
From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
This series of patches introduces a common implementation of a function
that can be used in iterators (such as the bus_for_each_dev() or the
driver_for_each_device() functions) and that compare's a device's device
tree node with the passed in data. Numerous drivers and subsystems have
their own variant of this function, so a lot of duplication can be
removed by making use of the common implementation.
One thing that slightly bugs me about this is that it can't be used with
users of class_for_each_device() or class_find_device() because they get
passed a callback that takes a const void * rather than a void * for the
device tree node. I had at some point investigated to turn the remainder
of the iterators into taking const void *, but there are some drivers in
the kernel that want to modify the data passed to them, so it isn't easy
to switch.
An alternative would be to turn the const void * into void * for all the
callbacks of this sort, so that we can use a single set throughout the
tree, but I'm not sure how welcome that would be. I can give that a shot
if people think it worth, though.
Greg, any thoughts on this?
I've also kept the list of recipients very short, to get early feedback
and buy-in from Rob and Frank on the common implementation. I expect the
naming to allow for some good bike-shedding.
Russell, I've Cc'ed you explicitly on this because last dozen or so
patches touch users of component helpers and you've been busy working on
those lately. I wanted to give you a heads up on this and am looking for
your feedback on where you think this would fit in.
Merging this might get a little complicated, but I think it'd be easiest
to take it all through the DT tree. Perhaps we can hold off on the final
DRM and IOMMU patches since they are based on stuff currently in linux-
next only, and defer those to v4.9?
Thierry
Thierry Reding (22):
of: Implement of_match_device()
amba: tegra-ahb: Use of_device_match()
coresight: Use of_device_match()
i2c: core: Use of_device_match()
net: cpsw-phy-sel: Use of_device_match()
nvmem: core: Use of_device_match()
of/platform: Use of_device_match()
spi: Use of_device_match()
of: mdio: Use of_device_match()
usb: phy: am335x-control: Use of_device_match()
usb: phy: isp1301: Use of_device_match()
drm/hdlcd: Use of_device_match()
drm/armada: Use of_device_match()
drm/etnaviv: Use of_device_match()
drm/hisilicon: Use of_device_match()
drm/mediatek: Use of_device_match()
drm/msm: Use of_device_match()
drm/rockchip: Use of_device_match()
drm/sti: Use of_device_match()
drm/sun4i: Use of_device_match()
drm/tilcdc: Use of_device_match()
iommu/mediatek: Use of_device_match()
drivers/amba/tegra-ahb.c | 11 ++---------
drivers/gpu/drm/arm/hdlcd_drv.c | 8 ++------
drivers/gpu/drm/armada/armada_drv.c | 8 ++------
drivers/gpu/drm/drm_mipi_dsi.c | 5 -----
drivers/gpu/drm/etnaviv/etnaviv_drv.c | 12 +++---------
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 8 ++------
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 8 ++------
drivers/gpu/drm/msm/msm_drv.c | 13 +++----------
drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 12 +++---------
drivers/gpu/drm/sti/sti_drv.c | 8 ++------
drivers/gpu/drm/sun4i/sun4i_drv.c | 12 ++----------
drivers/gpu/drm/tilcdc/tilcdc_external.c | 8 ++------
drivers/hwtracing/coresight/of_coresight.c | 10 +++-------
drivers/i2c/i2c-core.c | 9 ++-------
drivers/iommu/mtk_iommu.c | 8 ++------
drivers/net/ethernet/ti/cpsw-phy-sel.c | 9 ++-------
drivers/nvmem/core.c | 8 ++------
drivers/of/of_mdio.c | 9 ++-------
drivers/of/platform.c | 7 +------
drivers/spi/spi.c | 7 +------
drivers/usb/phy/phy-am335x-control.c | 10 +++-------
drivers/usb/phy/phy-isp1301.c | 13 ++++---------
include/linux/of_device.h | 5 +++++
23 files changed, 52 insertions(+), 156 deletions(-)
--
2.8.3
--
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
next reply other threads:[~2016-06-06 8:31 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 8:31 Thierry Reding [this message]
2016-06-06 8:31 ` [PATCH 02/22] amba: tegra-ahb: Use of_device_match() Thierry Reding
2016-06-06 18:51 ` Frank Rowand
2016-06-06 8:31 ` [PATCH 03/22] coresight: " Thierry Reding
2016-06-06 8:31 ` [PATCH 04/22] i2c: core: " Thierry Reding
2016-06-06 8:31 ` [PATCH 05/22] net: cpsw-phy-sel: " Thierry Reding
[not found] ` <20160606083204.19760-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-06-06 8:31 ` [PATCH 01/22] of: Implement of_match_device() Thierry Reding
2016-06-06 8:31 ` [PATCH 06/22] nvmem: core: Use of_device_match() Thierry Reding
2016-06-06 8:31 ` [PATCH 10/22] usb: phy: am335x-control: " Thierry Reding
2016-06-06 8:31 ` [PATCH 13/22] drm/armada: " Thierry Reding
2016-06-06 8:31 ` [PATCH 07/22] of/platform: " Thierry Reding
2016-06-06 8:31 ` [PATCH 08/22] spi: " Thierry Reding
2016-06-06 8:31 ` [PATCH 09/22] of: mdio: " Thierry Reding
2016-06-06 8:31 ` [PATCH 11/22] usb: phy: isp1301: " Thierry Reding
2016-06-06 8:31 ` [PATCH 12/22] drm/hdlcd: " Thierry Reding
2016-06-06 8:31 ` [PATCH 14/22] drm/etnaviv: " Thierry Reding
2016-06-06 8:31 ` [PATCH 15/22] drm/hisilicon: " Thierry Reding
2016-06-06 8:31 ` [PATCH 16/22] drm/mediatek: " Thierry Reding
2016-06-06 8:31 ` [PATCH 17/22] drm/msm: " Thierry Reding
2016-06-06 8:32 ` [PATCH 18/22] drm/rockchip: " Thierry Reding
2016-06-06 8:32 ` [PATCH 19/22] drm/sti: " Thierry Reding
2016-06-06 8:32 ` [PATCH 20/22] drm/sun4i: " Thierry Reding
2016-06-06 8:32 ` [PATCH 21/22] drm/tilcdc: " Thierry Reding
2016-06-06 8:32 ` [PATCH 22/22] iommu/mediatek: " Thierry Reding
2016-06-06 18:50 ` [PATCH 00/22] of: Introduce of_match_device() Frank Rowand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160606083204.19760-1-thierry.reding@gmail.com \
--to=thierry.reding-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).