Re: Applied "regulator: max8973: add support for junction thermal warning" to the regulator tree

From: Laxman Dewangan
Date: Sun Mar 06 2016 - 03:00:41 EST



On Sunday 06 March 2016 08:05 AM, Mark Brown wrote:
* PGP Signed by an unknown key

On Sat, Mar 05, 2016 at 09:25:49PM +0900, Mark Brown wrote:
The patch

regulator: max8973: add support for junction thermal warning

has been applied to the regulator tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
...and reverted because the 0day bot found similar build failures to the
last time :(


I built for CONFIG_THERMAL=y and with CONFIG_THERMAL disabled for arm64 and it passed the build.

The failure is seen on following combination:
CONFIG_THERMAL=m
CONFIG_THERMAL_OF=y

CONFIG_REGULATOR_MAX8973=y


Here driver is built in binary and THERMAL is the loadable module.

Do we really have THERMAL as module i.e. basic framework?

I like to make 8973 independent of the THERMAL and that's why I used the ifdefs CONFIG_THERMAL_OF inside the driver. If THERMAL config is enabled then enable thermal support inside driver.

In driver, I used
#ifdef CONFIG_THERMAL_OF

This config is "y" if the THERMAL is enabled.

I made following change inside driver and then it builds properly for above combination:

/**
diff --git a/drivers/regulator/max8973-regulator.c b/drivers/regulator/max8973-regulator.c
index a5e0346..d79a487 100644
--- a/drivers/regulator/max8973-regulator.c
+++ b/drivers/regulator/max8973-regulator.c
@@ -474,7 +474,7 @@ static int max8973_init_dcdc(struct max8973_chip *max,
return ret;
}

-#ifdef CONFIG_THERMAL_OF
+#ifdef CONFIG_THERMAL
static int max8973_thermal_read_temp(void *data, int *temp)
{
struct max8973_chip *mchip = data;

**/



Should I send the modified patch here?