Support pwm/tach driver for aspeed ast26xx
Subsystems (5)
Billy Tsai
reviewerv7 cover Support pwm/tach driver for aspeed ast26xx
Unlike the old design that the register setting of the TACH should based on the configure of the PWM. In ast26xx, the dependency between pwm and tach controller is eliminated and becomes a separate hardware block. One is used to provide pwm output and another is used to monitor the frequency of the input. This driver implements them by exposing two kernel
subsystems: PWM and HWMON. The PWM subsystem can be utilized alongside existing drivers for controlling elements such as fans (pwm-fan.c), beepers (pwm-beeper.c) and so on. Through the HWMON subsystem, the driver provides sysfs interfaces for fan.
Changes since v6:
Consolidate the PWM and TACH functionalities into a unified driver.
Changes since v5:
- pwm/tach:
- Remove the utilization of common resources from the parent node.
- Change the concept to 16 PWM/TACH controllers, each with one channel, instead of 1 PWM/TACH controller with 16 channels.
- dt-binding:
- Eliminate the usage of simple-mfd.
Changes since v4:
- pwm:
- Fix the return type of get_status function.
- tach:
- read clk source once and re-use it
- Remove the constants variables
- Allocate tach_channel as array
- Use dev->parent
- dt-binding:
- Fix the order of the patches
- Add example and description for tach child node
- Remove pwm extension property
Changes since v3:
- pwm:
- Remove unnecessary include header
- Fix warning Prefer "GPL" over "GPL v2"
- tach:
- Remove the paremeter min_rpm and max_rpm and return the tach value directly without any polling or delay.
- Fix warning Prefer "GPL" over "GPL v2"
- dt-binding:
- Replace underscore in node names with dashes
- Split per subsystem
Changes since v2:
- pwm:
- Use devm_* api to simplify the error cleanup
- Fix the multi-line alignment problem
- tach:
- Add tach-aspeed-ast2600 to index.rst
- Fix the multi-line alignment problem
- Remove the tach enable/disable when read the rpm
- Fix some coding format issue
Changes since v1:
- tach:
- Add the document tach-aspeed-ast2600.rst
- Use devm_* api to simplify the error cleanup.
- Change hwmon register api to devm_hwmon_device_register_with_info
Billy Tsai (2):
dt-bindings: hwmon: Support Aspeed g6 PWM TACH Control
hwmon: (aspeed-g6-pwm-tacho): Support for ASPEED g6 PWM/Fan tach
.../bindings/hwmon/aspeed,g6-pwm-tach.yaml | 57 ++ Documentation/hwmon/aspeed-g6-pwm-tach.rst | 24 + Documentation/hwmon/index.rst | 1 + drivers/hwmon/Kconfig | 11 + drivers/hwmon/Makefile | 1 + drivers/hwmon/aspeed-g6-pwm-tach.c | 530 ++++++++++++++++++ 6 files changed, 624 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml create mode 100644 Documentation/hwmon/aspeed-g6-pwm-tach.rst create mode 100644 drivers/hwmon/aspeed-g6-pwm-tach.c
Signature · 1 line
2.25.1
Billy Tsai
reviewerPATCH v7 1/2 dt-bindings: hwmon: Support Aspeed g6 PWM TACH Control
Document the compatible for aspeed,ast2600-pwm-tach device, which can support upto 16 PWM outputs and 16 fan tach input.
--- .../bindings/hwmon/aspeed,g6-pwm-tach.yaml | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml
Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml new file +57 -0
@@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2021 Aspeed, Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/aspeed,g6-pwm-tach.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ASPEED G6 PWM and Fan Tach controller device driver + +maintainers: + - Billy Tsai <[email protected]> + +description: | + The ASPEED PWM controller can support upto 16 PWM outputs. + The ASPEED Fan Tacho controller can support upto 16 fan tach input. + +properties: + compatible: + enum: + - aspeed,ast2600-pwm-tach + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + "#pwm-cells": + const: 3 + + aspeed,fan-tach-ch: + description: Specify the Fan tach input channels. + $ref: "/schemas/types.yaml#/definitions/uint8-array" + +required: + - reg + - clocks + - resets + - "#pwm-cells" + - compatible + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/aspeed-clock.h> + pwm_tach: pwm-tach-controller at 1e610000 { + compatible = "aspeed,ast2600-pwm-tach"; + reg = <0x1e610000 0x100>; + clocks = <&syscon ASPEED_CLK_AHB>; + resets = <&syscon ASPEED_RESET_PWM>; + #pwm-cells = <3>; + aspeed,fan-tach-ch = /bits/ 8 <0x00 0x02 0x4>; + };
Signature · 1 line
2.25.1
Rob Herring
maintainerRe: [PATCH v7 1/2] dt-bindings: hwmon: Support Aspeed g6 PWM TACH Control
Quoted 41 lines · Billy Tsai
Document the compatible for aspeed,ast2600-pwm-tach device, which can support upto 16 PWM outputs and 16 fan tach input.
Signed-off-by Billy Tsai <[email protected]>--- .../bindings/hwmon/aspeed,g6-pwm-tach.yaml | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yamlDocumentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml new file +26
-0@@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2021 Aspeed, Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/aspeed,g6-pwm-tach.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ASPEED G6 PWM and Fan Tach controller device driver + +maintainers: + - Billy Tsai <[email protected]> + +description: | + The ASPEED PWM controller can support upto 16 PWM outputs. + The ASPEED Fan Tacho controller can support upto 16 fan tach input. + +properties: + compatible: + enum: + - aspeed,ast2600-pwm-tach + + reg: + maxItems: 1 + + clocks: + maxItems: 1
Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml line 36
Quoted 10 lines
Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml new file +10
-0+ + resets: + maxItems: 1 + + "#pwm-cells": + const: 3 + + aspeed,fan-tach-ch: + description: Specify the Fan tach input channels. + $ref: "/schemas/types.yaml#/definitions/uint8-array"
This property is already defined in aspeed-pwm-tacho.txt as a single u8 that goes in a fan node. You can't redefine its type and location here.
To repeat what I've said in previous versions, work with others to define a common fan and fan controller binding. Otherwise, anything new with fan related properties is simply going to be rejected.
Rob
Billy Tsai
reviewerPATCH v7 1/2 dt-bindings: hwmon: Support Aspeed g6 PWM TACH Control
Quoted 46 lines · Billy Tsai
Quoted 46 lines
Document the compatible for aspeed,ast2600-pwm-tach device, which can support upto 16 PWM outputs and 16 fan tach input.
Signed-off-by Billy Tsai <[email protected]>--- .../bindings/hwmon/aspeed,g6-pwm-tach.yaml | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yamlDocumentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml new file +31
-0@@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2021 Aspeed, Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/aspeed,g6-pwm-tach.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ASPEED G6 PWM and Fan Tach controller device driver + +maintainers: + - Billy Tsai <[email protected]> + +description: | + The ASPEED PWM controller can support upto 16 PWM outputs. + The ASPEED Fan Tacho controller can support upto 16 fan tach input. + +properties: + compatible: + enum: + - aspeed,ast2600-pwm-tach + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + "#pwm-cells":
Quoted 8 lines
Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml line 36
Quoted 5 lines
Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml new file +5
-0+ const: 3 + + aspeed,fan-tach-ch: + description: Specify the Fan tach input channels. + $ref: "/schemas/types.yaml#/definitions/uint8-array"This property is already defined in aspeed-pwm-tacho.txt as a single u8 that goes in a fan node. You can't redefine its type and location here.
Hi Rob,
I didn't redefine the type of property. The type of the aspeed,fan-tach-ch is unit8-array in aspeed-pwm-tacho.txt.
https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/hwmon/aspeed-pwm-tacho.txt#L48
https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/hwmon/aspeed-pwm-tacho.txt#L71
Quoted 3 lines
To repeat what I've said in previous versions, work with others to define a common fan and fan controller binding. Otherwise, anything new with fan related properties is simply going to be rejected.
Okay I will try to work with Naresh for defining a common fan binding.
Thanks for your suggestion.
Hi Naresh,
As Rob mentioned, it would be advisable for my dt-bindings to reference the common fan bindings instead of introducing specific properties. I noticed that you have already submitted a related patch to the community, which seems to be pending for around 10 months.
https://lore.kernel.org/lkml/20221116213615.1256297-2-Naresh.Solanki at 9elements.com/
Do you have plans to send the next version of the patch? Alternatively, can I proceed to cherry-pick this version of the patch and continue with the upstreaming process in my patch serial?
Thanks
Best Regards,
Billy Tsai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linux-aspeed/attachments/20230828/97f9a230/attachment.htm>
Re: [PATCH v7 1/2] dt-bindings: hwmon: Support Aspeed g6 PWM TACH Control
Hi Billy,
Quoted 149 lines · Billy Tsai
Quoted 100 lines · Billy Tsai
Quoted 99 lines
Document the compatible for aspeed,ast2600-pwm-tach device, which can
support upto 16 PWM outputs and 16 fan tach input.
Signed-off-by Billy Tsai <[email protected]>---
.../bindings/hwmon/aspeed,g6-pwm-tach.yaml | 57 +++++++++++++++++++1 file changed, 57 insertions(+)create mode 100644 Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yamlDocumentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml +0
-0new file mode 100644
index 000000000000..1666304d0b0f
---
/dev/null+++
b/Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yamlDocumentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml +35
-0@@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2021 Aspeed, Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/aspeed,g6-pwm-tach.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ASPEED G6 PWM and Fan Tach controller device driver + +maintainers: + - Billy Tsai <[email protected]> + +description: | + The ASPEED PWM controller can support upto 16 PWM outputs. + The ASPEED Fan Tacho controller can support upto 16 fan tach input. + +properties: + compatible: + enum: + - aspeed,ast2600-pwm-tach + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + "#pwm-cells": + const: 3 + + aspeed,fan-tach-ch: + description: Specify the Fan tach input channels.Quoted 7 lines
Quoted 1 line
+ $ref: "/schemas/types.yaml#/definitions/uint8-array"
This property is already defined in aspeed-pwm-tacho.txt as a single u8
that goes in a fan node. You can't redefine its type and location here.
Hi Rob,
I didn't redefine the type of property. The type of the aspeed,fan-tach-ch is unit8-array
in aspeed-pwm-tacho.txt.
Quoted 5 lines
To repeat what I've said in previous versions, work with others to
define a common fan and fan controller binding. Otherwise, anything new
with fan related properties is simply going to be rejected.
Okay I will try to work with Naresh for defining a common fan binding.
Thanks for your suggestion.
Hi Naresh,
As Rob mentioned, it would be advisable for my dt-bindings to reference the common fan bindings instead of introducing specific properties.
Quoted 7 lines
I noticed that you have already submitted a related patch to the community, which seems to be pending for around 10 months.
https://lore.kernel.org/lkml/20221116213615.1256297-2-Naresh.Solanki at 9elements.com/
Do you have plans to send the next version of the patch? Alternatively, can I proceed to cherry-pick this version of the patch and continue with
the upstreaming process in my patch serial?
Sure, go ahead.
Regards,
Naresh
Quoted 8 lines
Thanks
Best Regards,
Billy Tsai
Billy Tsai
reviewerRe: [PATCH v7 1/2] dt-bindings: hwmon: Support Aspeed g6 PWM TACH Control
In reply to Rob HerringQuoted 46 lines · Billy Tsai
Quoted 46 lines
Document the compatible for aspeed,ast2600-pwm-tach device, which can support upto 16 PWM outputs and 16 fan tach input.
Signed-off-by Billy Tsai <[email protected]>--- .../bindings/hwmon/aspeed,g6-pwm-tach.yaml | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yamlDocumentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml new file +31
-0@@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2021 Aspeed, Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/aspeed,g6-pwm-tach.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ASPEED G6 PWM and Fan Tach controller device driver + +maintainers: + - Billy Tsai <[email protected]> + +description: | + The ASPEED PWM controller can support upto 16 PWM outputs. + The ASPEED Fan Tacho controller can support upto 16 fan tach input. + +properties: + compatible: + enum: + - aspeed,ast2600-pwm-tach + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + "#pwm-cells":
Quoted 8 lines
Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml line 36
Quoted 5 lines
Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml new file +5
-0+ const: 3 + + aspeed,fan-tach-ch: + description: Specify the Fan tach input channels. + $ref: "/schemas/types.yaml#/definitions/uint8-array"This property is already defined in aspeed-pwm-tacho.txt as a single u8 that goes in a fan node. You can't redefine its type and location here.
Hi Rob,
I didn't redefine the type of property. The type of the aspeed,fan-tach-ch is unit8-array in aspeed-pwm-tacho.txt.
https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/hwmon/aspeed-pwm-tacho.txt#L48
https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/hwmon/aspeed-pwm-tacho.txt#L71
Quoted 3 lines
To repeat what I've said in previous versions, work with others to define a common fan and fan controller binding. Otherwise, anything new with fan related properties is simply going to be rejected.
Okay I will try to work with Naresh for defining a common fan binding.
Thanks for your suggestion.
Hi Naresh,
As Rob mentioned, it would be advisable for my dt-bindings to reference the common fan bindings instead of introducing specific properties. I noticed that you have already submitted a related patch to the community, which seems to be pending for around 10 months.
https://lore.kernel.org/lkml/20221116213615.1256297-2-Naresh.Solanki at 9elements.com/
Do you have plans to send the next version of the patch? Alternatively, can I proceed to cherry-pick this version of the patch and continue with the upstreaming process in my patch serial?
Thanks
Best Regards,
Billy Tsai
Billy Tsai
reviewerPATCH v7 2/2 hwmon: (aspeed-g6-pwm-tacho): Support for ASPEED g6 PWM/Fan tach
In reply to Billy TsaiThe driver support two functions: PWM and Tachometer. The PWM feature can handle up to 16 output ports, while the Tachometer can monitor to up to 16 input ports as well. This driver implements them by exposing two kernel
subsystems: PWM and HWMON. The PWM subsystem can be utilized alongside existing drivers for controlling elements such as fans (pwm-fan.c), beepers (pwm-beeper.c) and so on. Through the HWMON subsystem, the driver provides sysfs interfaces for fan.
--- Documentation/hwmon/aspeed-g6-pwm-tach.rst | 24 + Documentation/hwmon/index.rst | 1 + drivers/hwmon/Kconfig | 11 + drivers/hwmon/Makefile | 1 + drivers/hwmon/aspeed-g6-pwm-tach.c | 530 +++++++++++++++++++++ 5 files changed, 567 insertions(+) create mode 100644 Documentation/hwmon/aspeed-g6-pwm-tach.rst create mode 100644 drivers/hwmon/aspeed-g6-pwm-tach.c
Documentation/hwmon/aspeed-g6-pwm-tach.rst new file +24 -0
@@ -0,0 +1,24 @@ +Kernel driver aspeed-g6-pwm-tach +================================= + +Supported chips: + ASPEED AST2600 + +Authors: + <[email protected]> + +Description: +------------ +This driver implements support for ASPEED AST2600 Fan Tacho controller. +The controller supports up to 16 tachometer inputs. + +The driver provides the following sensor accesses in sysfs: + +=============== ======= ====================================================== +fanX_input ro provide current fan rotation value in RPM as reported + by the fan to the device. +fanX_div rw Fan divisor: Supported value are power of 4 (1, 4, 16 + 64, ... 4194304) + The larger divisor, the less rpm accuracy and the less + affected by fan signal glitch. +=============== ======= ======================================================
Documentation/hwmon/index.rst +1 -0
@@ -43,6 +43,7 @@ Hardware Monitoring Kernel Drivers aquacomputer_d5next asb100 asc7621 + aspeed-g6-pwm-tach aspeed-pwm-tacho asus_ec_sensors asus_wmi_sensors
drivers/hwmon/Kconfig +11 -0
@@ -411,6 +411,17 @@ config SENSORS_ASPEED This driver can also be built as a module. If so, the module will be called aspeed_pwm_tacho. +config SENSORS_ASPEED_G6 + tristate "ASPEED g6 PWM and Fan tach driver" + depends on ARCH_ASPEED || COMPILE_TEST + depends on PWM + help + This driver provides support for ASPEED G6 PWM and Fan Tach + controllers. + + This driver can also be built as a module. If so, the module + will be called aspeed_pwm_tacho. + config SENSORS_ATXP1 tristate "Attansic ATXP1 VID controller" depends on I2C
drivers/hwmon/Makefile +1 -0
@@ -54,6 +54,7 @@ obj-$(CONFIG_SENSORS_ARM_SCPI) += scpi-hwmon.o obj-$(CONFIG_SENSORS_AS370) += as370-hwmon.o obj-$(CONFIG_SENSORS_ASC7621) += asc7621.o obj-$(CONFIG_SENSORS_ASPEED) += aspeed-pwm-tacho.o +obj-$(CONFIG_SENSORS_ASPEED_G6) += aspeed-g6-pwm-tach.o obj-$(CONFIG_SENSORS_ATXP1) += atxp1.o obj-$(CONFIG_SENSORS_AXI_FAN_CONTROL) += axi-fan-control.o obj-$(CONFIG_SENSORS_BT1_PVT) += bt1-pvt.o
drivers/hwmon/aspeed-g6-pwm-tach.c new file +530 -0
530 lines not on this page · raw message
Signature · 1 line
2.25.1
kernel test robot
build botRe: [PATCH v7 2/2] hwmon: (aspeed-g6-pwm-tacho): Support for ASPEED g6 PWM/Fan tach
kernel test robot noticed the following build warnings:
Hi Billy,
kernel test robot noticed the following build warnings:
[auto build test WARNING on groeck-staging/hwmon-next]
[also build test WARNING on linus/master v6.5-rc6 next-20230817] [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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Billy-Tsai/dt-bindings-hwmon-Support-Aspeed-g6-PWM-TACH-Control/20230817-200427 base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next patch link: https://lore.kernel.org/r/20230817120029.221484-3-billy_tsai%40aspeedtech.com patch subject: [PATCH v7 2/2] hwmon: (aspeed-g6-pwm-tacho): Support for ASPEED g6 PWM/Fan tach config: powerpc-randconfig-r011-20230818 (https://download.01.org/0day-ci/archive/20230818/202308180218.lgWU1tp1-lkp at intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a) reproduce: (https://download.01.org/0day-ci/archive/20230818/202308180218.lgWU1tp1-lkp at intel.com/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/202308180218.lgWU1tp1-lkp at intel.com/
All warnings (new ones prefixed by >>):
>> drivers/hwmon/aspeed-g6-pwm-tach.c:431:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
431 | int ret, count;
| ^1 warning generated.
vim +/ret +431 drivers/hwmon/aspeed-g6-pwm-tach.c
426
427 static int aspeed_tach_create_fan(struct device *dev,
428 struct aspeed_pwm_tach_data *priv)
429 {
430 u8 *tach_ch;
> 431 int ret, count;
432
433 count = of_property_count_u8_elems(dev->of_node, "aspeed,fan-tach-ch");
434 if (count < 1)
435 return -EINVAL;
436 tach_ch = devm_kcalloc(dev, count, sizeof(*tach_ch), GFP_KERNEL);
437 if (!tach_ch)
438 return -ENOMEM;
439 ret = of_property_read_u8_array(dev->of_node, "aspeed,fan-tach-ch",
440 tach_ch, count);
441
442 aspeed_present_fan_tach(priv, tach_ch, count);
443
444 return 0;
445 }
446
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
kernel test robot
build botRe: [PATCH v7 2/2] hwmon: (aspeed-g6-pwm-tacho): Support for ASPEED g6 PWM/Fan tach
In reply to Billy Tsaikernel test robot noticed the following build warnings:
Hi Billy,
kernel test robot noticed the following build warnings:
[auto build test WARNING on groeck-staging/hwmon-next]
[also build test WARNING on linus/master v6.5-rc6 next-20230817] [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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Billy-Tsai/dt-bindings-hwmon-Support-Aspeed-g6-PWM-TACH-Control/20230817-200427 base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next patch link: https://lore.kernel.org/r/20230817120029.221484-3-billy_tsai%40aspeedtech.com patch subject: [PATCH v7 2/2] hwmon: (aspeed-g6-pwm-tacho): Support for ASPEED g6 PWM/Fan tach config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230818/202308180900.0ecFnDBI-lkp at intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce: (https://download.01.org/0day-ci/archive/20230818/202308180900.0ecFnDBI-lkp at intel.com/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/202308180900.0ecFnDBI-lkp at intel.com/
All warnings (new ones prefixed by >>):
drivers/hwmon/aspeed-g6-pwm-tach.c: In function 'aspeed_tach_create_fan':
>> drivers/hwmon/aspeed-g6-pwm-tach.c:431:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
431 | int ret, count;
| ^~~vim +/ret +431 drivers/hwmon/aspeed-g6-pwm-tach.c
426
427 static int aspeed_tach_create_fan(struct device *dev,
428 struct aspeed_pwm_tach_data *priv)
429 {
430 u8 *tach_ch;
> 431 int ret, count;
432
433 count = of_property_count_u8_elems(dev->of_node, "aspeed,fan-tach-ch");
434 if (count < 1)
435 return -EINVAL;
436 tach_ch = devm_kcalloc(dev, count, sizeof(*tach_ch), GFP_KERNEL);
437 if (!tach_ch)
438 return -ENOMEM;
439 ret = of_property_read_u8_array(dev->of_node, "aspeed,fan-tach-ch",
440 tach_ch, count);
441
442 aspeed_present_fan_tach(priv, tach_ch, count);
443
444 return 0;
445 }
446
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki