Re: [PATCH v1 0/6] mfd: Make use of software nodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 16, 2020 at 11:03 PM Serge Semin <fancer.lancer@xxxxxxxxx> wrote:
> 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.

The idea is to get rid of the driver being dependent on some quirks
when we may do it clearly and nicely.
We, by applying this series, make (keep) layers independent: board
code vs. driver code. Mixing them more is the opposite to what I
propose.

WRT property.
snps,gpio-base can be easily changed to *already in use* gpio-base or
being both converted to linux,gpio-base to explicitly show people that
this is internal stuff that must not be present in firmware nodes.

> 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.

Oh, that doesn't sound right. It makes things ugly.

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux