* [PATCH] hwmon: rpi: fix link error against rpi_firmware module
@ 2018-07-09 15:42 Arnd Bergmann
2018-07-09 15:55 ` Guenter Roeck
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2018-07-09 15:42 UTC (permalink / raw)
To: Jean Delvare, Guenter Roeck
Cc: Stefan Wahren, Eric Anholt, Arnd Bergmann, Vadim Pasternak,
linux-hwmon, linux-kernel
Compile-testing without CONFIG_RASPBERRYPI_FIRMWARE is possible, but we
cannot build the rpi hwmon driver into the kernel if the firmware code
is a loadable module:
drivers/hwmon/raspberrypi-hwmon.o: In function `rpi_hwmon_probe':
raspberrypi-hwmon.c:(.text+0x140): undefined reference to `rpi_firmware_property'
drivers/hwmon/raspberrypi-hwmon.o: In function `get_values_poll':
raspberrypi-hwmon.c:(.text+0x350): undefined reference to `rpi_firmware_property'
This adapts the dependency to disallow that combination.
Fixes: 3c493c885cf8 ("hwmon: Add support for RPi voltage sensor")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/hwmon/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index a4e5d3c9fc71..81da17a42dc9 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -1322,7 +1322,7 @@ config SENSORS_PWM_FAN
config SENSORS_RASPBERRYPI_HWMON
tristate "Raspberry Pi voltage monitor"
- depends on RASPBERRYPI_FIRMWARE || COMPILE_TEST
+ depends on RASPBERRYPI_FIRMWARE || (COMPILE_TEST && !RASPBERRYPI_FIRMWARE)
help
If you say yes here you get support for voltage sensor on the
Raspberry Pi.
--
2.9.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] hwmon: rpi: fix link error against rpi_firmware module
2018-07-09 15:42 [PATCH] hwmon: rpi: fix link error against rpi_firmware module Arnd Bergmann
@ 2018-07-09 15:55 ` Guenter Roeck
2018-07-09 16:11 ` Florian Fainelli
0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2018-07-09 15:55 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Jean Delvare, Stefan Wahren, Eric Anholt, Vadim Pasternak,
linux-hwmon, linux-kernel, Florian Fainelli
On Mon, Jul 09, 2018 at 05:42:44PM +0200, Arnd Bergmann wrote:
> Compile-testing without CONFIG_RASPBERRYPI_FIRMWARE is possible, but we
> cannot build the rpi hwmon driver into the kernel if the firmware code
> is a loadable module:
>
> drivers/hwmon/raspberrypi-hwmon.o: In function `rpi_hwmon_probe':
> raspberrypi-hwmon.c:(.text+0x140): undefined reference to `rpi_firmware_property'
> drivers/hwmon/raspberrypi-hwmon.o: In function `get_values_poll':
> raspberrypi-hwmon.c:(.text+0x350): undefined reference to `rpi_firmware_property'
>
> This adapts the dependency to disallow that combination.
>
> Fixes: 3c493c885cf8 ("hwmon: Add support for RPi voltage sensor")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Guenter Roeck <linux@roeck-us.net>
This will have to go through Florian's tree.
Guenter
> ---
> drivers/hwmon/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
> index a4e5d3c9fc71..81da17a42dc9 100644
> --- a/drivers/hwmon/Kconfig
> +++ b/drivers/hwmon/Kconfig
> @@ -1322,7 +1322,7 @@ config SENSORS_PWM_FAN
>
> config SENSORS_RASPBERRYPI_HWMON
> tristate "Raspberry Pi voltage monitor"
> - depends on RASPBERRYPI_FIRMWARE || COMPILE_TEST
> + depends on RASPBERRYPI_FIRMWARE || (COMPILE_TEST && !RASPBERRYPI_FIRMWARE)
Is that one of the situations where "imply RASPBERRYPI_FIRMWARE"
would be useful ?
> help
> If you say yes here you get support for voltage sensor on the
> Raspberry Pi.
> --
> 2.9.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] hwmon: rpi: fix link error against rpi_firmware module
2018-07-09 15:55 ` Guenter Roeck
@ 2018-07-09 16:11 ` Florian Fainelli
0 siblings, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2018-07-09 16:11 UTC (permalink / raw)
To: Guenter Roeck, Arnd Bergmann
Cc: Jean Delvare, Stefan Wahren, Eric Anholt, Vadim Pasternak,
linux-hwmon, linux-kernel
On 07/09/2018 08:55 AM, Guenter Roeck wrote:
> On Mon, Jul 09, 2018 at 05:42:44PM +0200, Arnd Bergmann wrote:
>> Compile-testing without CONFIG_RASPBERRYPI_FIRMWARE is possible, but we
>> cannot build the rpi hwmon driver into the kernel if the firmware code
>> is a loadable module:
>>
>> drivers/hwmon/raspberrypi-hwmon.o: In function `rpi_hwmon_probe':
>> raspberrypi-hwmon.c:(.text+0x140): undefined reference to `rpi_firmware_property'
>> drivers/hwmon/raspberrypi-hwmon.o: In function `get_values_poll':
>> raspberrypi-hwmon.c:(.text+0x350): undefined reference to `rpi_firmware_property'
>>
>> This adapts the dependency to disallow that combination.
>>
>> Fixes: 3c493c885cf8 ("hwmon: Add support for RPi voltage sensor")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Acked-by: Guenter Roeck <linux@roeck-us.net>
>
> This will have to go through Florian's tree.
Thanks for looping me in, I just sent the pull requests out Arnd, do you
want me to squash this into 3c493c885cf8 ("hwmon: Add support for RPi
voltage sensor") and resubmit?
Ray just informed me he has additional DTS stuff he would like to see
included.
>
> Guenter
>
>> ---
>> drivers/hwmon/Kconfig | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
>> index a4e5d3c9fc71..81da17a42dc9 100644
>> --- a/drivers/hwmon/Kconfig
>> +++ b/drivers/hwmon/Kconfig
>> @@ -1322,7 +1322,7 @@ config SENSORS_PWM_FAN
>>
>> config SENSORS_RASPBERRYPI_HWMON
>> tristate "Raspberry Pi voltage monitor"
>> - depends on RASPBERRYPI_FIRMWARE || COMPILE_TEST
>> + depends on RASPBERRYPI_FIRMWARE || (COMPILE_TEST && !RASPBERRYPI_FIRMWARE)
>
> Is that one of the situations where "imply RASPBERRYPI_FIRMWARE"
> would be useful ?
>
>> help
>> If you say yes here you get support for voltage sensor on the
>> Raspberry Pi.
>> --
>> 2.9.0
>>
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-09 16:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-09 15:42 [PATCH] hwmon: rpi: fix link error against rpi_firmware module Arnd Bergmann
2018-07-09 15:55 ` Guenter Roeck
2018-07-09 16:11 ` Florian Fainelli
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).