RE: [PATCH 3/3] ptp_qoriq: convert to use module parameters for initialization
From: "Y.b. Lu" <yangbo.lu@nxp.com>
Date: 2018-08-01 04:38:50
Also in:
linux-arm-kernel, linux-devicetree, lkml, netdev
Hi David,
-----Original Message----- From: David Miller [mailto:davem@davemloft.net] Sent: Tuesday, July 31, 2018 12:26 AM To: Y.b. Lu <yangbo.lu@nxp.com> Cc: netdev@vger.kernel.org; Madalin-cristian Bucur [off-list ref]; richardcochran@gmail.com; robh+dt@kernel.org; shawnguo@kernel.org; devicetree@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] ptp_qoriq: convert to use module parameters for initialization =20 From: Yangbo Lu <yangbo.lu@nxp.com> Date: Mon, 30 Jul 2018 18:01:54 +0800 =20quoted
+static unsigned int cksel =3D DEFAULT_CKSEL; module_param(cksel, uint, +0644); MODULE_PARM_DESC(cksel, "Select reference clock"); + +static unsigned int clk_src; +module_param(clk_src, uint, 0644); +MODULE_PARM_DESC(clk_src, "Reference clock frequency (if clocks +property not provided in dts)"); + +static unsigned int tmr_prsc =3D 2; +module_param(tmr_prsc, uint, 0644); +MODULE_PARM_DESC(tmr_prsc, "Output clock division/prescale factor"); + +static unsigned int tmr_fiper1 =3D 1000000000; module_param(tmr_fiper1=
,
quoted
+uint, 0644); MODULE_PARM_DESC(tmr_fiper1, "Desired fixed interval +pulse period (ns)"); + +static unsigned int tmr_fiper2 =3D 100000; module_param(tmr_fiper2, +uint, 0644); MODULE_PARM_DESC(tmr_fiper2, "Desired fixed interval +pulse period (ns)");=20 Sorry, there is no way I am every applying something like this. Module parameters are to be avoided at all costs. =20 And you don't need it here, you have DTS, please use it. =20 You are required to support the existing DTS cases, in order to avoid bre=
aking
things, anyways.
[Y.b. Lu] I get your point. Will drop module_param method. Thanks a lot for your suggestion.