From: Leonard Crestez <leonard.crestez@nxp.com>
To: Arnd Bergmann <arnd@arndb.de>, Zhang Rui <rui.zhang@intel.com>,
"Eduardo Valentin" <edubezval@gmail.com>
Cc: Shawn Guo <shawnguo@kernel.org>, <linux-pm@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] thermal: imx: add NVMEM dependency
Date: Tue, 19 Sep 2017 13:53:14 +0300 [thread overview]
Message-ID: <1505818394.29684.13.camel@nxp.com> (raw)
In-Reply-To: <20170918204825.159177-1-arnd@arndb.de>
On Mon, 2017-09-18 at 22:48 +0200, Arnd Bergmann wrote:
> The driver now fails to link into vmlinux when CONFIG_NVMEM is a loadable
> module:
>
> drivers/thermal/imx_thermal.o: In function `imx_thermal_probe':
> imx_thermal.c:(.text+0x360): undefined reference to
> `nvmem_cell_read_u32'
> imx_thermal.c:(.text+0x360): relocation truncated to fit:
> R_AARCH64_CALL26 against undefined symbol `nvmem_cell_read_u32'
> imx_thermal.c:(.text+0x388): undefined reference to
> `nvmem_cell_read_u32'
> imx_thermal.c:(.text+0x388): relocation truncated to fit:
> R_AARCH64_CALL26 against undefined symbol `nvmem_cell_read_u32'
>
> This adds a Kconfig dependency to force it to be a module as well
> when its dependency is loadable.
This must be a very strange config with NVMEM=m and IMX_THERMAL=y on
arm64. Still, it makes sense that it should work at least at the
Kconfig level.
> Fixes: 7fe5ba04fcdc ("thermal: imx: Add support for reading OCOTP through nvmem")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
> diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
> index 07002df4f83a..cb14f1ec5953 100644
> --- a/drivers/thermal/Kconfig
> +++ b/drivers/thermal/Kconfig
> @@ -206,6 +206,7 @@ config HISI_THERMAL
> config IMX_THERMAL
> tristate "Temperature sensor driver for Freescale i.MX SoCs"
> depends on (ARCH_MXC && CPU_THERMAL) || COMPILE_TEST
> + depends on NVMEM || !NVMEM
The || !NVMEM part is so that it also works when NVMEM=n, right?
next prev parent reply other threads:[~2017-09-19 10:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-18 20:48 [PATCH] thermal: imx: add NVMEM dependency Arnd Bergmann
2017-09-19 10:53 ` Leonard Crestez [this message]
2017-09-19 12:22 ` Arnd Bergmann
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=1505818394.29684.13.camel@nxp.com \
--to=leonard.crestez@nxp.com \
--cc=arnd@arndb.de \
--cc=edubezval@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
--cc=shawnguo@kernel.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