diff mbox series

[net-next,9/9] ptp: ocp: Add .getmaxphase ptp_clock_info callback

Message ID 20230510205306.136766-10-rrameshbabu@nvidia.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series ptp .adjphase cleanups | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/cc_maintainers warning 2 maintainers not CCed: vadfed@fb.com jonathan.lemon@gmail.com
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 19 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Rahul Rameshbabu May 10, 2023, 8:53 p.m. UTC
Add a function that advertises a maximum offset of zero supported by
ptp_clock_info .adjphase in the OCP null ptp implementation.

Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Jonathan Lemon <jonathan.lemon@gmail.com>
Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
---
 drivers/ptp/ptp_ocp.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Vadim Fedorenko May 11, 2023, 11:12 a.m. UTC | #1
On 10/05/2023 21:53, Rahul Rameshbabu wrote:
> Add a function that advertises a maximum offset of zero supported by
> ptp_clock_info .adjphase in the OCP null ptp implementation.
>
> Cc: Richard Cochran <richardcochran@gmail.com> > Cc: Jonathan Lemon <jonathan.lemon@gmail.com>

Neither Jonathan, nor myself are in the actual Cc list.

> Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
> ---
>   drivers/ptp/ptp_ocp.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
> index ab8cab4d1560..20a974ced8d6 100644
> --- a/drivers/ptp/ptp_ocp.c
> +++ b/drivers/ptp/ptp_ocp.c
> @@ -1124,6 +1124,12 @@ ptp_ocp_null_adjfine(struct ptp_clock_info *ptp_info, long scaled_ppm)
>   	return -EOPNOTSUPP;
>   }
>   
> +static s32
> +ptp_ocp_null_getmaxphase(struct ptp_clock_info *ptp_info)
> +{
> +	return 0;
> +}
> +
>   static int
>   ptp_ocp_null_adjphase(struct ptp_clock_info *ptp_info, s32 phase_ns)
>   {
> @@ -1239,6 +1245,7 @@ static const struct ptp_clock_info ptp_ocp_clock_info = {
>   	.adjtime	= ptp_ocp_adjtime,
>   	.adjfine	= ptp_ocp_null_adjfine,
>   	.adjphase	= ptp_ocp_null_adjphase,
> +	.getmaxphase	= ptp_ocp_null_getmaxphase,
>   	.enable		= ptp_ocp_enable,
>   	.verify		= ptp_ocp_verify,
>   	.pps		= true,

Acked-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Rahul Rameshbabu May 11, 2023, 8:35 p.m. UTC | #2
On Thu, 11 May, 2023 12:12:20 +0100 Vadim Fedorenko <vadim.fedorenko@linux.dev> wrote:
> On 10/05/2023 21:53, Rahul Rameshbabu wrote:
>> Add a function that advertises a maximum offset of zero supported by
>> ptp_clock_info .adjphase in the OCP null ptp implementation.
>>
>> Cc: Richard Cochran <richardcochran@gmail.com> > Cc: Jonathan Lemon <jonathan.lemon@gmail.com>
>
> Neither Jonathan, nor myself are in the actual Cc list.
>

Accidentally had --suppress-cc in the invocation when this patch series
was sent and figured it would not be worth a RESEND since a v2 would
likely be needed. Will check that the v2 properly has the needed CCs for
each patch in the series.

-- Rahul Rameshbabu
diff mbox series

Patch

diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
index ab8cab4d1560..20a974ced8d6 100644
--- a/drivers/ptp/ptp_ocp.c
+++ b/drivers/ptp/ptp_ocp.c
@@ -1124,6 +1124,12 @@  ptp_ocp_null_adjfine(struct ptp_clock_info *ptp_info, long scaled_ppm)
 	return -EOPNOTSUPP;
 }
 
+static s32
+ptp_ocp_null_getmaxphase(struct ptp_clock_info *ptp_info)
+{
+	return 0;
+}
+
 static int
 ptp_ocp_null_adjphase(struct ptp_clock_info *ptp_info, s32 phase_ns)
 {
@@ -1239,6 +1245,7 @@  static const struct ptp_clock_info ptp_ocp_clock_info = {
 	.adjtime	= ptp_ocp_adjtime,
 	.adjfine	= ptp_ocp_null_adjfine,
 	.adjphase	= ptp_ocp_null_adjphase,
+	.getmaxphase	= ptp_ocp_null_getmaxphase,
 	.enable		= ptp_ocp_enable,
 	.verify		= ptp_ocp_verify,
 	.pps		= true,