From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Date: Thu, 25 Jul 2019 16:10:36 +0200 From: Greg KH Subject: Re: [PATCH v3 0/7] drivers: Add generic device lookup helpers Message-ID: <20190725141036.GA14950@kroah.com> References: <20190723221838.12024-1-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190723221838.12024-1-suzuki.poulose@arm.com> To: Suzuki K Poulose Cc: linux-kernel@vger.kernel.org, rafael@kernel.org, linux-arm-kernel@lists.infradead.org, Alan Tull , Alessandro Zummo , Alexander Aring , Alexander Shishkin , Alexandre Belloni , Andrew Lunn , Arnd Bergmann , Bjorn Helgaas , Daniel Vetter , Dan Murphy , David Airlie , "David S. Miller" , devicetree@vger.kernel.org, Doug Ledford , dri-devel@lists.freedesktop.org, Elie Morisse , Eric Anholt , Florian Fainelli , Frank Rowand , Harald Freudenberger , Heikki Krogerus , Heiko Carstens , Heiko =?iso-8859-1?Q?St=FCbner?= , Heiner Kallweit , Inki Dae , Jacek Anaszewski , "James E.J. Bottomley" , Jason Gunthorpe , Jiri Slaby , Joe Perches , Joerg Roedel , Lee Jones , Len Brown , Liam Girdwood , linux-acpi@vger.kernel.org, linux-fpga@vger.kernel.org, linux-i2c@vger.kernel.org, linux-leds@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-rtc@vger.kernel.org, linux-spi@vger.kernel.org, linux-usb@vger.kernel.org, linux-wpan@vger.kernel.org, Maarten Lankhorst , Mark Brown , "Martin K. Petersen" , Mathieu Poirier , Maxime Coquelin , Maxime Ripard , Mika Westerberg , Moritz Fischer , Nehal Shah , Oliver Neukum , Pavel Machek , Peter Oberparleiter , Peter Rosin , "Rafael J. Wysocki" , Rob Herring , Robin Murphy , Sandy Huang , Sebastian Andrzej Siewior , Seung-Woo Kim , Shyam Sundar S K , Srinivas Kandagatla , Stefan Schmidt , Takashi Iwai , Thor Thayer , Tomas Winkler , Ulf Hansson , Will Deacon , Wolfram Sang List-ID: On Tue, Jul 23, 2019 at 11:18:31PM +0100, Suzuki K Poulose wrote: > We have device iterators to find a particular device matching a criteria > for a given bus/class/driver. i.e, {bus,class,driver}_find_device() > APIs. The matching criteria is a function pointer for the APIs. Often the > lookup is based on a generic property of a device (e.g, name, fwnode, of node > pointer or device type) rather than a driver specific information. However, each > driver writes up its own "match" function, spilling the similar match functions > all over the driver subsystems. > > This series adds device match helpers by generic device properties of a device. > Using these generic match functions, introduce wrappers to the existing > *_find_device() helpers and converts the existing users to use the new wrappers. > i.e, > {bus/class/driver}_find_device_by_name() > {bus/class/driver}_find_device_by_fwnode() > {bus/class/driver}_find_device_by_devt() > {bus/class/driver}_find_device_by_acpi_dev() > > Also adds a wrapper for finding a platform device by driver, to avoid > spilling the platform_bus internals in the individual drivers. Applies > on 5.3-rc1. > > [0] git://linux-arm.org/linux-skp.git driver-cleanup/v3 > RFC[1] https://marc.info/?i=1559577023-558-1-git-send-email-suzuki.poulose@arm.com > V1 [2] https://marc.info/?i=1559747630-28065-1-git-send-email-suzuki.poulose@arm.com > V2 [3] https://marc.info/?i=1560534863-15115-1-git-send-email-suzuki.poulose@arm.com > > Changes since v2: > - Merge the device match helper introduction patch with the variants > of the helpers, for better review. > - Use platform_find_device_by_driver for mcde drm driver. This looks good to me at first glance, thanks for doing this work. I'll wait a few days to collect acks from various subsystem maintainers before taking the series in my tree. thanks, greg k-h