public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: ALKML <linux-arm-kernel@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	DTML <devicetree@vger.kernel.org>,
	Roy Franz <roy.franz@cavium.com>,
	Harb Abdulhamid <harba@codeaurora.org>,
	Nishanth Menon <nm@ti.com>, Arnd Bergmann <arnd@arndb.de>,
	Loc Ho <lho@apm.com>, Alexey Klimov <alexey.klimov@arm.com>,
	Ryan Harkin <Ryan.Harkin@arm.com>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v2 16/18] hwmon: add support for sensors exported via ARM SCMI
Date: Mon, 14 Aug 2017 11:04:47 -0700	[thread overview]
Message-ID: <20170814180447.GA9577@roeck-us.net> (raw)
In-Reply-To: <c695dc09-fc28-518f-f287-bf74e0a2f87e@arm.com>

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

      reply	other threads:[~2017-08-14 18:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1501857104-11279-1-git-send-email-sudeep.holla@arm.com>
2017-08-04 14:31 ` [PATCH v2 16/18] hwmon: add support for sensors exported via ARM SCMI Sudeep Holla
2017-08-04 19:32   ` Guenter Roeck
2017-08-07 12:25     ` Sudeep Holla
2017-08-14 15:09       ` Sudeep Holla
2017-08-14 18:04         ` Guenter Roeck [this message]

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=20170814180447.GA9577@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=Ryan.Harkin@arm.com \
    --cc=alexey.klimov@arm.com \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=harba@codeaurora.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=lho@apm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=roy.franz@cavium.com \
    --cc=sudeep.holla@arm.com \
    /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