From: Zhang Rui <rui.zhang@intel.com>
To: Eric Anholt <eric@anholt.net>,
kernel@martin.sperl.org, Eduardo Valentin <edubezval@gmail.com>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Lee Jones <lee@kernel.org>, Russell King <linux@arm.linux.org.uk>,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH V3 2/5] thermal: bcm2835: add thermal driver for bcm2835 soc
Date: Sun, 21 Aug 2016 21:37:29 +0800 [thread overview]
Message-ID: <1471786649.2188.4.camel@intel.com> (raw)
In-Reply-To: <87inuwd1p4.fsf@eliezer.anholt.net>
On 五, 2016-08-19 at 11:59 -0700, Eric Anholt wrote:
> Zhang Rui <rui.zhang@intel.com> writes:
>
> >
> > On 四, 2016-08-18 at 11:39 -0700, Eric Anholt wrote:
> > >
> > > Eric Anholt <eric@anholt.net> writes:
> > >
> > > >
> > > >
> > > > kernel@martin.sperl.org writes:
> > > >
> > > > >
> > > > >
> > > > > From: Martin Sperl <kernel@martin.sperl.org>
> > > > >
> > > > > Add basic thermal driver for bcm2835 SOC.
> > > > >
> > > > > This driver currently relies on the firmware setting up the
> > > > > tsense HW block and does not set it up itself.
> > > > >
> > > > > Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
> > > > >
> > > > > ChangeLog:
> > > > > V1 -> V2: added specific settings depending on compatiblity
> > > > > added trip point based on register
> > > > > setting up ctrl-register if HW is not enabled by
> > > > > firmware
> > > > > as per recommendation of Eric (untested)
> > > > > check that clock frequency is in range
> > > > > (1.9 - 5MHz - as per comment in clk-bcm2835.c)
> > > > > ---
> > > > >
> > > > > diff --git a/drivers/thermal/bcm/Makefile
> > > > > b/drivers/thermal/bcm/Makefile
> > > > > new file mode 100644
> > > > > index 0000000..13456d2
> > > > > --- /dev/null
> > > > > +++ b/drivers/thermal/bcm/Makefile
> > > > > @@ -0,0 +1 @@
> > > > > +obj-$(CONFIG_BCM2835_THERMAL) :=
> > > > > bcm2835_thermal.o
> > > > > diff --git a/drivers/thermal/bcm/bcm2835_thermal.c
> > > > > b/drivers/thermal/bcm/bcm2835_thermal.c
> > > > > new file mode 100644
> > > > > index 0000000..73138cb
> > > > > --- /dev/null
> > > > > +++ b/drivers/thermal/bcm/bcm2835_thermal.c
> > > > >
> > > > > +static const struct of_device_id
> > > > > bcm2835_thermal_of_match_table[];
> > > > > +static int bcm2835_thermal_probe(struct platform_device
> > > > > *pdev)
> > > > > +{
> > > > >
> > > > > + /* enable clock and check rate */
> > > > > + clk_prepare_enable(data->clk);
> > > > > + rate = clk_get_rate(data->clk);
> > > > > + if ((rate < 1920000) || (rate > 5000000)) {
> > > > > + dev_warn(&pdev->dev,
> > > > > + "Clock %pCn is running at %pCr Hz,
> > > > > which is outside the recommended range of 1.9 to 5.0 MHz\n",
> > > > > + data->clk, data->clk);
> > > > > + }
> > > > > +
> > > > > + /* register it */
> > > > > + tz = thermal_zone_device_register("bcm2835_thermal",
> > > > > + 1, 0, data,
> > > > > + &bcm2835_thermal_o
> > > > > ps,
> > > > > + NULL, 0, 0);
> > > > I notice that the polling_delay is set to 0, but we're not
> > > > using
> > > > interrupts to trigger the trip. Is it valid to expose a trip
> > > > without a
> > > > polling_delay or interrupts? Should passive_delay be set as
> > > > well?
> > > >
> > > > This is up to the thermal maintainers. As far as I'm
> > > > concerned,
> > > > it's:
> > > >
> > > > Acked-by: Eric Anholt <eric@anholt.net>
> > > >
> > > > One it lands I'll pull the defconfig and DT bits.
> > > Ping on this question to thermal maintainers. I'd still love to
> > > see
> > > this driver land.
> > hmmm, how is this driver supposed to work?
> > With this patch set, I think the only benefit is that we can get
> > the
> > temperature and trip point information via thermal sysfs interface,
> > but
> > kernel thermal control is a no-op here, right?
> Yeah. It seems useful to be able to get the information. Once we
> land
> this, I hope someone can add interrupt support so that there are
> actual
> trip points.
sounds reasonable to me.
Another question, why you need a separate directory for a single
file, bcm2835_thermal.c?
thanks,
rui
next prev parent reply other threads:[~2016-08-21 13:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-17 14:35 [PATCH V3 0/5] bcm2835: add thermal driver kernel
2016-05-17 14:35 ` [PATCH V3 1/5] dt: bindings: add thermal device driver for bcm2835 kernel
2016-05-17 14:35 ` [PATCH V3 2/5] thermal: bcm2835: add thermal driver for bcm2835 soc kernel
[not found] ` <1463495753-967-3-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2016-05-31 19:52 ` Eric Anholt
2016-08-18 18:39 ` Eric Anholt
2016-08-19 7:28 ` Zhang Rui
[not found] ` <1471591694.2691.39.camel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-08-19 18:59 ` Eric Anholt
2016-08-21 13:37 ` Zhang Rui [this message]
2016-08-21 14:04 ` Zhang Rui
2016-08-21 17:21 ` Martin Sperl
2016-08-22 7:45 ` Zhang Rui
[not found] ` <1463495753-967-1-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2016-05-17 14:35 ` [PATCH V3 3/5] ARM: bcm2835: add thermal node to device-tree of bcm283x kernel-TqfNSX0MhmxHKSADF0wUEw
2016-05-17 14:35 ` [PATCH V3 4/5] ARM: bcm2835: add thermal driver to default_config kernel
2016-05-17 14:35 ` [PATCH V3 5/5] ARM: multi_v7_defconfig: bcm2835: add bcm2835-thermal driver kernel
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=1471786649.2188.4.camel@intel.com \
--to=rui.zhang@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=edubezval@gmail.com \
--cc=eric@anholt.net \
--cc=kernel@martin.sperl.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=swarren@wwwdotorg.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).