[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200616200225.32mwzew3zw3nuiwh@mobilestation>
Date: Tue, 16 Jun 2020 23:02:25 +0300
From: Serge Semin <fancer.lancer@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linux-gpio@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
linux-kernel@...r.kernel.org, Lee Jones <lee.jones@...aro.org>
Subject: Re: [PATCH v1 0/6] mfd: Make use of software nodes
On Mon, Jun 08, 2020 at 04:42:54PM +0300, Andy Shevchenko wrote:
> Some devices would need to have a hierarchy of properties and
> child nodes passed to the child or children of MFD. For such case
> we may utilize software nodes, which is superior on device properties.
>
> Add support of software nodes to MFD core and convert one driver
> to show how it looks like. This allows to get rid of legacy platform
> data.
>
> The change has been tested on Intel Galileo Gen 2.
I am wondering whether we could move the {gpio_base, ngpio, irq_shared}
part into the gpio-dwapb.c driver and use either the ACPI-based or
platform_device_id-based matching to get the device-specific resources
info through the driver_data field. By doing so you wouldn't need to
introduce a new "snps,gpio-base"-like property and propagate
software_node-based properties, but still you could get rid of the
dwapb_platform_data structure since all the info would be locally
available.
If ACPI-based matching doesn't uniquely address the Quark GPIO node,
then you could just replace the intel_quark_mfd_cells[0].name with
something like "gpio-dwapb-quark", which then by the MFD core will be
copied to the corresponding platform_device->name due to calling
platform_device_alloc() with cell-name passed. That name will be used
to match a platform_driver with id_table having that new name added.
-Sergey
>
> Andy Shevchenko (5):
> gpio: dwapb: Replace irq_shared flag with fwnode type check
> gpio: dwapb: Read GPIO base from snps,gpio-base property
> mfd: intel_quark_i2c_gpio: Convert to use software nodes
> gpio: dwapb: Get rid of legacy platform data
> gpio: dwapb: Define magic number for IRQ and GPIO lines
>
> Heikki Krogerus (1):
> mfd: core: Propagate software node group to the sub devices
>
> drivers/gpio/gpio-dwapb.c | 44 +++++++++-------
> drivers/mfd/intel_quark_i2c_gpio.c | 64 +++++++++++-------------
> drivers/mfd/mfd-core.c | 31 ++++++++++--
> include/linux/mfd/core.h | 3 ++
> include/linux/platform_data/gpio-dwapb.h | 23 ---------
> 5 files changed, 85 insertions(+), 80 deletions(-)
> delete mode 100644 include/linux/platform_data/gpio-dwapb.h
>
> --
> 2.27.0.rc2
>
Powered by blists - more mailing lists