[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140725093036.GB2865@e104805>
Date: Fri, 25 Jul 2014 10:30:36 +0100
From: "Javi Merino" <javi.merino@....com>
To: Laxman Dewangan <ldewangan@...dia.com>
Cc: "rui.zhang@...el.com" <rui.zhang@...el.com>,
Eduardo Valentin <edubezval@...il.com>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH-REPOST] thermal: of: look for sensor driver parent node
if device node missing
[Fixed Eduardo's email *again*]
On Fri, Jul 25, 2014 at 10:19:31AM +0100, Laxman Dewangan wrote:
> There are some mfd devices which supports junction thermal interrupt
> like ams,AS3722. The DT binding of these devices are defined as the
> flat and drivers for sub module of such devices are registered as
> the mfd_add_devices. In this method, the sub devices registered as
> platform driver and these do not have the of_node pointer on their
> device structure. In this case, use the parent of_node pointer to
> get the required of_node pointer.
>
> Signed-off-by: Laxman Dewangan <ldewangan@...dia.com>
> ---
> I typed differnet email ID for Eduardo and so it did not reach to him.
> Resending the patch with correct ID.
>
> drivers/thermal/of-thermal.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
> index 04b1be7..85a7d71 100644
> --- a/drivers/thermal/of-thermal.c
> +++ b/drivers/thermal/of-thermal.c
> @@ -396,6 +396,8 @@ thermal_zone_of_sensor_register(struct device *dev, int sensor_id,
> return ERR_PTR(-EINVAL);
>
> sensor_np = dev->of_node;
> + if (!sensor_np && dev->parent)
> + sensor_np = dev->parent->of_node;
>
> for_each_child_of_node(np, child) {
> struct of_phandle_args sensor_specs;
> --
> 1.8.1.5
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists