lkml.org 
[lkml]   [2016]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/5 v2] thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal driver
Hi Khiem,

On Tue, Sep 6, 2016 at 2:19 PM, Khiem Nguyen
<khiem.nguyen.xt@renesas.com> wrote:
>> > +static int rcar_gen3_thermal_probe(struct platform_device *pdev) {
>>
>> > + priv->id = of_alias_get_id(dev->of_node, "tsc");
>> > + if (priv->id < 0) {
>> > + dev_err(dev, "Failed to get alias id (%d)\n", priv->id);
>> > + ret = priv->id;
>> > + goto error_unregister;
>> > + }
>>
>> In v1, Morimoto-san wondered whether the alias is really needed, but you haven't
>> addressed his question.
>>
>> While aliases can be useful in DT source files, using aliases like this imposes
>> hardcoded instance numbers, which is something we try to avoid these days.
>> Also, this puts a hard requirement on the presence of the alias in DT, which should
>> be documented in the DT bindings.
>
> OK.
> I prefer updating DT binding to describe alias.
>
> There is requirement about coefficient to calculate temperature,
> and the coefficient value (fixed value) is different among thermal sensors.

From DT, you can still refer to a specific instance using a phandle to a label.
You do not need aliases for that.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

\
 
 \ /
  Last update: 2016-09-17 09:58    [W:0.042 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site