From: Sascha Hauer <s.hauer@pengutronix.de>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 5/6] aiodev: Add TEMPMON driver
Date: Tue, 10 May 2016 08:02:55 +0200 [thread overview]
Message-ID: <20160510060255.GV19714@pengutronix.de> (raw)
In-Reply-To: <1462543770-4619-6-git-send-email-andrew.smirnov@gmail.com>
On Fri, May 06, 2016 at 07:09:29AM -0700, Andrey Smirnov wrote:
> Port TEMPMON driver from U-Boot
>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
> arch/arm/dts/imx6qdl.dtsi | 14 +++
> arch/arm/dts/imx6sx.dtsi | 14 +++
> drivers/aiodev/Kconfig | 8 ++
> drivers/aiodev/Makefile | 1 +
> drivers/aiodev/imx_thermal.c | 239 +++++++++++++++++++++++++++++++++++++++++++
> 5 files changed, 276 insertions(+)
> create mode 100644 drivers/aiodev/imx_thermal.c
>
> diff --git a/arch/arm/dts/imx6qdl.dtsi b/arch/arm/dts/imx6qdl.dtsi
> index 828be9c..0deafbc 100644
> --- a/arch/arm/dts/imx6qdl.dtsi
> +++ b/arch/arm/dts/imx6qdl.dtsi
> @@ -8,3 +8,17 @@
> ipu0 = &ipu1;
> };
> };
> +
> +&ocotp {
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + analog1: ocotp_ana1@34 {
@38?
> + reg = <0x38 0x4>;
> + };
> +};
> +
> +&tempmon {
> + nvmem-cells = <&analog1>;
> + nvmem-cell-names = "ocotp-ana1";
> +};
Why not use the existing binding? The nvmem binding may be better, but I
think we should not introduce new bindings without need.
> + node = of_parse_phandle(dev->device_node, "fsl,tempmon", 0);
> + if (!node) {
> + ret = -EINVAL;
> + dev_err(dev, "Failed to parse fsl,tempmon\n");
> + goto free_calibration_data;
> + }
> +
> + anatop = of_find_device_by_node(node);
> + if (!anatop) {
> + ret = -EINVAL;
> + dev_err(dev, "No device corresponds to fsl,tempmon\n");
> + goto free_calibration_data;
> + }
syscon_base_lookup_by_phandle() instead of
of_parse_phandle()/of_find_device_by_node()?
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2016-05-10 6:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-06 14:09 [PATCH v2 0/6] AIODEV subsystem Andrey Smirnov
2016-05-06 14:09 ` [PATCH v2 1/6] drivers: add nvmem framework from kernel Andrey Smirnov
2016-05-06 14:09 ` [PATCH v2 2/6] ocotp: Register OCOTP with 'nvmem' Andrey Smirnov
2016-05-06 14:09 ` [PATCH v2 3/6] drivers: Introduce AIODEV subsystem Andrey Smirnov
2016-05-06 14:09 ` [PATCH v2 4/6] commands: Add 'hwmon' command Andrey Smirnov
2016-05-06 14:09 ` [PATCH v2 5/6] aiodev: Add TEMPMON driver Andrey Smirnov
2016-05-10 6:02 ` Sascha Hauer [this message]
2016-05-13 15:44 ` Andrey Smirnov
2016-05-06 14:09 ` [PATCH v2 6/6] aiodev: Add basic LM75 temperature driver Andrey Smirnov
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=20160510060255.GV19714@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.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