Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Banajit Goswami <bgoswami@quicinc.com>,
	Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org,
	linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v2] ASoC: codecs: wsa884x: Implement temperature reading and hwmon
Date: Sun, 14 Jul 2024 12:21:28 +0200	[thread overview]
Message-ID: <36840696-772b-4e57-a672-ec5210ebeb64@linaro.org> (raw)
In-Reply-To: <fd09fa44-1795-43a1-ba8d-ca2ba8f71d07@linaro.org>

On 14/07/2024 12:02, Krzysztof Kozlowski wrote:
> On 13/07/2024 11:56, Krzysztof Kozlowski wrote:
>> Read temperature of the speaker and expose it via hwmon interface, which
>> will be later used during calibration of speaker protection algorithms.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>
>> ---
>>
>> Changes in v2:
>> 1. Add missing dependency on HWMON for y!=m builds (kernel test robot
>>    report: undefined reference to
>>    `devm_hwmon_device_register_with_info').
>> ---
>>  sound/soc/codecs/Kconfig   |   1 +
>>  sound/soc/codecs/wsa884x.c | 197 +++++++++++++++++++++++++++++++++++++
>>  2 files changed, 198 insertions(+)
>>
>> diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
>> index 97bb69c9848d..09a0b209bc2f 100644
>> --- a/sound/soc/codecs/Kconfig
>> +++ b/sound/soc/codecs/Kconfig
>> @@ -2447,6 +2447,7 @@ config SND_SOC_WSA883X
>>  config SND_SOC_WSA884X
>>  	tristate "WSA884X Codec"
>>  	depends on SOUNDWIRE
>> +	depends on HWMON || !HWMON
> 
> Eh, now I got build report that hwmon does not have stubs for !HWMON (by
> design or missing?), so this still has compile failures.
> 
> I think we should have (devm_)hwmon_device_register_with_info() stubs
> for drivers not depending on hwmon, so I will propose a patch for that.
> If that approach is accepted, no changes should be needed in this
> wsa884x v2 patchset.

Answering to myself: I see now that lack of !HWMON stubs for providers
is rather by design and drivers use IS_REACHABLE. I'll send a v3 of this
patch.

Best regards,
Krzysztof


      reply	other threads:[~2024-07-14 10:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-13  9:56 [PATCH v2] ASoC: codecs: wsa884x: Implement temperature reading and hwmon Krzysztof Kozlowski
2024-07-14 10:02 ` Krzysztof Kozlowski
2024-07-14 10:21   ` Krzysztof Kozlowski [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=36840696-772b-4e57-a672-ec5210ebeb64@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@quicinc.com \
    --cc=broonie@kernel.org \
    --cc=jdelvare@suse.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=perex@perex.cz \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.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