Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1711317

Re: [PATCH v2 16/18] hwmon: add support for sensors exported via ARM SCMI

From Guenter Roeck <linux@roeck-us.net>
Newsgroups linux.kernel
Subject Re: [PATCH v2 16/18] hwmon: add support for sensors exported via ARM SCMI
Date 2017-08-14 20:10 +0200
Message-ID <uerYm-7s4-13@gated-at.bofh.it> (permalink)
References <uaLVD-8da-5@gated-at.bofh.it> <uaLVE-8da-15@gated-at.bofh.it> <uaQBY-2MF-5@gated-at.bofh.it> <ubPkv-87B-49@gated-at.bofh.it> <uepa9-5HJ-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Aug 14, 2017 at 04:09:18PM +0100, Sudeep Holla wrote:
> Hi Guenter,
> 
> On 07/08/17 13:25, Sudeep Holla wrote:
> > 
> > 
> > On 04/08/17 20:32, Guenter Roeck wrote:
> >> On Fri, Aug 04, 2017 at 03:31:42PM +0100, Sudeep Holla wrote:
> > 
> > [...]
> > 
> >>> +	platform_set_drvdata(pdev, scmi_sensors);
> >>> +
> >>> +	hwdev = devm_hwmon_device_register_with_groups(dev, "scmi_sensors",
> >>> +						       scmi_sensors,
> >>> +						       scmi_sensors->groups);
> >>
> >> Can you rework this to use devm_hwmon_device_register_with_info(),
> >> and if possible let it handle the thermal registration ? 
> >>
> > 
> > Thanks for the pointers. I will check on the possibility and use it if
> > possible.
> > 
> 
> I had a look at devm_hwmon_device_register_with_info. It mostly deals
> with constant structures where all the attributes are known at the boot
> time. In case of SCMI, the firmware presents all the sensors and all the
> information(type, scale, name/label, ...etc). Unless I create those
> structures dynamically and typecast as const during probe, I can't get
> it working. Are you OK with that ? If so, I can try making those changes.
> 

Yes, please.

What operations exactly fail, though ? The idea was that the structures
are not modified by the infrastructure code, not that they must be constant
in the driver. Maybe some of the structure definitions are simply wrong. 

Thanks,
Guenter

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 16/18] hwmon: add support for sensors exported via ARM  SCMI Sudeep Holla <sudeep.holla@arm.com> - 2017-08-14 17:10 +0200
  Re: [PATCH v2 16/18] hwmon: add support for sensors exported via ARM  SCMI Guenter Roeck <linux@roeck-us.net> - 2017-08-14 20:10 +0200

csiph-web