[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPVz0n3QBhi4qmyT2y7J8i_3kXDW3tXtC6D4XQnhz2H2W4-XRA@mail.gmail.com>
Date: Mon, 26 Jan 2026 12:14:29 +0200
From: Svyatoslav Ryhel <clamor95@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: Jonathan Cameron <jic23@...nel.org>, David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>, Lee Jones <lee@...nel.org>,
Pavel Machek <pavel@...nel.org>, Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
Alexandre Belloni <alexandre.belloni@...tlin.com>, Dixit Parmar <dixitparmar19@...il.com>,
Tony Lindgren <tony@...mide.com>, linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
linux-leds@...r.kernel.org, linux-rtc@...r.kernel.org
Subject: Re: [PATCH v1 09/10] mfd: motorola-cpcap: diverge configuration per-board
пн, 26 січ. 2026 р. о 12:13 Andy Shevchenko <andriy.shevchenko@...el.com> пише:
>
> On Sun, Jan 25, 2026 at 03:43:01PM +0200, Svyatoslav Ryhel wrote:
> > MFD have rigid subdevice structure which does not allow flexible dynamic
> > subdevice linking. Address this by diverging CPCAP subdevice composition
> > to take into account board specific configuration.
> >
> > Create a common default subdevice composition, rename existing subdevice
> > composition into cpcap_mapphone_mfd_devices since it targets mainly
> > Mapphone board.
>
> ...
>
> > +#include <linux/of.h>
>
> Why?
>
>
> ...
>
> > + cpcap->cdata = of_device_get_match_data(&spi->dev);
>
> device_get_match_data() from property.h.
>
noted
> > + if (!cpcap->cdata)
> > + return -ENODEV;
> > +
>
> ...
>
> > +static const struct of_device_id cpcap_of_match[] = {
> > + { .compatible = "motorola,cpcap", .data = &cpcap_default_data },
> > + { .compatible = "st,6556002", .data = &cpcap_default_data },
> > + { .compatible = "motorola,mapphone-cpcap", .data = &cpcap_mapphone_data },
>
> > + { /* sentinel */ },
>
> No trailing comma for sentinel.
>
noted
> > +};
> > +MODULE_DEVICE_TABLE(of, cpcap_of_match);
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
Powered by blists - more mailing lists