From: "Lucien.Jheng" <lucienx123@gmail.com>
To: Daniel Golle <daniel@makrotopia.org>
Cc: linux-clk@vger.kernel.org, andrew@lunn.ch, hkallweit1@gmail.com,
linux@armlinux.org.uk, kuba@kernel.org, davem@davemloft.net,
edumazet@google.com, pabeni@redhat.com, ericwouds@gmail.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
joseph.lin@airoha.com, wenshin.chung@airoha.com,
lucien.jheng@airoha.com
Subject: Re: [PATCH v5 net-next PATCH 1/1] net: phy: air_en8811h: Add clk provider for CKO pin
Date: Tue, 18 Mar 2025 22:39:46 +0800 [thread overview]
Message-ID: <0aa1cebd-be6e-478f-8fb2-8a9072249bd2@gmail.com> (raw)
In-Reply-To: <Z9l6rWJkE2ALmfzM@makrotopia.org>
Hi Daniel
I'll correct those things in the next version,
thank you for the detailed review.
Daniel Golle 於 2025/3/18 下午 09:52 寫道:
> On Tue, Mar 18, 2025 at 09:31:05PM +0800, Lucien.Jheng wrote:
>> EN8811H outputs 25MHz or 50MHz clocks on CKO, selected by GPIO3.
>> CKO clock operates continuously from power-up through md32 loading.
>> Implement clk provider driver so we can disable the clock output in case
>> it isn't needed, which also helps to reduce EMF noise
>>
>> Signed-off-by: Lucien.Jheng <lucienX123@gmail.com>
> White-space (tabs vs. spaces) could still be improved. See inline below.
> However, I don't think it's worth another iteration just for that, so
> only should there be comments from other reviewers and you anyway send
> another version, then you can fix that as well.
>
> Other than that:
> Reviewed-by: Daniel Golle <daniel@makrotopia.org>
>
>> ---
>> drivers/net/phy/air_en8811h.c | 95 +++++++++++++++++++++++++++++++++++
>> 1 file changed, 95 insertions(+)
>>
>> diff --git a/drivers/net/phy/air_en8811h.c b/drivers/net/phy/air_en8811h.c
>> index e9fd24cb7270..47ace7fac1d3 100644
>> --- a/drivers/net/phy/air_en8811h.c
>> +++ b/drivers/net/phy/air_en8811h.c
>> @@ -16,6 +16,7 @@
>> #include <linux/property.h>
>> #include <linux/wordpart.h>
>> #include <linux/unaligned.h>
>> +#include <linux/clk-provider.h>
>>
>> #define EN8811H_PHY_ID 0x03a2a411
>>
>> @@ -112,6 +113,11 @@
>> #define EN8811H_POLARITY_TX_NORMAL BIT(0)
>> #define EN8811H_POLARITY_RX_REVERSE BIT(1)
>>
>> +#define EN8811H_CLK_CGM 0xcf958
>> +#define EN8811H_CLK_CGM_CKO BIT(26)
>> +#define EN8811H_HWTRAP1 0xcf914
>> +#define EN8811H_HWTRAP1_CKO BIT(12)
>> +
> Existing precompiler macro definitions use tab characters between the
> macro name and the assigned value, your newly added ones use spaces.
>
>> #define EN8811H_GPIO_OUTPUT 0xcf8b8
>> #define EN8811H_GPIO_OUTPUT_345 (BIT(3) | BIT(4) | BIT(5))
>>
>> @@ -142,10 +148,15 @@ struct led {
>> unsigned long state;
>> };
>>
>> +#define clk_hw_to_en8811h_priv(_hw) \
>> + container_of(_hw, struct en8811h_priv, hw)
>> +
>> struct en8811h_priv {
>> u32 firmware_version;
>> bool mcu_needs_restart;
>> struct led led[EN8811H_LED_COUNT];
>> + struct clk_hw hw;
>> + struct phy_device *phydev;
> The existing struct members are indented with tabs, your newly added
> members use spaces. Not a big deal, but it'd be better to use the same
> style.
prev parent reply other threads:[~2025-03-18 14:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 13:31 [PATCH v5 net-next 0/1 ] net: phy: air_en8811h: Add clk provider for CKO pin Lucien.Jheng
2025-03-18 13:31 ` [PATCH v5 net-next PATCH 1/1] " Lucien.Jheng
2025-03-18 13:52 ` Daniel Golle
2025-03-18 14:39 ` Lucien.Jheng [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=0aa1cebd-be6e-478f-8fb2-8a9072249bd2@gmail.com \
--to=lucienx123@gmail.com \
--cc=andrew@lunn.ch \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ericwouds@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=joseph.lin@airoha.com \
--cc=kuba@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lucien.jheng@airoha.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wenshin.chung@airoha.com \
/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).