Re: [PATCH v2 5/6] ACPI: scan: Extract MIPI DiSco for Imaging data into swnodes

From: Rafael J. Wysocki
Date: Tue Oct 31 2023 - 11:21:52 EST


Hi Sakari,

On Tue, Oct 31, 2023 at 3:00 PM Sakari Ailus
<sakari.ailus@xxxxxxxxxxxxxxx> wrote:
>
> Hi Rafael,
>
> On Tue, Oct 31, 2023 at 02:46:51PM +0100, Rafael J. Wysocki wrote:
> > Hi Sakari,
> >
> > On Tue, Oct 31, 2023 at 11:33 AM Sakari Ailus
> > <sakari.ailus@xxxxxxxxxxxxxxx> wrote:
> > >
> > > Hi Rafael,
> > >
> > > On subject:
> > >
> > > s/DiSco/DisCo/
> >
> > Huh
> >
> > Thanks for catching this!
> >
> > > On Fri, Oct 20, 2023 at 04:39:27PM +0200, Rafael J. Wysocki wrote:
> > > > From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> > > >
> > > > Add information extracted from the MIPI DiSco for Imaging device
> > >
> > > Ditto.
> > >
> > > > properties to software nodes created during the CSI-2 connection graph
> > > > discovery.
> > > >
> > > > Link: https://www.mipi.org/specifications/mipi-di
> > >
> > > This URL is broken. The correct URL is:
> > >
> > > https://www.mipi.org/specifications/mipi-disco-imaging
> >
> > OK
> >
> > > > Co-developed-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
> > > > Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
> > > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> > > > ---
> > > > drivers/acpi/internal.h | 1
> > > > drivers/acpi/mipi-di.c | 240 +++++++++++++++++++++++++++++++++++++++++++++++-
> > >
> > > How about mipi-disco.c? I wouldn't mind having mipi-disco-imaging.c either.
> >
> > Well, mipi-disco-imaging is a bit too long and the meaning of
> > mipi-disco would not be clear IMO.
> >
> > What about mipi-disco-img?
>
> Seems fine to me.
>
> >
> > [cut]
> >
> > > > + ret = fwnode_property_count_u8(port_fwnode, "mipi-img-lane-polarities");
> > > > + if (ret > 0) {
> > > > + unsigned long mask;
> > > > + unsigned int i;
> > > > +
> > > > + /*
> > > > + * Total number of lanes here is clock lane + data lanes.
> > > > + * Require that number to be low enough so they all can be
> > > > + * covered by the bits in one byte.
> > > > + */
> > > > + BUILD_BUG_ON(BITS_PER_TYPE(u8) <= ARRAY_SIZE(port->data_lanes));
> > > > +
> > > > + fwnode_property_read_u8_array(port_fwnode,
> > > > + "mipi-img-lane-polarities",
> > > > + val, 1);
> > > > +
> > > > + for (mask = val[0], i = 0; i < num_lanes + 1; i++)
> > > > + port->lane_polarities[i] = test_bit(i, &mask);
> > >
> > > This works only up to seven lanes.
> >
> > True, but then ACPI_DEVICE_CSI2_DATA_LANES is defined as 4.
>
> The spec has no limit and in practice 4 is relatively common while 8 exists
> (but is somewhat rare). I actually think it'd be a good idea to bump this
> to 8 already.

OK