Re: [PATCH v4 4/6] usb: dwc3: Add Amlogic A1 DWC3 glue

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

 



Hi,

Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx> writes:
> On Wed, Jan 15, 2020 at 9:43 AM Felipe Balbi <balbi@xxxxxxxxxx> wrote:
> [...]
>> > -     priv->clk = devm_clk_get(dev, NULL);
>> > -     if (IS_ERR(priv->clk))
>> > -             return PTR_ERR(priv->clk);
>> > +     priv->soc_id = (enum meson_soc_id)of_device_get_match_data(&pdev->dev);
>> > +
>> > +     if (priv->soc_id == MESON_SOC_G12A) {
>>
>> you can use of_device_is_compatible() and get rid of the enumeration you added.
> Hanjie switched to a struct (instead of an enum) that is passed as
> "match data" in v5 [0] of this series
> personally I prefer what Hanjie has in v5 over
> of_device_is_compatible() (because that match data pattern is what we
> also use on other Amlogic drivers)

but you end up duplicating functionality that already exists by means of
of_device_is_compatible(). Frankly, I don't have a hard opinion about
this anyway, since it's not touching dwc3 core.

In this case, I'll defer to whatever you guys prefer.

-- 
balbi

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux