regulator (max5970): Add hwmon support
Subsystems (2)
PATCH 1/1 regulator (max5970): Add hwmon support
Utilize the integrated 10-bit ADC in Max5970/Max5978 to enable voltage and current monitoring. This feature is seamlessly integrated through the hwmon subsystem.
--- drivers/regulator/max5970-regulator.c | 119 ++++++++++++++++++++++++++ 1 file changed, 119 insertions(+)
drivers/regulator/max5970-regulator.c +119 -0
@@ -10,6 +10,7 @@#include <linux/bitops.h> #include <linux/device.h> #include <linux/err.h> +#include <linux/hwmon.h> #include <linux/module.h> #include <linux/io.h> #include <linux/of.h>
@@ -32,6 +33,116 @@ enum max597x_regulator_id { MAX597X_SW1, }; +static int max5970_read_adc (struct regmap *regmap,int reg,long *val) +{ +u8 reg_data[2 ]; +int ret; + + ret =regmap_bulk_read (regmap, reg, ®_data[0 ],2 ); +if (ret <0 ) +return ret; + + *val = (reg_data[0 ] <<2 ) | (reg_data[1 ] &3 ); + +return 0 ; +} + +static int max5970_read (struct device *dev,enum hwmon_sensor_types type, +u32 attr,int channel,long *val) +{ +struct max5970_data *ddata =dev_get_drvdata (dev); +struct regmap *regmap =dev_get_regmap (dev->parent,NULL ); +int ret; + +switch (type) { +case hwmon_curr: +switch (attr) { +case hwmon_curr_input: + ret =max5970_read_adc (regmap,MAX5970_REG_CURRENT_H (channel), val); +/* +* Calculate current from ADC value, IRNG range & shunt resistor value. +* ddata->irng holds the voltage corresponding to the maximum value the +* 10-bit ADC can measure. +* To obtain the output, multiply the ADC value by the IRNG range (in +* millivolts) and then divide it by the maximum value of the 10-bit ADC. +*/ + *val = (*val * ddata->irng[channel]) >>10 ; +/* Convert the voltage meansurement across shunt resistor to current */ + *val = (*val *1000 ) / ddata->shunt_micro_ohms[channel]; +return ret; +default : +return -EOPNOTSUPP ; + } + +case hwmon_in: +switch (attr) { +case hwmon_in_input: + ret =max5970_read_adc (regmap,MAX5970_REG_VOLTAGE_H (channel), val); +/* +* Calculate voltage from ADC value and MON range. +* ddata->mon_rng holds the voltage corresponding to the maximum value the +* 10-bit ADC can measure. +* To obtain the output, multiply the ADC value by the MON range (in +* microvolts) and then divide it by the maximum value of the 10-bit ADC. +*/ + *val =mul_u64_u32_shr (*val, ddata->mon_rng[channel],10 ); +/* uV to mV */ + *val = *val /1000 ; +return ret; +default : +return -EOPNOTSUPP ; + } +default : +return -EOPNOTSUPP ; + } +} + +static umode_t max5970_is_visible (const void *data, +enum hwmon_sensor_types type, +u32 attr,int channel) +{ +struct max5970_data *ddata = (struct max5970_data *)data; + +if (channel >= ddata->num_switches) +return 0 ; + +switch (type) { +case hwmon_in: +switch (attr) { +case hwmon_in_input: +return 0444 ; + } +break ; +case hwmon_curr: +switch (attr) { +case hwmon_curr_input: +/* Current measurement requires knowledge of the shunt resistor value. */ +if (ddata->shunt_micro_ohms[channel]) +return 0444 ; + } +break ; +default : +break ; + } +return 0 ; +} + +static const struct hwmon_ops max5970_hwmon_ops = { + .is_visible = max5970_is_visible, + .read = max5970_read, +}; + +static const struct hwmon_channel_info *max5970_info[] = { +HWMON_CHANNEL_INFO (in,HWMON_I_INPUT ,HWMON_I_INPUT ), +HWMON_CHANNEL_INFO (curr,HWMON_C_INPUT ,HWMON_C_INPUT ), +NULL +}; + +static const struct hwmon_chip_info max5970_chip_info = { + .ops = &max5970_hwmon_ops, + .info = max5970_info, +}; +static int max597x_uvp_ovp_check_mode (struct regulator_dev *rdev,int severity) {int ret, reg;
@@ -432,6 +543,7 @@ static int max597x_regulator_probe(struct platform_device *pdev)struct regulator_config config = { };struct regulator_dev *rdev;struct regulator_dev *rdevs[MAX5970_NUM_SWITCHES ]; +struct device *hwmon_dev;int num_switches;int ret, i;
@@ -485,6 +597,13 @@ static int max597x_regulator_probe(struct platform_device *pdev) max597x->shunt_micro_ohms[i] = data->shunt_micro_ohms; } + hwmon_dev =devm_hwmon_device_register_with_info (&i2c->dev,"max5970_hwmon" , max597x, + &max5970_chip_info,NULL ); +if (IS_ERR (hwmon_dev)) { +return dev_err_probe (&i2c->dev,PTR_ERR (hwmon_dev), \ +"Unable to register hwmon device\n" ); + } +if (i2c->irq) { ret = max597x_setup_irq(&i2c->dev, i2c->irq, rdevs, num_switches,
base-commit: 35d0d2350d774fecf596cfb2fb050559fe5e1850
Signature · 1 line
2.41.0
Guenter Roeck
maintainerQuoted 68 lines · Naresh Solanki
Utilize the integrated 10-bit ADC in Max5970/Max5978 to enable voltage and current monitoring. This feature is seamlessly integrated through the hwmon subsystem.
Signed-off-by Naresh Solanki <[email protected]>--- drivers/regulator/max5970-regulator.c | 119 ++++++++++++++++++++++++++ 1 file changed, 119 insertions(+)drivers/regulator/max5970-regulator.c +44
-0@@ -10,6 +10,7 @@#include <linux/bitops.h> #include <linux/device.h> #include <linux/err.h> +#include <linux/hwmon.h> #include <linux/module.h> #include <linux/io.h> #include <linux/of.h> @@ -32,6 +33,116 @@ enum max597x_regulator_id { MAX597X_SW1, }; +static int max5970_read_adc (struct regmap *regmap,int reg,long *val) +{ +u8 reg_data[2 ]; +int ret; + + ret =regmap_bulk_read (regmap, reg, ®_data[0 ],2 ); +if (ret <0 ) +return ret; + + *val = (reg_data[0 ] <<2 ) | (reg_data[1 ] &3 ); + +return 0 ; +} + +static int max5970_read (struct device *dev,enum hwmon_sensor_types type, +u32 attr,int channel,long *val) +{ +struct max5970_data *ddata =dev_get_drvdata (dev); +struct regmap *regmap =dev_get_regmap (dev->parent,NULL ); +int ret; + +switch (type) { +case hwmon_curr: +switch (attr) { +case hwmon_curr_input: + ret =max5970_read_adc (regmap,MAX5970_REG_CURRENT_H (channel), val); +/* +* Calculate current from ADC value, IRNG range & shunt resistor value. +* ddata->irng holds the voltage corresponding to the maximum value the +* 10-bit ADC can measure. +* To obtain the output, multiply the ADC value by the IRNG range (in +* millivolts) and then divide it by the maximum value of the 10-bit ADC. +*/ + *val = (*val * ddata->irng[channel]) >>10 ; +/* Convert the voltage meansurement across shunt resistor to current */ + *val = (*val *1000 ) / ddata->shunt_micro_ohms[channel]; +return ret; +default : +return -EOPNOTSUPP ; + } + +case hwmon_in: +switch (attr) {
drivers/regulator/max5970-regulator.c enum max597x_regulator_id { · line 88
Quoted 10 lines
drivers/regulator/max5970-regulator.c +10
-0+case hwmon_in_input: + ret =max5970_read_adc (regmap,MAX5970_REG_VOLTAGE_H (channel), val); +/* +* Calculate voltage from ADC value and MON range. +* ddata->mon_rng holds the voltage corresponding to the maximum value the +* 10-bit ADC can measure. +* To obtain the output, multiply the ADC value by the MON range (in +* microvolts) and then divide it by the maximum value of the 10-bit ADC. +*/ + *val =mul_u64_u32_shr (*val, ddata->mon_rng[channel],10 );
Why do you use mul_u64_u32_shr() here but a direct shift above ?
Quoted 15 lines
drivers/regulator/max5970-regulator.c +15
-0+/* uV to mV */ + *val = *val /1000 ; +return ret; +default : +return -EOPNOTSUPP ; + } +default : +return -EOPNOTSUPP ; + } +} + +static umode_t max5970_is_visible (const void *data, +enum hwmon_sensor_types type, +u32 attr,int channel) +{
drivers/regulator/max5970-regulator.c enum max597x_regulator_id { · line 113
Quoted 10 lines
drivers/regulator/max5970-regulator.c +10
-0+struct max5970_data *ddata = (struct max5970_data *)data; + +if (channel >= ddata->num_switches) +return 0 ; + +switch (type) { +case hwmon_in: +switch (attr) { +case hwmon_in_input: +return 0444 ;
default: break;
drivers/regulator/max5970-regulator.c enum max597x_regulator_id { · line 121
Quoted 8 lines
drivers/regulator/max5970-regulator.c +8
-0+ } +break ; +case hwmon_curr: +switch (attr) { +case hwmon_curr_input: +/* Current measurement requires knowledge of the shunt resistor value. */ +if (ddata->shunt_micro_ohms[channel]) +return 0444 ;
default: break;
Quoted 6 lines
drivers/regulator/max5970-regulator.c +6
-0+ } +break ; +default : +break ; + } +return 0 ;
drivers/regulator/max5970-regulator.c enum max597x_regulator_id { · line 137
Quoted 10 lines
drivers/regulator/max5970-regulator.c +10
-0+} + +static const struct hwmon_ops max5970_hwmon_ops = { + .is_visible = max5970_is_visible, + .read = max5970_read, +}; + +static const struct hwmon_channel_info *max5970_info[] = { +HWMON_CHANNEL_INFO (in,HWMON_I_INPUT ,HWMON_I_INPUT ), +HWMON_CHANNEL_INFO (curr,HWMON_C_INPUT ,HWMON_C_INPUT ),
Your call, but the chip does support limit and status registers, so you could add reporting those as well since you are at it, possibly even including notifications.
Quoted 20 lines
drivers/regulator/max5970-regulator.c +9
-0+ NULL +}; + +static const struct hwmon_chip_info max5970_chip_info = { + .ops = &max5970_hwmon_ops, + .info = max5970_info, +}; +static int max597x_uvp_ovp_check_mode (struct regulator_dev *rdev,int severity) {int ret, reg;@@ -432,6 +543,7 @@ static int max597x_regulator_probe(struct platform_device *pdev)struct regulator_config config = { };struct regulator_dev *rdev;struct regulator_dev *rdevs[MAX5970_NUM_SWITCHES ]; +struct device *hwmon_dev;int num_switches;int ret, i;
drivers/regulator/max5970-regulator.c static int max597x_regulator_probe(struct platform_device *pdev) · line 601
Quoted 5 lines
drivers/regulator/max5970-regulator.c +2
-0@@ -485,6 +597,13 @@ static int max597x_regulator_probe(struct platform_device *pdev) max597x->shunt_micro_ohms[i] = data->shunt_micro_ohms; } + hwmon_dev =devm_hwmon_device_register_with_info (&i2c->dev,"max5970_hwmon" , max597x, + &max5970_chip_info,NULL );
This makes the driver dependent on hwmon, so you either need a strict
depends on HWMON
in Kconfig, or
depends on HWMON || HWMON=n
and add #if IS_ENABLED(CONFIG_HWMON) as appropriate into the code.
Quoted 10 lines
drivers/regulator/max5970-regulator.c +5
-0+if (IS_ERR (hwmon_dev)) { +return dev_err_probe (&i2c->dev,PTR_ERR (hwmon_dev), \ +"Unable to register hwmon device\n" ); + } +if (i2c->irq) { ret = max597x_setup_irq(&i2c->dev, i2c->irq, rdevs, num_switches,base-commit:
35d0d2350d774fecf596cfb2fb050559fe5e1850
Hi
Quoted 74 lines · Guenter Roeck
Quoted 72 lines · Naresh Solanki
Utilize the integrated 10-bit ADC in Max5970/Max5978 to enable voltage and current monitoring. This feature is seamlessly integrated through the hwmon subsystem.
Signed-off-by Naresh Solanki <[email protected]>--- drivers/regulator/max5970-regulator.c | 119 ++++++++++++++++++++++++++ 1 file changed, 119 insertions(+)drivers/regulator/max5970-regulator.c +48
-0@@ -10,6 +10,7 @@#include <linux/bitops.h> #include <linux/device.h> #include <linux/err.h> +#include <linux/hwmon.h> #include <linux/module.h> #include <linux/io.h> #include <linux/of.h> @@ -32,6 +33,116 @@ enum max597x_regulator_id { MAX597X_SW1, }; +static int max5970_read_adc (struct regmap *regmap,int reg,long *val) +{ +u8 reg_data[2 ]; +int ret; + + ret =regmap_bulk_read (regmap, reg, ®_data[0 ],2 ); +if (ret <0 ) +return ret; + + *val = (reg_data[0 ] <<2 ) | (reg_data[1 ] &3 ); + +return 0 ; +} + +static int max5970_read (struct device *dev,enum hwmon_sensor_types type, +u32 attr,int channel,long *val) +{ +struct max5970_data *ddata =dev_get_drvdata (dev); +struct regmap *regmap =dev_get_regmap (dev->parent,NULL ); +int ret; + +switch (type) { +case hwmon_curr: +switch (attr) { +case hwmon_curr_input: + ret =max5970_read_adc (regmap,MAX5970_REG_CURRENT_H (channel), val); +/* +* Calculate current from ADC value, IRNG range & shunt resistor value. +* ddata->irng holds the voltage corresponding to the maximum value the +* 10-bit ADC can measure. +* To obtain the output, multiply the ADC value by the IRNG range (in +* millivolts) and then divide it by the maximum value of the 10-bit ADC. +*/ + *val = (*val * ddata->irng[channel]) >>10 ; +/* Convert the voltage meansurement across shunt resistor to current */ + *val = (*val *1000 ) / ddata->shunt_micro_ohms[channel]; +return ret; +default : +return -EOPNOTSUPP ; + } + +case hwmon_in: +switch (attr) { +case hwmon_in_input: + ret =max5970_read_adc (regmap,MAX5970_REG_VOLTAGE_H (channel), val); +/* +* Calculate voltage from ADC value and MON range.
Quoted 8 lines
drivers/regulator/max5970-regulator.c enum max597x_regulator_id { · line 88
Quoted 6 lines
drivers/regulator/max5970-regulator.c +6
-0+* ddata->mon_rng holds the voltage corresponding to the maximum value the +* 10-bit ADC can measure. +* To obtain the output, multiply the ADC value by the MON range (in +* microvolts) and then divide it by the maximum value of the 10-bit ADC. +*/ + *val =mul_u64_u32_shr (*val, ddata->mon_rng[channel],10 );Why do you use
mul_u64_u32_shr()here but a direct shift above ?
There is possibility of overflow due to large value of ddata->mon_rng
Quoted 21 lines
Quoted 21 lines
drivers/regulator/max5970-regulator.c +20
-0+/* uV to mV */ + *val = *val /1000 ; +return ret; +default : +return -EOPNOTSUPP ; + } +default : +return -EOPNOTSUPP ; + } +} + +static umode_t max5970_is_visible (const void *data, +enum hwmon_sensor_types type, +u32 attr,int channel) +{ +struct max5970_data *ddata = (struct max5970_data *)data; + +if (channel >= ddata->num_switches) +return 0 ; +
Quoted 8 lines
drivers/regulator/max5970-regulator.c enum max597x_regulator_id { · line 113
Quoted 5 lines
drivers/regulator/max5970-regulator.c +5
-0+switch (type) { +case hwmon_in: +switch (attr) { +case hwmon_in_input: +return 0444 ;default: break;
Ack
Quoted 11 lines
drivers/regulator/max5970-regulator.c enum max597x_regulator_id { · line 121
Quoted 9 lines
drivers/regulator/max5970-regulator.c +8
-0+ } +break ; +case hwmon_curr: +switch (attr) { +case hwmon_curr_input: +/* Current measurement requires knowledge of the shunt resistor value. */ +if (ddata->shunt_micro_ohms[channel]) +return 0444 ;default: break;
Ack
Quoted 13 lines
Quoted 13 lines
drivers/regulator/max5970-regulator.c +12
-0+ } +break ; +default : +break ; + } +return 0 ; +} + +static const struct hwmon_ops max5970_hwmon_ops = { + .is_visible = max5970_is_visible, + .read = max5970_read, +};
Quoted 8 lines
drivers/regulator/max5970-regulator.c enum max597x_regulator_id { · line 137
Quoted 4 lines
drivers/regulator/max5970-regulator.c +4
-0+ +static const struct hwmon_channel_info *max5970_info[] = { +HWMON_CHANNEL_INFO (in,HWMON_I_INPUT ,HWMON_I_INPUT ), +HWMON_CHANNEL_INFO (curr,HWMON_C_INPUT ,HWMON_C_INPUT ),Your call, but the chip does support limit and status registers, so you could add reporting those as well since you are at it, possibly even including notifications.
Will consider separate set of patch for this.
Quoted 24 lines
Quoted 24 lines
drivers/regulator/max5970-regulator.c +9
-0+ NULL +}; + +static const struct hwmon_chip_info max5970_chip_info = { + .ops = &max5970_hwmon_ops, + .info = max5970_info, +}; +static int max597x_uvp_ovp_check_mode (struct regulator_dev *rdev,int severity) {int ret, reg;@@ -432,6 +543,7 @@ static int max597x_regulator_probe(struct platform_device *pdev)struct regulator_config config = { };struct regulator_dev *rdev;struct regulator_dev *rdevs[MAX5970_NUM_SWITCHES ]; +struct device *hwmon_dev;int num_switches;int ret, i;@@ -485,6 +597,13 @@ static int max597x_regulator_probe(struct platform_device *pdev) max597x->shunt_micro_ohms[i] = data->shunt_micro_ohms; }
Quoted 8 lines
drivers/regulator/max5970-regulator.c static int max597x_regulator_probe(struct platform_device *pdev) · line 601
Quoted 2 lines
drivers/regulator/max5970-regulator.c +2
-0+ hwmon_dev =devm_hwmon_device_register_with_info (&i2c->dev,"max5970_hwmon" , max597x, + &max5970_chip_info,NULL );This makes the driver dependent on hwmon, so you either need a strict
depends on HWMON
inKconfig, ordepends on HWMON || HWMON=nand add #if
IS_ENABLED(CONFIG_HWMON)as appropriate into the code.
Sure, will update accordingly. Thanks
Quoted 13 lines
Quoted 12 lines
drivers/regulator/max5970-regulator.c +5
-0+if (IS_ERR (hwmon_dev)) { +return dev_err_probe (&i2c->dev,PTR_ERR (hwmon_dev), \ +"Unable to register hwmon device\n" ); + } +if (i2c->irq) { ret = max597x_setup_irq(&i2c->dev, i2c->irq, rdevs, num_switches,base-commit:
35d0d2350d774fecf596cfb2fb050559fe5e1850
Guenter Roeck
maintainerQuoted 2 lines · Naresh Solanki
Hi
[ ... ]
Quoted 11 lines
Quoted 10 lines
drivers/regulator/max5970-regulator.c enum max597x_regulator_id { · line 88
Quoted 8 lines
drivers/regulator/max5970-regulator.c +8
-0+/* +* Calculate voltage from ADC value and MON range. +* ddata->mon_rng holds the voltage corresponding to the maximum value the +* 10-bit ADC can measure. +* To obtain the output, multiply the ADC value by the MON range (in +* microvolts) and then divide it by the maximum value of the 10-bit ADC. +*/ + *val =mul_u64_u32_shr (*val, ddata->mon_rng[channel],10 );Why do you use
mul_u64_u32_shr()here but a direct shift above ?There is possibility of overflow due to large value of
ddata->mon_rng
Does the right shift guarantee that the result fits into 32 bit ?
Thanks,
Guenter
Hi
Quoted 14 lines · Guenter Roeck
Quoted 2 lines · Naresh Solanki
Hi
[ ... ]
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
drivers/regulator/max5970-regulator.c +8
-0+/* +* Calculate voltage from ADC value and MON range. +* ddata->mon_rng holds the voltage corresponding to the maximum value the +* 10-bit ADC can measure. +* To obtain the output, multiply the ADC value by the MON range (in +* microvolts) and then divide it by the maximum value of the 10-bit ADC. +*/ + *val =mul_u64_u32_shr (*val, ddata->mon_rng[channel],10 );
Quoted 4 lines
Quoted 2 lines
Quoted 1 line
Why do you use
mul_u64_u32_shr()here but a direct shift above ?There is possibility of overflow due to large value of
ddata->mon_rngDoes the right shift guarantee that the result fits into 32 bit ?
Yes. Value in ddata->mon_rng can go upto 26bits, & ADC is 10 bit. The 10 bit right shift(part of calculation) makes sure the result never exceed 32 bit
Regards,
Naresh
Quoted 4 lines
Thanks,
Guenter
kernel test robot
build botkernel test robot noticed the following build errors:
Hi Naresh,
kernel test robot noticed the following build errors:
[auto build test ERROR on 35d0d2350d774fecf596cfb2fb050559fe5e1850]
url: https://github.com/intel-lab-lkp/linux/commits/Naresh-Solanki/regulator-max5970-Add-hwmon-support/20230831-035843 base: 35d0d2350d774fecf596cfb2fb050559fe5e1850 patch link: https://lore.kernel.org/r/20230830111319.3882281-1-Naresh.Solanki%409elements.com patch subject: [PATCH] regulator (max5970): Add hwmon support config: x86_64-randconfig-004-20230901 (https://download.01.org/0day-ci/archive/20230901/[email protected]/config) compiler: gcc-11 (Debian 11.3.0-12) 11.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230901/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>, old ones prefixed by <<):
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/mac-celtic.o
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/mac-inuit.o
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/mac-roman.o
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/unicode/utf8data.o
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/unicode/utf8-selftest.o
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/isofs/isofs.o
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/smb/common/cifs_arc4.o
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/smb/common/cifs_md4.o
WARNING: modpost: missing MODULE_DESCRIPTION() in security/keys/trusted-keys/trusted.o
WARNING: modpost: missing MODULE_DESCRIPTION() in crypto/algif_hash.o
WARNING: modpost: missing MODULE_DESCRIPTION() in lib/kunit/kunit.o
WARNING: modpost: missing MODULE_DESCRIPTION() in lib/kunit/kunit-test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in lib/math/prime_numbers.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/backlight/rt4831-backlight.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/acpi/nfit/nfit.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/acpi/custom_method.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/clk_test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/clk-gate_test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/regulator/max20411-regulator.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/regulator/rt4831-regulator.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/tty/serial/8250/serial_cs.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/tty/n_gsm.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/ppdev.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/base/regmap/regmap-kunit.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/base/regmap/regmap-ram.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/base/regmap/regmap-raw-ram.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/base/regmap/regmap-spmi.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/block/loop.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/misc/open-dice.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/rt4831.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/intel_soc_pmic_bxtwc.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/macintosh/mac_hid.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvme/host/nvme-core.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvme/host/nvme-fabrics.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvme/host/nvme-fc.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvme/target/nvme-loop.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mtd/chips/cfi_cmdset_0020.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/phy/phylink.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/phy/sfp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/pcs/pcs-lynx.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/qualcomm/emac/qcom-emac.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ppp/ppp_async.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ppp/bsd_comp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ppp/ppp_deflate.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ppp/ppp_synctty.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/cdrom/cdrom.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/auxdisplay/charlcd.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/auxdisplay/hd44780_common.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/mon/usbmon.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/serial/mxuport.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/serial/navman.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/serial/qcaux.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/serial/usb-serial-simple.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/serial/symbolserial.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/chipidea/ci_hdrc_msm.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/libcomposite.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_acm.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_ss_lb.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/u_serial.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_obex.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/u_ether.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_ncm.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_ecm.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_eem.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_ecm_subset.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_rndis.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_mass_storage.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_fs.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_hid.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_printer.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_tcm.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/legacy/g_zero.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/legacy/g_dbgp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/rtc/rtc-goldfish.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/isdn/mISDN/l1oip.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/isdn/hardware/mISDN/hfcsusb.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mmc/core/pwrseq_simple.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mmc/core/pwrseq_emmc.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/firmware/google/gsmi.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/firmware/google/memconsole-x86-legacy.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/firmware/google/cbmem.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/platform/x86/intel/intel-vbtn.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/devfreq/governor_simpleondemand.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/devfreq/governor_performance.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/spmi/hisi-spmi-controller.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pcmcia/pcmcia_rsrc.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/rpmsg/rpmsg_char.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/core/dev_addr_lists_test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/act_gate.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_sfq.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_tbf.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_mqprio.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_mqprio_lib.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_etf.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/cls_fw.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/xdp/xsk_diag.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/caif/caif.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/caif/chnl_net.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/caif/caif_socket.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/hsr/hsr.o
>> ERROR: modpost: "devm_hwmon_device_register_with_info" [drivers/regulator/max5970-regulator.ko] undefined!
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
kernel test robot
build botkernel test robot noticed the following build errors:
Hi Naresh,
kernel test robot noticed the following build errors:
[auto build test ERROR on 35d0d2350d774fecf596cfb2fb050559fe5e1850]
url: https://github.com/intel-lab-lkp/linux/commits/Naresh-Solanki/regulator-max5970-Add-hwmon-support/20230831-035843 base: 35d0d2350d774fecf596cfb2fb050559fe5e1850 patch link: https://lore.kernel.org/r/20230830111319.3882281-1-Naresh.Solanki%409elements.com patch subject: [PATCH] regulator (max5970): Add hwmon support config: x86_64-buildonly-randconfig-001-20230901 (https://download.01.org/0day-ci/archive/20230901/[email protected]/config) compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230901/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
>> ld.lld: error: undefined symbol: devm_hwmon_device_register_with_info >>> referenced by max5970-regulator.c >>> drivers/regulator/max5970-regulator.o:(max597x_regulator_probe) in archive vmlinux.a
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki