All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Kurtz <djkurtz@chromium.org>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: linux-pm@vger.kernel.org, Zhang Rui <rui.zhang@intel.com>,
	Eduardo Valentin <edubezval@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Sasha Hauer <kernel@pengutronix.de>,
	"moderated list:ARM/Mediatek SoC support" 
	<linux-mediatek@lists.infradead.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	Matthias Brugger <matthias.bgg@gmail.com>
Subject: Re: [PATCH 2/3] thermal: Add Mediatek thermal controller support
Date: Mon, 4 Jan 2016 23:43:48 +0800	[thread overview]
Message-ID: <CAGS+omAHXE15aYcrUzAJ_hN=Fry=uTPk6=P3Cy2xL25j9+WpOQ@mail.gmail.com> (raw)
In-Reply-To: <20160104143129.GJ13058@pengutronix.de>

On Mon, Jan 4, 2016 at 10:31 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Mon, Dec 21, 2015 at 12:07:58PM +0800, Daniel Kurtz wrote:
>> Hi Sascha,
>>
>> One nit below that can be fixed up later, or now if you don't plan to
>> spin this driver to
>> address Eduardo's feedback...
>>
>> On Mon, Nov 30, 2015 at 7:42 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
>> > This adds support for the Mediatek thermal controller found on MT8173
>> > and likely other SoCs.
>> > The controller is a bit special. It does not have its own ADC, instead
>> > it controls the on-SoC AUXADC via AHB bus accesses. For this reason
>> > we need the physical address of the AUXADC. Also it controls a mux
>> > using AHB bus accesses, so we need the APMIXEDSYS physical address aswell.
>> >
>> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
>>
>> [snip]
>>
>> > +static int mtk_thermal_get_calibration_data(struct device *dev, struct mtk_thermal *mt)
>> > +{
>> > +       struct nvmem_cell *cell;
>> > +       u32 *buf;
>> > +       size_t len;
>> > +       int i, ret = 0;
>> > +
>> > +       /* Start with default values */
>> > +       mt->adc_ge = 512;
>> > +       for (i = 0; i < MT8173_NUM_SENSORS; i++)
>> > +               mt->vts[i] = 260;
>> > +       mt->degc_cali = 40;
>> > +       mt->o_slope = 0;
>> > +
>> > +       cell = nvmem_cell_get(dev, "calibration-data");
>> > +       if (IS_ERR(cell)) {
>> > +               if (PTR_ERR(cell) == -EPROBE_DEFER)
>>
>> It is useful to know why the thermal driver is being probe defered, so
>> I suggest here:
>> dev_warn(dev, "Waiting for calibration data.\n");
>
> The problem with that is that this message is not shown once but
> possibly many times and may not even show a problem because in the end
> the device may be probed successfully. In this case the last thing you
> see from the device is "Waiting for calibration data." and get annoyed
> by all this useless noise from the driver.
>
> Of course I agree that this information may be useful in the case you
> wonder why your device doesn't show up...

The solution for this, then, is:
 dev_dbg()

WARNING: multiple messages have this Message-ID (diff)
From: djkurtz@chromium.org (Daniel Kurtz)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] thermal: Add Mediatek thermal controller support
Date: Mon, 4 Jan 2016 23:43:48 +0800	[thread overview]
Message-ID: <CAGS+omAHXE15aYcrUzAJ_hN=Fry=uTPk6=P3Cy2xL25j9+WpOQ@mail.gmail.com> (raw)
In-Reply-To: <20160104143129.GJ13058@pengutronix.de>

On Mon, Jan 4, 2016 at 10:31 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Mon, Dec 21, 2015 at 12:07:58PM +0800, Daniel Kurtz wrote:
>> Hi Sascha,
>>
>> One nit below that can be fixed up later, or now if you don't plan to
>> spin this driver to
>> address Eduardo's feedback...
>>
>> On Mon, Nov 30, 2015 at 7:42 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
>> > This adds support for the Mediatek thermal controller found on MT8173
>> > and likely other SoCs.
>> > The controller is a bit special. It does not have its own ADC, instead
>> > it controls the on-SoC AUXADC via AHB bus accesses. For this reason
>> > we need the physical address of the AUXADC. Also it controls a mux
>> > using AHB bus accesses, so we need the APMIXEDSYS physical address aswell.
>> >
>> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
>>
>> [snip]
>>
>> > +static int mtk_thermal_get_calibration_data(struct device *dev, struct mtk_thermal *mt)
>> > +{
>> > +       struct nvmem_cell *cell;
>> > +       u32 *buf;
>> > +       size_t len;
>> > +       int i, ret = 0;
>> > +
>> > +       /* Start with default values */
>> > +       mt->adc_ge = 512;
>> > +       for (i = 0; i < MT8173_NUM_SENSORS; i++)
>> > +               mt->vts[i] = 260;
>> > +       mt->degc_cali = 40;
>> > +       mt->o_slope = 0;
>> > +
>> > +       cell = nvmem_cell_get(dev, "calibration-data");
>> > +       if (IS_ERR(cell)) {
>> > +               if (PTR_ERR(cell) == -EPROBE_DEFER)
>>
>> It is useful to know why the thermal driver is being probe defered, so
>> I suggest here:
>> dev_warn(dev, "Waiting for calibration data.\n");
>
> The problem with that is that this message is not shown once but
> possibly many times and may not even show a problem because in the end
> the device may be probed successfully. In this case the last thing you
> see from the device is "Waiting for calibration data." and get annoyed
> by all this useless noise from the driver.
>
> Of course I agree that this information may be useful in the case you
> wonder why your device doesn't show up...

The solution for this, then, is:
 dev_dbg()

  reply	other threads:[~2016-01-04 15:44 UTC|newest]

Thread overview: 164+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-30 11:42 [PATCH v12] Add Mediatek thermal support Sascha Hauer
2015-11-30 11:42 ` Sascha Hauer
2015-11-30 11:42 ` [PATCH 1/3] dt-bindings: thermal: Add binding document for Mediatek thermal controller Sascha Hauer
2015-11-30 11:42   ` Sascha Hauer
2015-12-16 11:23   ` Daniel Kurtz
2015-12-16 11:23     ` Daniel Kurtz
2015-12-16 11:23     ` Daniel Kurtz
2015-12-17 19:23     ` Eduardo Valentin
2015-12-17 19:23       ` Eduardo Valentin
2015-12-17 19:23       ` Eduardo Valentin
2015-12-18  7:16       ` Sascha Hauer
2015-12-18  7:16         ` Sascha Hauer
2015-12-18  7:16         ` Sascha Hauer
2015-12-20  2:12         ` Eduardo Valentin
2015-12-20  2:12           ` Eduardo Valentin
2015-12-20  2:12           ` Eduardo Valentin
2015-11-30 11:42 ` [PATCH 2/3] thermal: Add Mediatek thermal controller support Sascha Hauer
2015-11-30 11:42   ` Sascha Hauer
2015-12-17 19:33   ` Eduardo Valentin
2015-12-17 19:33     ` Eduardo Valentin
2016-01-04 14:19     ` Sascha Hauer
2016-01-04 14:19       ` Sascha Hauer
2016-01-19  7:29       ` Sascha Hauer
2016-01-19  7:29         ` Sascha Hauer
2016-02-01  2:54         ` Eddie Huang
2016-02-01  2:54           ` Eddie Huang
2016-02-01  2:54           ` Eddie Huang
2016-02-15  2:11           ` Daniel Kurtz
2016-02-15  2:11             ` Daniel Kurtz
2016-02-15  2:11             ` Daniel Kurtz
2016-02-15  2:14             ` Daniel Kurtz
2016-02-15  2:14               ` Daniel Kurtz
2016-02-15  2:14               ` Daniel Kurtz
2016-02-17 17:05               ` Matthias Brugger
2016-02-17 17:05                 ` Matthias Brugger
2016-02-17 17:05                 ` Matthias Brugger
2016-02-18 10:56                 ` Sascha Hauer
2016-02-18 10:56                   ` Sascha Hauer
2016-02-18 10:56                   ` Sascha Hauer
2016-02-18 14:28                   ` Javi Merino
2016-02-18 14:28                     ` Javi Merino
2016-02-18 14:28                     ` Javi Merino
2016-02-18 15:15                   ` Eduardo Valentin
2016-02-18 15:15                     ` Eduardo Valentin
2016-02-18 15:15                     ` Eduardo Valentin
2016-02-19  7:21                     ` Sascha Hauer
2016-02-19  7:21                       ` Sascha Hauer
2016-02-19  7:21                       ` Sascha Hauer
2015-12-21  4:07   ` Daniel Kurtz
2015-12-21  4:07     ` Daniel Kurtz
2015-12-21  4:07     ` Daniel Kurtz
2016-01-04 14:31     ` Sascha Hauer
2016-01-04 14:31       ` Sascha Hauer
2016-01-04 14:31       ` Sascha Hauer
2016-01-04 15:43       ` Daniel Kurtz [this message]
2016-01-04 15:43         ` Daniel Kurtz
2016-01-04 15:43         ` Daniel Kurtz
2015-11-30 11:42 ` [PATCH 3/3] ARM64: dts: mt8173: Add thermal/auxadc device nodes Sascha Hauer
2015-11-30 11:42   ` Sascha Hauer
2016-02-18 16:18   ` Matthias Brugger
2016-02-18 16:18     ` Matthias Brugger
2016-02-19  7:20     ` Sascha Hauer
2016-02-19  7:20       ` Sascha Hauer
2016-04-20 11:23   ` Matthias Brugger
2016-04-20 11:23     ` Matthias Brugger
2015-12-14 10:37 ` [PATCH v12] Add Mediatek thermal support Sascha Hauer
2015-12-14 10:37   ` Sascha Hauer
2015-12-14 10:37   ` Sascha Hauer
2015-12-14 21:08   ` Eduardo Valentin
2015-12-14 21:08     ` Eduardo Valentin
2016-02-18 15:50 ` [PATCH 1/1] thermal: small style cleanup in mtk_thermal Eduardo Valentin
2016-02-18 15:50   ` Eduardo Valentin
2016-02-18 15:56   ` Matthias Brugger
2016-02-18 15:56     ` Matthias Brugger
2016-02-18 15:53 ` [PATCH v12] Add Mediatek thermal support Eduardo Valentin
2016-02-18 15:53   ` Eduardo Valentin
  -- strict thread matches above, loose matches on Subject: below --
2015-11-18  8:24 [PATCH v11] " Sascha Hauer
2015-11-18  8:24 ` [PATCH 2/3] thermal: Add Mediatek thermal controller support Sascha Hauer
2015-11-18  8:24   ` Sascha Hauer
2015-11-24  6:06   ` dawei chien
2015-11-24  6:06     ` dawei chien
2015-11-24  6:06     ` dawei chien
2015-11-24  7:53     ` Sascha Hauer
2015-11-24  7:53       ` Sascha Hauer
2015-11-09 10:13 [PATCH v10] Add Mediatek thermal support Sascha Hauer
2015-11-09 10:13 ` [PATCH 2/3] thermal: Add Mediatek thermal controller support Sascha Hauer
2015-11-09 10:13   ` Sascha Hauer
2015-11-09 10:13   ` Sascha Hauer
2015-11-09 14:39   ` Andy Shevchenko
2015-11-09 14:39     ` Andy Shevchenko
2015-11-18  8:11     ` Sascha Hauer
2015-11-18  8:11       ` Sascha Hauer
2015-11-18  8:11       ` Sascha Hauer
2015-11-10 12:05   ` Javi Merino
2015-11-10 12:05     ` Javi Merino
2015-11-10 18:26     ` Eduardo Valentin
2015-11-10 18:26       ` Eduardo Valentin
2015-11-11  7:27       ` Sascha Hauer
2015-11-11  7:27         ` Sascha Hauer
2015-11-11  9:40         ` Javi Merino
2015-11-11  9:40           ` Javi Merino
2015-11-11  9:40           ` Javi Merino
2015-11-13 10:09         ` Sascha Hauer
2015-11-13 10:09           ` Sascha Hauer
2015-11-13 11:26           ` Javi Merino
2015-11-13 11:26             ` Javi Merino
2015-11-18  8:18             ` Sascha Hauer
2015-11-18  8:18               ` Sascha Hauer
2015-09-23 13:37 [PATCH v9] Add Mediatek thermal support Sascha Hauer
2015-09-23 13:37 ` [PATCH 2/3] thermal: Add Mediatek thermal controller support Sascha Hauer
2015-09-23 13:37   ` Sascha Hauer
2015-09-23 18:31   ` Vladimir Zapolskiy
2015-09-23 18:31     ` Vladimir Zapolskiy
2015-09-23 18:31     ` Vladimir Zapolskiy
2015-09-30  6:14     ` Sascha Hauer
2015-09-30  6:14       ` Sascha Hauer
2015-09-29 23:04   ` Eduardo Valentin
2015-09-29 23:04     ` Eduardo Valentin
2015-09-29 23:04     ` Eduardo Valentin
2015-09-30  6:13     ` Sascha Hauer
2015-09-30  6:13       ` Sascha Hauer
2015-09-30  9:36   ` Punit Agrawal
2015-09-30  9:36     ` Punit Agrawal
2015-09-30  9:36     ` Punit Agrawal
2015-09-30 10:37     ` Sascha Hauer
2015-09-30 10:37       ` Sascha Hauer
2015-09-30 11:07       ` Punit Agrawal
2015-09-30 11:07         ` Punit Agrawal
2015-08-31  7:34 [PATCH v8] Add Mediatek thermal support Sascha Hauer
2015-08-31  7:34 ` [PATCH 2/3] thermal: Add Mediatek thermal controller support Sascha Hauer
2015-08-31  7:34   ` Sascha Hauer
2015-08-31  7:34   ` Sascha Hauer
2015-09-14  7:32   ` Daniel Kurtz
2015-09-14  7:32     ` Daniel Kurtz
2015-09-14  7:32     ` Daniel Kurtz
2015-09-22  7:30     ` Daniel Kurtz
2015-09-22  7:30       ` Daniel Kurtz
2015-09-22  7:30       ` Daniel Kurtz
2015-09-22  8:30       ` Sascha Hauer
2015-09-22  8:30         ` Sascha Hauer
2015-09-22  8:30         ` Sascha Hauer
2015-08-27  6:41 [PATCH v7] Add Mediatek thermal support Sascha Hauer
2015-08-27  6:41 ` [PATCH 2/3] thermal: Add Mediatek thermal controller support Sascha Hauer
2015-08-27 11:50   ` Punit Agrawal
2015-08-26 13:58 [PATCH v6] Add Mediatek thermal support Sascha Hauer
2015-08-26 13:58 ` [PATCH 2/3] thermal: Add Mediatek thermal controller support Sascha Hauer
2015-08-20  8:05 [PATCH v5] Add Mediatek thermal support Sascha Hauer
2015-08-20  8:06 ` [PATCH 2/3] thermal: Add Mediatek thermal controller support Sascha Hauer
2015-08-20 22:20   ` Eduardo Valentin
2015-08-20 22:29     ` Daniel Lezcano
2015-08-21  5:06     ` Sascha Hauer
2015-08-20 23:12   ` Daniel Lezcano
2015-08-26 13:54     ` Sascha Hauer
2015-08-26 14:02       ` Daniel Lezcano
2015-08-25 17:41   ` Daniel Kurtz
2015-08-07 13:55 [PATCH v4] Add Mediatek thermal support Sascha Hauer
2015-08-07 13:55 ` [PATCH 2/3] thermal: Add Mediatek thermal controller support Sascha Hauer
2015-08-11  7:03   ` Daniel Kurtz
2015-08-20  7:57     ` Sascha Hauer
2015-08-05 12:25 [PATCH v3] Add Mediatek thermal support Sascha Hauer
2015-08-05 12:25 ` [PATCH 2/3] thermal: Add Mediatek thermal controller support Sascha Hauer
2015-08-05 18:02   ` Daniel Kurtz
2015-08-06  8:10     ` Sascha Hauer
2015-07-21  7:59 [PATCH v2] Add Mediatek thermal support Sascha Hauer
2015-07-21  7:59 ` [PATCH 2/3] thermal: Add Mediatek thermal controller support Sascha Hauer
2015-07-21  7:59   ` Sascha Hauer
2015-07-21 15:13   ` Daniel Kurtz
2015-07-21 15:13     ` Daniel Kurtz
2015-07-21 15:13     ` Daniel Kurtz
2015-08-05 10:20     ` Sascha Hauer
2015-08-05 10:20       ` Sascha Hauer
2015-08-05 10:20       ` Sascha Hauer
2015-07-13 10:34 [PATCH] thermal: Add Mediatek thermal support Sascha Hauer
2015-07-13 10:34 ` [PATCH 2/3] thermal: Add Mediatek thermal controller support Sascha Hauer
2015-07-13 10:34   ` Sascha Hauer

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='CAGS+omAHXE15aYcrUzAJ_hN=Fry=uTPk6=P3Cy2xL25j9+WpOQ@mail.gmail.com' \
    --to=djkurtz@chromium.org \
    --cc=edubezval@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=rui.zhang@intel.com \
    --cc=s.hauer@pengutronix.de \
    /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.