linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: shawnguo@kernel.org
Cc: marex@denx.de, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, conor+dt@kernel.org,
	bhelgaas@google.com, Fabio Estevam <festevam@denx.de>
Subject: [PATCH v6 5/5] soc: imx: imx6sx-gpr: Introduce a GPR driver
Date: Mon, 22 May 2023 17:14:04 -0300	[thread overview]
Message-ID: <20230522201404.660242-5-festevam@gmail.com> (raw)
In-Reply-To: <20230522201404.660242-1-festevam@gmail.com>

From: Fabio Estevam <festevam@denx.de>

The motivation for this imx6sx-gpr driver is to allow describing
the LVDS LDB bridge as a GPR subnode.

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
Changes since v5:
- None.

 drivers/soc/imx/Makefile     |  1 +
 drivers/soc/imx/imx6sx-gpr.c | 29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 drivers/soc/imx/imx6sx-gpr.c

diff --git a/drivers/soc/imx/Makefile b/drivers/soc/imx/Makefile
index a28c44a1f16a..9840d4c41015 100644
--- a/drivers/soc/imx/Makefile
+++ b/drivers/soc/imx/Makefile
@@ -4,6 +4,7 @@ obj-$(CONFIG_ARCH_MXC) += soc-imx.o
 endif
 obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
 obj-$(CONFIG_IMX_GPCV2_PM_DOMAINS) += gpcv2.o
+obj-$(CONFIG_SOC_IMX6SX) += imx6sx-gpr.o
 obj-$(CONFIG_SOC_IMX8M) += soc-imx8m.o
 obj-$(CONFIG_IMX8M_BLK_CTRL) += imx8m-blk-ctrl.o
 obj-$(CONFIG_IMX8M_BLK_CTRL) += imx8mp-blk-ctrl.o
diff --git a/drivers/soc/imx/imx6sx-gpr.c b/drivers/soc/imx/imx6sx-gpr.c
new file mode 100644
index 000000000000..7684acbe43ff
--- /dev/null
+++ b/drivers/soc/imx/imx6sx-gpr.c
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/module.h>
+#include <linux/of_platform.h>
+#include <linux/platform_device.h>
+
+static int imx6sx_gpr_probe(struct platform_device *pdev)
+{
+	return devm_of_platform_populate(&pdev->dev);
+}
+
+static const struct of_device_id imx6sx_gpr_ids[] = {
+	{ .compatible = "fsl,imx6sx-iomuxc-gpr" },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, imx6sx_gpr_ids);
+
+static struct platform_driver imx6sx_gpr_driver = {
+	.driver = {
+		.name	= "imx6sx_gpr",
+		.of_match_table = imx6sx_gpr_ids,
+	},
+	.probe = imx6sx_gpr_probe,
+};
+module_platform_driver(imx6sx_gpr_driver);
+
+MODULE_AUTHOR("Fabio Estevam <festevam@denx.de>");
+MODULE_DESCRIPTION("NXP i.MX6SX GPR driver");
+MODULE_LICENSE("GPL");
-- 
2.34.1


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

  parent reply	other threads:[~2023-05-22 20:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-22 20:14 [PATCH v6 1/5] PCI: imx6: Use a more specific i.MX6SX GPR compatible Fabio Estevam
2023-05-22 20:14 ` [PATCH v6 2/5] dt-bindings: display: bridge: ldb: Adjust imx6sx entries Fabio Estevam
2023-05-22 22:06   ` Conor Dooley
2023-05-23  2:27   ` Marek Vasut
2023-05-22 20:14 ` [PATCH v6 3/5] dt-bindings: soc: Add i.MX6SX General Purpose Register Fabio Estevam
2023-05-22 21:32   ` Rob Herring
2023-05-22 21:53     ` Fabio Estevam
2023-06-07 20:31       ` Rob Herring
2023-06-07 21:07         ` Fabio Estevam
2023-05-22 22:10   ` Conor Dooley
2023-05-23  2:28   ` Marek Vasut
2023-05-22 20:14 ` [PATCH v6 4/5] ARM: dts: imx6sx: Add LDB support Fabio Estevam
2023-05-23  2:29   ` Marek Vasut
2023-05-23 11:34     ` Fabio Estevam
2023-05-23 12:56       ` Marek Vasut
2023-05-22 20:14 ` Fabio Estevam [this message]
2023-05-23  2:30   ` [PATCH v6 5/5] soc: imx: imx6sx-gpr: Introduce a GPR driver Marek Vasut
2023-05-23 11:44     ` Fabio Estevam
2023-05-23 12:57       ` Marek Vasut
2023-05-23 21:13         ` Fabio Estevam
2023-05-23 23:30           ` Marek Vasut
2023-05-23 23:41             ` Fabio Estevam
2023-05-23  2:27 ` [PATCH v6 1/5] PCI: imx6: Use a more specific i.MX6SX GPR compatible Marek Vasut

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=20230522201404.660242-5-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@denx.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=marex@denx.de \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@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;
as well as URLs for NNTP newsgroup(s).