* [RFC][PATCH] hwmon: (pmbus) Support 4th PSU temperature sensor
@ 2021-07-28 9:38 Paul Menzel
2021-07-28 9:40 ` Paul Menzel
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Paul Menzel @ 2021-07-28 9:38 UTC (permalink / raw)
To: Guenter Roeck, Jean Delvare
Cc: Guohan Lu, Madhava Reddy Siddareddygari, Venkat Garigipati,
Billie Alsup, Paul Menzel, linux-hwmon, linux-kernel
From: Madhava Reddy Siddareddygari <msiddare@cisco.com>
PSU650W has four temperature sensors, while the pmbus driver currently
only support three temperature sensors.
So, support a fourth temp sensor, i. e. PSU outlet temperature sensor,
by copying what is done for temperature sensor 3, and use register 0xDF.
PSU650W is based on LITE-ON vendor.
LITE-ON MFG part numbers for the PSU are PS-2651-3SB5 Z and PS-2651-3SA5 Z.
Signed-off-by: Madhava Reddy Siddareddygari <msiddare@cisco.com>
Signed-off-by: Venkat Garigipati <venkatg@cisco.com>
Cc: Billie Alsup <balsup@cisco.com>
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
This as a RFC, as we know 0xDF is a manufacturer specific register, and
cannot be added to the PMBus core driver. It was submitted to SONiC [1]
by Cisco engineers.
It’d be great if the maintainers good suggest how to easily implement a
custom driver for that PSU?
[1]: https://github.com/Azure/sonic-linux-kernel/pull/214
drivers/hwmon/pmbus/pmbus.c | 4 +++-
drivers/hwmon/pmbus/pmbus.h | 3 +++
drivers/hwmon/pmbus/pmbus_core.c | 38 ++++++++++++++++++++++++++++++++
3 files changed, 44 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/pmbus/pmbus.c b/drivers/hwmon/pmbus/pmbus.c
index d0d386990af5..df2a782a1105 100644
--- a/drivers/hwmon/pmbus/pmbus.c
+++ b/drivers/hwmon/pmbus/pmbus.c
@@ -60,8 +60,10 @@ static void pmbus_find_sensor_groups(struct i2c_client *client,
info->func[0] |= PMBUS_HAVE_TEMP2;
if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_3))
info->func[0] |= PMBUS_HAVE_TEMP3;
+ if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_4))
+ info->func[0] |= PMBUS_HAVE_TEMP4;
if (info->func[0] & (PMBUS_HAVE_TEMP | PMBUS_HAVE_TEMP2
- | PMBUS_HAVE_TEMP3)
+ | PMBUS_HAVE_TEMP3 | PMBUS_HAVE_TEMP4)
&& pmbus_check_byte_register(client, 0,
PMBUS_STATUS_TEMPERATURE))
info->func[0] |= PMBUS_HAVE_STATUS_TEMP;
diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h
index e0aa8aa46d8c..1522c8c7cade 100644
--- a/drivers/hwmon/pmbus/pmbus.h
+++ b/drivers/hwmon/pmbus/pmbus.h
@@ -135,6 +135,8 @@ enum pmbus_regs {
PMBUS_MFR_MAX_TEMP_2 = 0xC1,
PMBUS_MFR_MAX_TEMP_3 = 0xC2,
+ PMBUS_READ_TEMPERATURE_4 = 0xDF,
+
/*
* Virtual registers.
* Useful to support attributes which are not supported by standard PMBus
@@ -401,6 +403,7 @@ enum pmbus_sensor_classes {
#define PMBUS_HAVE_PWM12 BIT(20)
#define PMBUS_HAVE_PWM34 BIT(21)
#define PMBUS_HAVE_SAMPLES BIT(22)
+#define PMBUS_HAVE_TEMP4 BIT(23)
#define PMBUS_PHASE_VIRTUAL BIT(30) /* Phases on this page are virtual */
#define PMBUS_PAGE_VIRTUAL BIT(31) /* Page is virtual */
diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
index 776ee2237be2..b084b5ba6d45 100644
--- a/drivers/hwmon/pmbus/pmbus_core.c
+++ b/drivers/hwmon/pmbus/pmbus_core.c
@@ -1810,6 +1810,32 @@ static const struct pmbus_limit_attr temp_limit_attrs3[] = {
},
};
+static const struct pmbus_limit_attr temp_limit_attrs4[] = {
+ {
+ .reg = PMBUS_UT_WARN_LIMIT,
+ .low = true,
+ .attr = "min",
+ .alarm = "min_alarm",
+ .sbit = PB_TEMP_UT_WARNING,
+ }, {
+ .reg = PMBUS_UT_FAULT_LIMIT,
+ .low = true,
+ .attr = "lcrit",
+ .alarm = "lcrit_alarm",
+ .sbit = PB_TEMP_UT_FAULT,
+ }, {
+ .reg = PMBUS_OT_WARN_LIMIT,
+ .attr = "max",
+ .alarm = "max_alarm",
+ .sbit = PB_TEMP_OT_WARNING,
+ }, {
+ .reg = PMBUS_OT_FAULT_LIMIT,
+ .attr = "crit",
+ .alarm = "crit_alarm",
+ .sbit = PB_TEMP_OT_FAULT,
+ }
+};
+
static const struct pmbus_sensor_attr temp_attributes[] = {
{
.reg = PMBUS_READ_TEMPERATURE_1,
@@ -1847,6 +1873,18 @@ static const struct pmbus_sensor_attr temp_attributes[] = {
.gbit = PB_STATUS_TEMPERATURE,
.limit = temp_limit_attrs3,
.nlimit = ARRAY_SIZE(temp_limit_attrs3),
+ }, {
+ .reg = PMBUS_READ_TEMPERATURE_4,
+ .class = PSC_TEMPERATURE,
+ .paged = true,
+ .update = true,
+ .compare = true,
+ .func = PMBUS_HAVE_TEMP4,
+ .sfunc = PMBUS_HAVE_STATUS_TEMP,
+ .sbase = PB_STATUS_TEMP_BASE,
+ .gbit = PB_STATUS_TEMPERATURE,
+ .limit = temp_limit_attrs4,
+ .nlimit = ARRAY_SIZE(temp_limit_attrs4),
}
};
--
2.32.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [RFC][PATCH] hwmon: (pmbus) Support 4th PSU temperature sensor
2021-07-28 9:38 [RFC][PATCH] hwmon: (pmbus) Support 4th PSU temperature sensor Paul Menzel
@ 2021-07-28 9:40 ` Paul Menzel
2021-07-28 13:05 ` Guenter Roeck
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Paul Menzel @ 2021-07-28 9:40 UTC (permalink / raw)
To: Guenter Roeck, Jean Delvare
Cc: Guohan Lu, Madhava Reddy Siddareddygari, Venkat Garigipati,
Billie Alsup, linux-hwmon, linux-kernel
Dear Linux folks,
Am 28.07.21 um 11:38 schrieb Paul Menzel:
> From: Madhava Reddy Siddareddygari <msiddare@cisco.com>
>
> PSU650W has four temperature sensors, while the pmbus driver currently
> only support three temperature sensors.
>
> So, support a fourth temp sensor, i. e. PSU outlet temperature sensor,
> by copying what is done for temperature sensor 3, and use register 0xDF.
>
> PSU650W is based on LITE-ON vendor.
> LITE-ON MFG part numbers for the PSU are PS-2651-3SB5 Z and PS-2651-3SA5 Z.
>
> Signed-off-by: Madhava Reddy Siddareddygari <msiddare@cisco.com>
> Signed-off-by: Venkat Garigipati <venkatg@cisco.com>
> Cc: Billie Alsup <balsup@cisco.com>
> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
> ---
> This as a RFC, as we know 0xDF is a manufacturer specific register, and
> cannot be added to the PMBus core driver. It was submitted to SONiC [1]
> by Cisco engineers.
>
> It’d be great if the maintainers [could] suggest how to easily implement a
I meant *could* instead of *good*.
> custom driver for that PSU?
Kind regards,
Paul
> [1]: https://github.com/Azure/sonic-linux-kernel/pull/214
>
> drivers/hwmon/pmbus/pmbus.c | 4 +++-
> drivers/hwmon/pmbus/pmbus.h | 3 +++
> drivers/hwmon/pmbus/pmbus_core.c | 38 ++++++++++++++++++++++++++++++++
> 3 files changed, 44 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/pmbus/pmbus.c b/drivers/hwmon/pmbus/pmbus.c
> index d0d386990af5..df2a782a1105 100644
> --- a/drivers/hwmon/pmbus/pmbus.c
> +++ b/drivers/hwmon/pmbus/pmbus.c
> @@ -60,8 +60,10 @@ static void pmbus_find_sensor_groups(struct i2c_client *client,
> info->func[0] |= PMBUS_HAVE_TEMP2;
> if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_3))
> info->func[0] |= PMBUS_HAVE_TEMP3;
> + if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_4))
> + info->func[0] |= PMBUS_HAVE_TEMP4;
> if (info->func[0] & (PMBUS_HAVE_TEMP | PMBUS_HAVE_TEMP2
> - | PMBUS_HAVE_TEMP3)
> + | PMBUS_HAVE_TEMP3 | PMBUS_HAVE_TEMP4)
> && pmbus_check_byte_register(client, 0,
> PMBUS_STATUS_TEMPERATURE))
> info->func[0] |= PMBUS_HAVE_STATUS_TEMP;
> diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h
> index e0aa8aa46d8c..1522c8c7cade 100644
> --- a/drivers/hwmon/pmbus/pmbus.h
> +++ b/drivers/hwmon/pmbus/pmbus.h
> @@ -135,6 +135,8 @@ enum pmbus_regs {
> PMBUS_MFR_MAX_TEMP_2 = 0xC1,
> PMBUS_MFR_MAX_TEMP_3 = 0xC2,
>
> + PMBUS_READ_TEMPERATURE_4 = 0xDF,
> +
> /*
> * Virtual registers.
> * Useful to support attributes which are not supported by standard PMBus
> @@ -401,6 +403,7 @@ enum pmbus_sensor_classes {
> #define PMBUS_HAVE_PWM12 BIT(20)
> #define PMBUS_HAVE_PWM34 BIT(21)
> #define PMBUS_HAVE_SAMPLES BIT(22)
> +#define PMBUS_HAVE_TEMP4 BIT(23)
>
> #define PMBUS_PHASE_VIRTUAL BIT(30) /* Phases on this page are virtual */
> #define PMBUS_PAGE_VIRTUAL BIT(31) /* Page is virtual */
> diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
> index 776ee2237be2..b084b5ba6d45 100644
> --- a/drivers/hwmon/pmbus/pmbus_core.c
> +++ b/drivers/hwmon/pmbus/pmbus_core.c
> @@ -1810,6 +1810,32 @@ static const struct pmbus_limit_attr temp_limit_attrs3[] = {
> },
> };
>
> +static const struct pmbus_limit_attr temp_limit_attrs4[] = {
> + {
> + .reg = PMBUS_UT_WARN_LIMIT,
> + .low = true,
> + .attr = "min",
> + .alarm = "min_alarm",
> + .sbit = PB_TEMP_UT_WARNING,
> + }, {
> + .reg = PMBUS_UT_FAULT_LIMIT,
> + .low = true,
> + .attr = "lcrit",
> + .alarm = "lcrit_alarm",
> + .sbit = PB_TEMP_UT_FAULT,
> + }, {
> + .reg = PMBUS_OT_WARN_LIMIT,
> + .attr = "max",
> + .alarm = "max_alarm",
> + .sbit = PB_TEMP_OT_WARNING,
> + }, {
> + .reg = PMBUS_OT_FAULT_LIMIT,
> + .attr = "crit",
> + .alarm = "crit_alarm",
> + .sbit = PB_TEMP_OT_FAULT,
> + }
> +};
> +
> static const struct pmbus_sensor_attr temp_attributes[] = {
> {
> .reg = PMBUS_READ_TEMPERATURE_1,
> @@ -1847,6 +1873,18 @@ static const struct pmbus_sensor_attr temp_attributes[] = {
> .gbit = PB_STATUS_TEMPERATURE,
> .limit = temp_limit_attrs3,
> .nlimit = ARRAY_SIZE(temp_limit_attrs3),
> + }, {
> + .reg = PMBUS_READ_TEMPERATURE_4,
> + .class = PSC_TEMPERATURE,
> + .paged = true,
> + .update = true,
> + .compare = true,
> + .func = PMBUS_HAVE_TEMP4,
> + .sfunc = PMBUS_HAVE_STATUS_TEMP,
> + .sbase = PB_STATUS_TEMP_BASE,
> + .gbit = PB_STATUS_TEMPERATURE,
> + .limit = temp_limit_attrs4,
> + .nlimit = ARRAY_SIZE(temp_limit_attrs4),
> }
> };
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC][PATCH] hwmon: (pmbus) Support 4th PSU temperature sensor
2021-07-28 9:38 [RFC][PATCH] hwmon: (pmbus) Support 4th PSU temperature sensor Paul Menzel
2021-07-28 9:40 ` Paul Menzel
@ 2021-07-28 13:05 ` Guenter Roeck
2021-07-28 13:38 ` kernel test robot
2021-07-29 8:35 ` kernel test robot
3 siblings, 0 replies; 5+ messages in thread
From: Guenter Roeck @ 2021-07-28 13:05 UTC (permalink / raw)
To: Paul Menzel, Jean Delvare
Cc: Guohan Lu, Madhava Reddy Siddareddygari, Venkat Garigipati,
Billie Alsup, linux-hwmon, linux-kernel
On 7/28/21 2:38 AM, Paul Menzel wrote:
> From: Madhava Reddy Siddareddygari <msiddare@cisco.com>
>
> PSU650W has four temperature sensors, while the pmbus driver currently
> only support three temperature sensors.
>
> So, support a fourth temp sensor, i. e. PSU outlet temperature sensor,
> by copying what is done for temperature sensor 3, and use register 0xDF.
>
> PSU650W is based on LITE-ON vendor.
> LITE-ON MFG part numbers for the PSU are PS-2651-3SB5 Z and PS-2651-3SA5 Z.
>
> Signed-off-by: Madhava Reddy Siddareddygari <msiddare@cisco.com>
> Signed-off-by: Venkat Garigipati <venkatg@cisco.com>
> Cc: Billie Alsup <balsup@cisco.com>
> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
> ---
> This as a RFC, as we know 0xDF is a manufacturer specific register, and
> cannot be added to the PMBus core driver. It was submitted to SONiC [1]
> by Cisco engineers.
>
> It’d be great if the maintainers good suggest how to easily implement a
> custom driver for that PSU?
>
Implement a chip driver with a set of read/write functions.
Claim it has two pages, with the second page only implementing a single
temperature sensor. In the read/write functions, handle page 0 normally,
and access the second sensor whenever page 1 is accessed.
> [1]: https://github.com/Azure/sonic-linux-kernel/pull/214
The comments there are a bit concerning.
"* Virtual registers.
* Useful to support attributes which are not supported by standard PMBus
* registers but exist as manufacturer specific registers on individual chips.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* Must be mapped to real registers in device specific code.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"
Then,
"... is Manufacturer specific command. These are not Virtual registers."
Isn't that exactly what the "Virtual registers" description states ?
How can that be explained better ?
Either case, I see no need to define a virtual register for a 4th temperature
sensor. This can easily be implemented with the mechanism described above.
Guenter
>
> drivers/hwmon/pmbus/pmbus.c | 4 +++-
> drivers/hwmon/pmbus/pmbus.h | 3 +++
> drivers/hwmon/pmbus/pmbus_core.c | 38 ++++++++++++++++++++++++++++++++
> 3 files changed, 44 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/pmbus/pmbus.c b/drivers/hwmon/pmbus/pmbus.c
> index d0d386990af5..df2a782a1105 100644
> --- a/drivers/hwmon/pmbus/pmbus.c
> +++ b/drivers/hwmon/pmbus/pmbus.c
> @@ -60,8 +60,10 @@ static void pmbus_find_sensor_groups(struct i2c_client *client,
> info->func[0] |= PMBUS_HAVE_TEMP2;
> if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_3))
> info->func[0] |= PMBUS_HAVE_TEMP3;
> + if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_4))
> + info->func[0] |= PMBUS_HAVE_TEMP4;
> if (info->func[0] & (PMBUS_HAVE_TEMP | PMBUS_HAVE_TEMP2
> - | PMBUS_HAVE_TEMP3)
> + | PMBUS_HAVE_TEMP3 | PMBUS_HAVE_TEMP4)
> && pmbus_check_byte_register(client, 0,
> PMBUS_STATUS_TEMPERATURE))
> info->func[0] |= PMBUS_HAVE_STATUS_TEMP;
> diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h
> index e0aa8aa46d8c..1522c8c7cade 100644
> --- a/drivers/hwmon/pmbus/pmbus.h
> +++ b/drivers/hwmon/pmbus/pmbus.h
> @@ -135,6 +135,8 @@ enum pmbus_regs {
> PMBUS_MFR_MAX_TEMP_2 = 0xC1,
> PMBUS_MFR_MAX_TEMP_3 = 0xC2,
>
> + PMBUS_READ_TEMPERATURE_4 = 0xDF,
> +
> /*
> * Virtual registers.
> * Useful to support attributes which are not supported by standard PMBus
> @@ -401,6 +403,7 @@ enum pmbus_sensor_classes {
> #define PMBUS_HAVE_PWM12 BIT(20)
> #define PMBUS_HAVE_PWM34 BIT(21)
> #define PMBUS_HAVE_SAMPLES BIT(22)
> +#define PMBUS_HAVE_TEMP4 BIT(23)
>
> #define PMBUS_PHASE_VIRTUAL BIT(30) /* Phases on this page are virtual */
> #define PMBUS_PAGE_VIRTUAL BIT(31) /* Page is virtual */
> diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
> index 776ee2237be2..b084b5ba6d45 100644
> --- a/drivers/hwmon/pmbus/pmbus_core.c
> +++ b/drivers/hwmon/pmbus/pmbus_core.c
> @@ -1810,6 +1810,32 @@ static const struct pmbus_limit_attr temp_limit_attrs3[] = {
> },
> };
>
> +static const struct pmbus_limit_attr temp_limit_attrs4[] = {
> + {
> + .reg = PMBUS_UT_WARN_LIMIT,
> + .low = true,
> + .attr = "min",
> + .alarm = "min_alarm",
> + .sbit = PB_TEMP_UT_WARNING,
> + }, {
> + .reg = PMBUS_UT_FAULT_LIMIT,
> + .low = true,
> + .attr = "lcrit",
> + .alarm = "lcrit_alarm",
> + .sbit = PB_TEMP_UT_FAULT,
> + }, {
> + .reg = PMBUS_OT_WARN_LIMIT,
> + .attr = "max",
> + .alarm = "max_alarm",
> + .sbit = PB_TEMP_OT_WARNING,
> + }, {
> + .reg = PMBUS_OT_FAULT_LIMIT,
> + .attr = "crit",
> + .alarm = "crit_alarm",
> + .sbit = PB_TEMP_OT_FAULT,
> + }
> +};
> +
> static const struct pmbus_sensor_attr temp_attributes[] = {
> {
> .reg = PMBUS_READ_TEMPERATURE_1,
> @@ -1847,6 +1873,18 @@ static const struct pmbus_sensor_attr temp_attributes[] = {
> .gbit = PB_STATUS_TEMPERATURE,
> .limit = temp_limit_attrs3,
> .nlimit = ARRAY_SIZE(temp_limit_attrs3),
> + }, {
> + .reg = PMBUS_READ_TEMPERATURE_4,
> + .class = PSC_TEMPERATURE,
> + .paged = true,
> + .update = true,
> + .compare = true,
> + .func = PMBUS_HAVE_TEMP4,
> + .sfunc = PMBUS_HAVE_STATUS_TEMP,
> + .sbase = PB_STATUS_TEMP_BASE,
> + .gbit = PB_STATUS_TEMPERATURE,
> + .limit = temp_limit_attrs4,
> + .nlimit = ARRAY_SIZE(temp_limit_attrs4),
> }
> };
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC][PATCH] hwmon: (pmbus) Support 4th PSU temperature sensor
2021-07-28 9:38 [RFC][PATCH] hwmon: (pmbus) Support 4th PSU temperature sensor Paul Menzel
2021-07-28 9:40 ` Paul Menzel
2021-07-28 13:05 ` Guenter Roeck
@ 2021-07-28 13:38 ` kernel test robot
2021-07-29 8:35 ` kernel test robot
3 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-07-28 13:38 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4083 bytes --]
Hi Paul,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on hwmon/hwmon-next]
[also build test ERROR on v5.14-rc3 next-20210727]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Paul-Menzel/hwmon-pmbus-Support-4th-PSU-temperature-sensor/20210728-174022
base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
config: powerpc-randconfig-s031-20210728 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 10.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://github.com/0day-ci/linux/commit/a5972c52662d165d963025cb03ebc14bf638e310
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Paul-Menzel/hwmon-pmbus-Support-4th-PSU-temperature-sensor/20210728-174022
git checkout a5972c52662d165d963025cb03ebc14bf638e310
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/hwmon/pmbus/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/hwmon/pmbus/pmbus_core.c:1884:4: error: 'const struct pmbus_sensor_attr' has no member named 'sbase'
1884 | .sbase = PB_STATUS_TEMP_BASE,
| ^~~~~
>> drivers/hwmon/pmbus/pmbus_core.c:1884:12: error: 'PB_STATUS_TEMP_BASE' undeclared here (not in a function); did you mean 'PB_STATUS_TEMPERATURE'?
1884 | .sbase = PB_STATUS_TEMP_BASE,
| ^~~~~~~~~~~~~~~~~~~
| PB_STATUS_TEMPERATURE
vim +1884 drivers/hwmon/pmbus/pmbus_core.c
1838
1839 static const struct pmbus_sensor_attr temp_attributes[] = {
1840 {
1841 .reg = PMBUS_READ_TEMPERATURE_1,
1842 .class = PSC_TEMPERATURE,
1843 .paged = true,
1844 .update = true,
1845 .compare = true,
1846 .func = PMBUS_HAVE_TEMP,
1847 .sfunc = PMBUS_HAVE_STATUS_TEMP,
1848 .sreg = PMBUS_STATUS_TEMPERATURE,
1849 .gbit = PB_STATUS_TEMPERATURE,
1850 .limit = temp_limit_attrs,
1851 .nlimit = ARRAY_SIZE(temp_limit_attrs),
1852 }, {
1853 .reg = PMBUS_READ_TEMPERATURE_2,
1854 .class = PSC_TEMPERATURE,
1855 .paged = true,
1856 .update = true,
1857 .compare = true,
1858 .func = PMBUS_HAVE_TEMP2,
1859 .sfunc = PMBUS_HAVE_STATUS_TEMP,
1860 .sreg = PMBUS_STATUS_TEMPERATURE,
1861 .gbit = PB_STATUS_TEMPERATURE,
1862 .limit = temp_limit_attrs2,
1863 .nlimit = ARRAY_SIZE(temp_limit_attrs2),
1864 }, {
1865 .reg = PMBUS_READ_TEMPERATURE_3,
1866 .class = PSC_TEMPERATURE,
1867 .paged = true,
1868 .update = true,
1869 .compare = true,
1870 .func = PMBUS_HAVE_TEMP3,
1871 .sfunc = PMBUS_HAVE_STATUS_TEMP,
1872 .sreg = PMBUS_STATUS_TEMPERATURE,
1873 .gbit = PB_STATUS_TEMPERATURE,
1874 .limit = temp_limit_attrs3,
1875 .nlimit = ARRAY_SIZE(temp_limit_attrs3),
1876 }, {
1877 .reg = PMBUS_READ_TEMPERATURE_4,
1878 .class = PSC_TEMPERATURE,
1879 .paged = true,
1880 .update = true,
1881 .compare = true,
1882 .func = PMBUS_HAVE_TEMP4,
1883 .sfunc = PMBUS_HAVE_STATUS_TEMP,
> 1884 .sbase = PB_STATUS_TEMP_BASE,
1885 .gbit = PB_STATUS_TEMPERATURE,
1886 .limit = temp_limit_attrs4,
1887 .nlimit = ARRAY_SIZE(temp_limit_attrs4),
1888 }
1889 };
1890
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31979 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC][PATCH] hwmon: (pmbus) Support 4th PSU temperature sensor
2021-07-28 9:38 [RFC][PATCH] hwmon: (pmbus) Support 4th PSU temperature sensor Paul Menzel
` (2 preceding siblings ...)
2021-07-28 13:38 ` kernel test robot
@ 2021-07-29 8:35 ` kernel test robot
3 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-07-29 8:35 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5206 bytes --]
Hi Paul,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on hwmon/hwmon-next]
[also build test ERROR on v5.14-rc3 next-20210728]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Paul-Menzel/hwmon-pmbus-Support-4th-PSU-temperature-sensor/20210728-174022
base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
config: x86_64-randconfig-a011-20210728 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project c49df15c278857adecd12db6bb1cdc96885f7079)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/a5972c52662d165d963025cb03ebc14bf638e310
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Paul-Menzel/hwmon-pmbus-Support-4th-PSU-temperature-sensor/20210728-174022
git checkout a5972c52662d165d963025cb03ebc14bf638e310
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/hwmon/pmbus/pmbus_core.c:1884:12: error: use of undeclared identifier 'PB_STATUS_TEMP_BASE'
.sbase = PB_STATUS_TEMP_BASE,
^
>> drivers/hwmon/pmbus/pmbus_core.c:2169:10: error: invalid application of 'sizeof' to an incomplete type 'const struct pmbus_sensor_attr []'
ARRAY_SIZE(temp_attributes));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:44:32: note: expanded from macro 'ARRAY_SIZE'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~
drivers/hwmon/pmbus/pmbus_core.c:2216:12: error: invalid application of 'sizeof' to an incomplete type 'const struct pmbus_sensor_attr []'
.nattr = ARRAY_SIZE(temp_attributes),
^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:44:32: note: expanded from macro 'ARRAY_SIZE'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~
>> drivers/hwmon/pmbus/pmbus_core.c:2264:18: error: invalid application of 'sizeof' to an incomplete type 'const struct pmbus_class_attr_map []'
for (i = 0; i < ARRAY_SIZE(class_attr_map); i++) {
^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:44:32: note: expanded from macro 'ARRAY_SIZE'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~
4 errors generated.
vim +/PB_STATUS_TEMP_BASE +1884 drivers/hwmon/pmbus/pmbus_core.c
1838
1839 static const struct pmbus_sensor_attr temp_attributes[] = {
1840 {
1841 .reg = PMBUS_READ_TEMPERATURE_1,
1842 .class = PSC_TEMPERATURE,
1843 .paged = true,
1844 .update = true,
1845 .compare = true,
1846 .func = PMBUS_HAVE_TEMP,
1847 .sfunc = PMBUS_HAVE_STATUS_TEMP,
1848 .sreg = PMBUS_STATUS_TEMPERATURE,
1849 .gbit = PB_STATUS_TEMPERATURE,
1850 .limit = temp_limit_attrs,
1851 .nlimit = ARRAY_SIZE(temp_limit_attrs),
1852 }, {
1853 .reg = PMBUS_READ_TEMPERATURE_2,
1854 .class = PSC_TEMPERATURE,
1855 .paged = true,
1856 .update = true,
1857 .compare = true,
1858 .func = PMBUS_HAVE_TEMP2,
1859 .sfunc = PMBUS_HAVE_STATUS_TEMP,
1860 .sreg = PMBUS_STATUS_TEMPERATURE,
1861 .gbit = PB_STATUS_TEMPERATURE,
1862 .limit = temp_limit_attrs2,
1863 .nlimit = ARRAY_SIZE(temp_limit_attrs2),
1864 }, {
1865 .reg = PMBUS_READ_TEMPERATURE_3,
1866 .class = PSC_TEMPERATURE,
1867 .paged = true,
1868 .update = true,
1869 .compare = true,
1870 .func = PMBUS_HAVE_TEMP3,
1871 .sfunc = PMBUS_HAVE_STATUS_TEMP,
1872 .sreg = PMBUS_STATUS_TEMPERATURE,
1873 .gbit = PB_STATUS_TEMPERATURE,
1874 .limit = temp_limit_attrs3,
1875 .nlimit = ARRAY_SIZE(temp_limit_attrs3),
1876 }, {
1877 .reg = PMBUS_READ_TEMPERATURE_4,
1878 .class = PSC_TEMPERATURE,
1879 .paged = true,
1880 .update = true,
1881 .compare = true,
1882 .func = PMBUS_HAVE_TEMP4,
1883 .sfunc = PMBUS_HAVE_STATUS_TEMP,
> 1884 .sbase = PB_STATUS_TEMP_BASE,
1885 .gbit = PB_STATUS_TEMPERATURE,
1886 .limit = temp_limit_attrs4,
1887 .nlimit = ARRAY_SIZE(temp_limit_attrs4),
1888 }
1889 };
1890
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32848 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-07-29 8:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28 9:38 [RFC][PATCH] hwmon: (pmbus) Support 4th PSU temperature sensor Paul Menzel
2021-07-28 9:40 ` Paul Menzel
2021-07-28 13:05 ` Guenter Roeck
2021-07-28 13:38 ` kernel test robot
2021-07-29 8:35 ` kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.