public inbox for linux-amlogic@lists.infradead.org
 help / color / mirror / Atom feed
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 v4 2/2] phy: amlogic: Add G12A Analog MIPI D-PHY driver
Date: Tue, 5 Jul 2022 09:20:11 +0200	[thread overview]
Message-ID: <58efe130-921d-3794-6399-eaf534002069@baylibre.com> (raw)
In-Reply-To: <CAFBinCCcx_pG7rsMMGsoOOZC6E0-+qiWY3HPQTizMsDWm9wBnw@mail.gmail.com>

On 27/06/2022 00:21, Martin Blumenstingl wrote:
> Hi Neil,
> 
> On Thu, Jun 16, 2022 at 3:39 PM Neil Armstrong <narmstrong@baylibre.com> wrote:
>>
>> The Amlogic G12A SoCs embeds an Analog MIPI D-PHY used to communicate with DSI
>> panels.
>>
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>> ---
>>   drivers/phy/amlogic/Kconfig                   |  12 ++
>>   drivers/phy/amlogic/Makefile                  |   1 +
>>   .../amlogic/phy-meson-g12a-mipi-dphy-analog.c | 177 ++++++++++++++++++
>>   3 files changed, 190 insertions(+)
>>   create mode 100644 drivers/phy/amlogic/phy-meson-g12a-mipi-dphy-analog.c
>>
>> diff --git a/drivers/phy/amlogic/Kconfig b/drivers/phy/amlogic/Kconfig
>> index 486ca23aba32..e4d1170efd54 100644
>> --- a/drivers/phy/amlogic/Kconfig
>> +++ b/drivers/phy/amlogic/Kconfig
>> @@ -59,6 +59,18 @@ config PHY_MESON_G12A_USB3_PCIE
>>            in Meson G12A SoCs.
>>            If unsure, say N.
>>
>> +config PHY_MESON_G12A_MIPI_DPHY_ANALOG
>> +       tristate "Meson G12A MIPI Analog DPHY driver"
>> +       default ARCH_MESON
>> +       depends on OF && (ARCH_MESON || COMPILE_TEST)
>> +       select GENERIC_PHY
>> +       select REGMAP_MMIO
> I think this should be "select MFD_SYSCON" as we're not using
> REGMAP_MMIO directly
> 
> [...]
>> +       /* Get the hhi system controller node */
>> +       map = syscon_node_to_regmap(of_get_parent(dev->of_node));
> I just reviewed a patch that adds of_node_put() for the node returned
> by of_get_parent() (after (syscon_node_to_regmap() has been used).
> I think we need the same here
> 
>> +       if (IS_ERR(map)) {
>> +               dev_err(dev,
>> +                       "failed to get HHI regmap\n");
>> +               return PTR_ERR(map);
> to simplify we can use:
>      return dev_err_probe(dev, PTR_ERR(map), "failed to get HHI regmap\n");
> doesn't make much difference for this one though, but...
> 
> [...]
>> +       priv->phy = devm_phy_create(dev, np, &phy_g12a_mipi_dphy_analog_ops);
>> +       if (IS_ERR(priv->phy)) {
>> +               ret = PTR_ERR(priv->phy);
>> +               if (ret != -EPROBE_DEFER)
>> +                       dev_err(dev, "failed to create PHY\n");
>> +               return ret;
> here dev_err_probe() would simplify the code a lot
> 
> [...]
>> +static const struct of_device_id phy_g12a_mipi_dphy_analog_of_match[] = {
>> +       {
>> +               .compatible = "amlogic,g12a-mipi-dphy-analog",
>> +       },
>> +       { /* sentinel */ },
> super nit-pick: no comma here
> 
> 
> Best regards,
> Martin

Thanks,
will fix all that.

Neil


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2022-07-05  7:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16 13:38 [PATCH v4 0/2] phy: amlogic: Add support for the G12A Analog MIPI D-PHY Neil Armstrong
2022-06-16 13:38 ` [PATCH v4 1/2] dt-bindings: phy: add Amlogic G12A Analog MIPI D-PHY bindings Neil Armstrong
2022-06-27 22:28   ` Rob Herring
2022-06-16 13:38 ` [PATCH v4 2/2] phy: amlogic: Add G12A Analog MIPI D-PHY driver Neil Armstrong
2022-06-26 22:21   ` Martin Blumenstingl
2022-07-05  7:20     ` Neil Armstrong [this message]
2022-07-05  6:44   ` Vinod Koul
2022-07-05  7:19     ` Neil Armstrong

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=58efe130-921d-3794-6399-eaf534002069@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