All of lore.kernel.org
 help / color / mirror / Atom feed
From: 'Stephen Boyd' <sboyd@codeaurora.org>
To: Narendran Rajan <nrajan@codeaurora.com>
Cc: 'Srinivas Kandagatla' <srinivas.kandagatla@linaro.org>,
	'Narendran Rajan' <nrajan@codeaurora.org>,
	'Zhang Rui' <rui.zhang@intel.com>,
	'Eduardo Valentin' <edubezval@gmail.com>,
	'Linux ARM MSM' <linux-arm-msm@vger.kernel.org>,
	'Linux PM' <linux-pm@vger.kernel.org>,
	'Siddartha Mohanadoss' <smohanad@codeaurora.org>
Subject: Re: [PATCH] thermal: Add msm tsens thermal sensor driver
Date: Wed, 28 Jan 2015 15:52:40 -0800	[thread overview]
Message-ID: <20150128235240.GA23506@codeaurora.org> (raw)
In-Reply-To: <002f01d03a81$07fabf10$17f03d30$@codeaurora.com>

On 01/27, Narendran Rajan wrote:
> > From: Srinivas Kandagatla [mailto:srinivas.kandagatla@linaro.org]
> > > +struct tsens_device;
> > > +
> > > +struct tsens_sensor {
> > > +	struct thermal_zone_device	*tz_dev;
> > > +	enum thermal_device_mode	mode;
> > > +	unsigned int			sensor_num;
> > > +	int				offset;
> > > +	u32				slope;
> > > +	struct tsens_device		*tmdev;
> > > +	u32                             status;
> > > +};
> > > +
> > > +struct tsens_device {
> > > +	bool			prev_reading_avail;
> > > +	unsigned int		num_sensors;
> > > +	int			pm_tsens_thr_data;
> > > +	int			pm_tsens_cntl;
> > > +	unsigned int            calib_offset;
> > > +	unsigned int            backup_calib_offset;
> > > +	struct work_struct	tsens_work;
> > > +	struct regmap		*map;
> > > +	struct regmap_field	*status_field;
> > > +	struct tsens_sensor	sensor[0];
> > > +};
> > > +
> > > +static struct device *tsens_dev;
> > Hmm.. I think you should remove this global variable and find a better way
> to
> > get hold of this.
> > 
> Didn't find anything simple enough. A few other drivers seems to use global 
> as well. Will look around. If you have some quick tips let me please know.

Why do we even need those dev_dbg() printks? I'd rather see that
debugging stuff get removed and this static singleton removed at
the same time.

> > 
> Correct, in polling mode (which is what exists in thermal framework today),
> HW interrupt 
> do not make sense as the trip points are set to default and never updated
> based on Dt values.
> 
> But the code under the #ifdef THERMAL_TSENS8960_HWTRIPS supports the HW trip
> point mode.
> This code needs the additional patch
> Please see https://patchwork.ozlabs.org/patch/364812/
> 
> May be I will remove everything under HWTRIPs until it lands in the core
> thermal framework?
> 

That patch is half a year old. Is aynyone still working on it?
Perhaps you can pick it up and try to get it into a workable
state and then port this new driver to it?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2015-01-29  1:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27  4:09 [PATCH] thermal: Add msm tsens thermal sensor driver Narendran Rajan
2015-01-27  7:15 ` Srinivas Kandagatla
2015-01-27 22:31   ` Narendran Rajan
2015-01-28 23:52     ` 'Stephen Boyd' [this message]
2015-01-29 22:53       ` Eduardo Valentin
2015-01-30  0:55       ` Narendran Rajan
2015-01-29  6:05     ` Srinivas Kandagatla
2015-01-30  0:52       ` Narendran Rajan
2015-01-27 16:03 ` Lina Iyer
2015-01-28  0:55   ` Narendran Rajan
2015-01-28  1:18     ` Lina Iyer
2015-01-28 17:01 ` Lina Iyer
2015-01-30  1:06   ` Narendran Rajan
2015-01-29  1:46 ` Stephen Boyd
2015-01-30  1:36   ` Narendran Rajan
2015-01-29 22:39 ` Eduardo Valentin
2015-01-30  8:39   ` Ivan T. Ivanov
2015-01-31 18:17     ` Eduardo Valentin
2015-01-29 22:49 ` Eduardo Valentin
2015-01-30  1:42   ` Narendran Rajan
2015-01-31 18:23     ` Eduardo Valentin

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=20150128235240.GA23506@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=edubezval@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nrajan@codeaurora.com \
    --cc=nrajan@codeaurora.org \
    --cc=rui.zhang@intel.com \
    --cc=smohanad@codeaurora.org \
    --cc=srinivas.kandagatla@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.