From: Neil Armstrong <narmstrong@baylibre.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: kishon@ti.com, vkoul@kernel.org, linux-phy@lists.infradead.org,
linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] phy: amlogic: Add G12A Analog MIPI D-PHY driver
Date: Mon, 10 Jan 2022 14:01:30 +0100 [thread overview]
Message-ID: <3f7f1c95-8a16-cb74-3a99-3f67404424db@baylibre.com> (raw)
In-Reply-To: <CAFBinCC9J_w9JM-TmrXp7SXT27V7Ze37wrxHZZQ1==N4y2-0dg@mail.gmail.com>
Hi,
On 07/01/2022 23:09, Martin Blumenstingl wrote:
> Hi Neil,
>
> On Fri, Jan 7, 2022 at 4:06 PM Neil Armstrong <narmstrong@baylibre.com> wrote:
> [...]
>> +#define HHI_MIPI_CNTL2 0x08
>> +#define HHI_MIPI_CNTL2_DIF_TX_CTL1 GENMASK(31, 16)
>> +#define HHI_MIPI_CNTL2_CH_EN GENMASK(15, 11)
>> +#define HHI_MIPI_CNTL2_DIF_TX_CTL0 GENMASK(10, 0)
>> +
>> +#define DSI_LANE_0 BIT(4)
>> +#define DSI_LANE_1 BIT(3)
>> +#define DSI_LANE_CLK BIT(2)
>> +#define DSI_LANE_2 BIT(1)
>> +#define DSI_LANE_3 BIT(0)
> At first I thought that these should be named
> HHI_MIPI_CNTL2_DSI_LANE_0 (and similar).
> But then I understood that they aren't bits directly in HHI_MIPI_CNTL2
> but they belong to HHI_MIPI_CNTL2_CH_EN.
> Have you considered naming them for example
> HHI_MIPI_CNTL2_CH_EN_DSI_LANE_0 to make this more clear?
>
> [...]
>> + if (IS_ERR(map)) {
>> + dev_err(dev,
>> + "failed to get HHI regmap\n");
>> + return PTR_ERR(map);
> I suggest using:
> return dev_err_probe(dev, PTR_ERR(map), "failed to get HHI regmap\n");
> to simplify the code
>
> [...]
>> + if (IS_ERR(priv->phy)) {
>> + ret = PTR_ERR(priv->phy);
>> + if (ret != -EPROBE_DEFER)
>> + dev_err(dev, "failed to create PHY\n");
>> + return ret;
> and similar here:
> return dev_err_probe(dev, PTR_ERR(priv->phy), "failed to create PHY\n");
>
> [...]
>> +static const struct of_device_id phy_g12a_mipi_dphy_analog_of_match[] = {
>> + {
>> + .compatible = "amlogic,g12a-mipi-dphy-analog",
>> + },
>> + { },
> In the past I was suggested to use:
> { /* sentinel */ }
> meaning: no trailing comma here so nobody can add entries after the
> sentinel by accident.
> I suggest doing the same here if you re-spin this series.
Yep, will do the changes,
Thanks,
Neil
>
>
> Thank you!
> Martin
>
prev parent reply other threads:[~2022-01-10 13:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-07 15:05 [PATCH v3 0/2] phy: amlogic: Add support for the G12A Analog MIPI D-PHY Neil Armstrong
2022-01-07 15:05 ` [PATCH v3 1/2] dt-bindings: phy: add Amlogic G12A Analog MIPI D-PHY bindings Neil Armstrong
2022-01-07 22:13 ` Martin Blumenstingl
2022-01-10 9:25 ` Neil Armstrong
2022-01-10 22:18 ` Martin Blumenstingl
2022-01-07 15:05 ` [PATCH v3 2/2] phy: amlogic: Add G12A Analog MIPI D-PHY driver Neil Armstrong
2022-01-07 22:09 ` Martin Blumenstingl
2022-01-10 13:01 ` Neil Armstrong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3f7f1c95-8a16-cb74-3a99-3f67404424db@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=kishon@ti.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).