devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: update the binding to reflect data cells
@ 2018-01-25  7:37 Dong Aisheng
  2018-01-25  7:37 ` [PATCH 2/2] nvmem: imx-ocotp: remove unused dead code Dong Aisheng
       [not found] ` <1516865849-26191-1-git-send-email-aisheng.dong-3arQi8VN3Tc@public.gmane.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Dong Aisheng @ 2018-01-25  7:37 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: linux-arm-kernel, linux-imx, Dong Aisheng, Srinivas Kandagatla,
	Rob Herring, Mark Rutland, Shawn Guo

imx-ocotp is implemented based on nvmem which can have data cells
as child node. Update the binding doc to reflect it to be more easily
understood by users.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
 .../devicetree/bindings/nvmem/imx-ocotp.txt        | 23 ++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
index f162c72..729f674 100644
--- a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
+++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
@@ -11,17 +11,32 @@ Required properties:
 	"fsl,imx6ul-ocotp" (i.MX6UL),
 	"fsl,imx7d-ocotp" (i.MX7D/S),
 	followed by "syscon".
+- #address-cells : Should be 1
+- #size-cells : Should be 1
 - reg: Should contain the register base and length.
 - clocks: Should contain a phandle pointing to the gated peripheral clock.
 
 Optional properties:
 - read-only: disable write access
 
-Example:
+Optional Child nodes:
+
+- Data cells of ocotp:
+  Detailed bindings are described in bindings/nvmem/nvmem.txt
 
+Example:
 	ocotp: ocotp@21bc000 {
-		compatible = "fsl,imx6q-ocotp", "syscon";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "fsl,imx6sx-ocotp", "syscon";
 		reg = <0x021bc000 0x4000>;
-		clocks = <&clks IMX6QDL_CLK_IIM>;
-		read-only;
+		clocks = <&clks IMX6SX_CLK_OCOTP>;
+
+		tempmon_calib: calib@38 {
+			reg = <0x38 4>;
+		};
+
+		tempmon_temp_grade: temp-grade@20 {
+			reg = <0x20 4>;
+		};
 	};
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] nvmem: imx-ocotp: remove unused dead code
  2018-01-25  7:37 [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: update the binding to reflect data cells Dong Aisheng
@ 2018-01-25  7:37 ` Dong Aisheng
       [not found] ` <1516865849-26191-1-git-send-email-aisheng.dong-3arQi8VN3Tc@public.gmane.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Dong Aisheng @ 2018-01-25  7:37 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: linux-arm-kernel, linux-imx, Dong Aisheng, Srinivas Kandagatla,
	Shawn Guo

remove unused dead code

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
 drivers/nvmem/imx-ocotp.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index d7ba351..4f61fbd 100644
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
@@ -439,7 +439,6 @@ MODULE_DEVICE_TABLE(of, imx_ocotp_dt_ids);
 
 static int imx_ocotp_probe(struct platform_device *pdev)
 {
-	const struct of_device_id *of_id;
 	struct device *dev = &pdev->dev;
 	struct resource *res;
 	struct ocotp_priv *priv;
@@ -460,7 +459,6 @@ static int imx_ocotp_probe(struct platform_device *pdev)
 	if (IS_ERR(priv->clk))
 		return PTR_ERR(priv->clk);
 
-	of_id = of_match_device(imx_ocotp_dt_ids, dev);
 	priv->params = of_device_get_match_data(&pdev->dev);
 	imx_ocotp_nvmem_config.size = 4 * priv->params->nregs;
 	imx_ocotp_nvmem_config.dev = dev;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: update the binding to reflect data cells
       [not found] ` <1516865849-26191-1-git-send-email-aisheng.dong-3arQi8VN3Tc@public.gmane.org>
@ 2018-01-29  1:49   ` Shawn Guo
  2018-02-05  6:06   ` Rob Herring
  1 sibling, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2018-01-29  1:49 UTC (permalink / raw)
  To: Dong Aisheng
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-imx-3arQi8VN3Tc, Srinivas Kandagatla, Rob Herring,
	Mark Rutland

On Thu, Jan 25, 2018 at 03:37:28PM +0800, Dong Aisheng wrote:
> imx-ocotp is implemented based on nvmem which can have data cells
> as child node. Update the binding doc to reflect it to be more easily
> understood by users.
> 
> Cc: Srinivas Kandagatla <srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
> Cc: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

For both patches,

Acked-by: Shawn Guo <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

> Signed-off-by: Dong Aisheng <aisheng.dong-3arQi8VN3Tc@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: update the binding to reflect data cells
       [not found] ` <1516865849-26191-1-git-send-email-aisheng.dong-3arQi8VN3Tc@public.gmane.org>
  2018-01-29  1:49   ` [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: update the binding to reflect data cells Shawn Guo
@ 2018-02-05  6:06   ` Rob Herring
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2018-02-05  6:06 UTC (permalink / raw)
  To: Dong Aisheng
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-imx-3arQi8VN3Tc, Srinivas Kandagatla, Mark Rutland,
	Shawn Guo

On Thu, Jan 25, 2018 at 03:37:28PM +0800, Dong Aisheng wrote:
> imx-ocotp is implemented based on nvmem which can have data cells
> as child node. Update the binding doc to reflect it to be more easily
> understood by users.
> 
> Cc: Srinivas Kandagatla <srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
> Cc: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Signed-off-by: Dong Aisheng <aisheng.dong-3arQi8VN3Tc@public.gmane.org>
> ---
>  .../devicetree/bindings/nvmem/imx-ocotp.txt        | 23 ++++++++++++++++++----
>  1 file changed, 19 insertions(+), 4 deletions(-)

Reviewed-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-05  6:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-25  7:37 [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: update the binding to reflect data cells Dong Aisheng
2018-01-25  7:37 ` [PATCH 2/2] nvmem: imx-ocotp: remove unused dead code Dong Aisheng
     [not found] ` <1516865849-26191-1-git-send-email-aisheng.dong-3arQi8VN3Tc@public.gmane.org>
2018-01-29  1:49   ` [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: update the binding to reflect data cells Shawn Guo
2018-02-05  6:06   ` Rob Herring

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).