lkml.org 
[lkml]   [2019]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH V12 3/5] thermal: imx_sc: add i.MX system controller thermal support
Date


> -----Original Message-----
> From: Aisheng Dong
> Sent: Thursday, May 16, 2019 6:40 PM
> To: Anson Huang <anson.huang@nxp.com>; robh+dt@kernel.org;
> mark.rutland@arm.com; shawnguo@kernel.org; s.hauer@pengutronix.de;
> kernel@pengutronix.de; festevam@gmail.com; catalin.marinas@arm.com;
> will.deacon@arm.com; rui.zhang@intel.com; edubezval@gmail.com;
> daniel.lezcano@linaro.org; ulf.hansson@linaro.org; Daniel Baluta
> <daniel.baluta@nxp.com>; Peng Fan <peng.fan@nxp.com>;
> heiko@sntech.de; horms+renesas@verge.net.au; agross@kernel.org;
> olof@lixom.net; bjorn.andersson@linaro.org; jagan@amarulasolutions.com;
> enric.balletbo@collabora.com; marc.w.gonzalez@free.fr;
> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-pm@vger.kernel.org
> Cc: dl-linux-imx <linux-imx@nxp.com>
> Subject: RE: [PATCH V12 3/5] thermal: imx_sc: add i.MX system controller
> thermal support
>
> [...]
>
> > > > + if (!sensor)
> > > > + return -ENOMEM;
> > > > +
> > > > + ret = thermal_zone_of_get_sensor_id(child,
> > > > + &sensor_specs,
> > >
> > > It looks a bit strange why need sensor_specs as you even did not use it.
> >
> > It is because parsing the phandle arguments needs it, such as the
> > thermal_zone_of_sensor_register() function needs this pointer to be
> > passed back to check the elements are valid or NOT, so the API does
> > NOT define it as local structure. The API NOT just return the sensor
> > id, but also the of_phandle_args address, although we do NOT need it at all
> here.
>
> The main problem is this one introduced in 2/5 which needs get ack from
> maintainer.
> For me, I would suggest to make sensor_specs transparent to user if it's
> really not needed by users.
>
> Please try to make it either optional or hide to core users as well.
> And I guess the later one is doable after a glance at the core code.

OK, I will hide it to user if no other different comments.

Anson.

>
> Regards
> Dong Aisheng
\
 
 \ /
  Last update: 2019-05-16 12:47    [W:0.038 / U:5.984 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site