A multi-channel fan control method, device, equipment, and storage medium
Patent Information
- Application Number
- CN202210777499.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-01
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2042-07-01
AI Technical Summary
[0004]本申请实施例提供一种多路风扇控制方法、装置、设备及存储介质,以解决现有技术中风扇控制逻辑较为单一,无法满足不同客户对多路风扇系统的控制需求的技术问题,提高对多路风扇控制的灵活性,可满足不同客户对多路风扇系统的控制需求
[0016]在第四方面,本申请实施例提供了一种存储计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如第一方面所述的多路风扇控制方法。
Smart Images

Figure CN117365984B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of fan control technology, and in particular to a multi-channel fan control method, apparatus, device, and storage medium. Background Technology
[0002] Traditional multi-fan control typically includes three methods: GPIO control, single-channel PWM control, and PWM plus temperature sensor control. GPIO control powers the fans via a single power supply output from the main controller; PWM control controls the fan speed via a single PWM signal; and PWM plus temperature sensor control adjusts the fan speed based on the detected temperature.
[0003] Different multi-fan systems have different fan control requirements, and traditional fan control logic is relatively simple and cannot meet the control needs of different customers for multi-fan systems. Summary of the Invention
[0004] This application provides a multi-channel fan control method, apparatus, device, and storage medium to solve the technical problem that the fan control logic in the prior art is relatively simple and cannot meet the control needs of different customers for multi-channel fan systems, thereby improving the flexibility of multi-channel fan control and meeting the control needs of different customers for multi-channel fan systems.
[0005] In a first aspect, embodiments of this application provide a multi-channel fan control method, comprising:
[0006] The enabled control functions and the number of functions are determined based on the device tree file, and function objects are constructed based on the enabled control functions and the number of functions. The device tree file is configured based on the control requirements of the multi-channel fan.
[0007] Configure the object parameters of the function object according to the configuration information of different control functions in the device tree file;
[0008] The multi-channel fan is controlled based on the object parameters through the functional object.
[0009] In a second aspect, embodiments of this application provide a multi-channel fan control device, including an object construction module, an object configuration module, and a fan control module, wherein:
[0010] The object construction module is used to determine the enabled control functions and the number of functions according to the device tree file, and to construct function objects according to the enabled control functions and the number of functions. The device tree file is configured based on the control requirements of multi-channel fans.
[0011] The object configuration module is used to configure the object parameters of the function object according to the configuration information of different control functions in the device tree file;
[0012] The fan control module is used to control multiple fans based on the object parameters through the functional object.
[0013] In a third aspect, embodiments of this application provide a multi-channel fan control device, including: a memory and one or more processors;
[0014] The memory is used to store one or more programs;
[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the multi-fan control method as described in the first aspect.
[0016] In a fourth aspect, embodiments of this application provide a storage medium for storing computer-executable instructions, which, when executed by a computer processor, are used to perform the multi-fan control method as described in the first aspect.
[0017] This application embodiment determines the control functions and the number of functions to be enabled based on the device tree file, constructs corresponding function objects according to the required control functions and the number of functions, and configures the object parameters of the constructed function objects according to the configuration information of different control functions in the device tree file. The function objects control multiple fans based on the configured object parameters. The corresponding device tree file can be configured for the control requirements of multiple fans, realizing the control requirements of different multi-fan systems, improving the flexibility of multi-fan control, and meeting the control requirements of different customers for multi-fan systems. Attached Figure Description
[0018] Figure 1 This is a flowchart of a multi-channel fan control method provided in an embodiment of this application;
[0019] Figure 2 This is a schematic diagram of the structure of a multi-channel fan control system provided in an embodiment of this application;
[0020] Figure 3 This is a schematic diagram of a functional object construction process provided in an embodiment of this application;
[0021] Figure 4 This is a schematic diagram of an object parameter configuration process provided in an embodiment of this application;
[0022] Figure 5 This is a schematic diagram of a functional object management framework provided in an embodiment of this application;
[0023] Figure 6This is a schematic diagram of a process for controlling multiple fans according to an embodiment of this application;
[0024] Figure 7 This is a schematic diagram of the structure of a multi-channel fan control device provided in an embodiment of this application;
[0025] Figure 8 This is a schematic diagram of the structure of a multi-channel fan control device provided in an embodiment of this application. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but additional steps not included in the drawings may also be present. The above process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0027] Figure 1 A flowchart of a multi-channel fan control method provided in an embodiment of this application is given. The multi-channel fan control method provided in this embodiment of the application can be executed by a multi-channel fan control device, which can be implemented by hardware and / or software and integrated into a multi-channel fan control device.
[0028] The following description uses a multi-fan control device to implement multi-fan control as an example. (Reference) Figure 1 The multi-fan control method includes:
[0029] S110: Determine the enabled control functions and the number of functions based on the device tree file, and construct function objects based on the enabled control functions and the number of functions. The device tree file is configured based on the control requirements of the multi-channel fan.
[0030] This solution provides a multi-fan control method for controlling multiple fans in a multi-fan control system. Taking a multi-fan control system on a projection platform as an example, the hardware design of the projection platform needs to be based on the customer's hardware platform, and different customers may have different hardware design possibilities. The traditional solution is to design separate multi-fan control drivers for different projection platforms of different customers. However, the fan control logic in existing technologies is relatively simple and difficult to meet the control needs of different customers for multi-fan systems. To solve the above technical problems, this solution records the configuration information related to the control of the multi-fan system through a Device Tree Source file. When the multi-fan driver is started, the configuration information in the Device Tree Source file is parsed sequentially, and the corresponding functional objects are constructed and configured according to the configuration information. The multi-fans are then controlled through these functional objects. This solution allows for configuration of the Device Tree Source file according to the control needs of different multi-fan systems, enabling flexible configuration of combinations of different control requirements, improving the flexibility of multi-fan control, and meeting the control needs of different customers for multi-fan systems.
[0031] Figure 2 This is a schematic diagram of a multi-channel fan control system provided in an embodiment of this application, as shown below. Figure 2 As shown, the multi-fan control system includes multiple fans (fans 1-4, a total of 4 fans), multiple power-on enable interfaces (GPIOM_21 and GPIOM_26, a total of 2 power-on enable interfaces), multiple speed control interfaces (PWM_D and PWM_F, a total of 2 speed control interfaces), and multiple temperature detection interfaces (CH0, CH1, and CH2, a total of 3 temperature detection interfaces). The power-on enable interfaces control the power-on of the connected fans. The speed control interfaces send speed control signals (e.g., PWM signals) to the connected fans to control their speed. The temperature detection interfaces detect the temperature at the detection location and output the corresponding detection value. For example, the power-on enable interface GPIOM_21 and the speed control interface PWM_F are connected to both fan 1 and fan 2, and the temperature detection interface CH0 is connected to the speed control interface PWM_F to detect the ambient temperature. The power-on enable interface GPIOM_26 and the speed control interface PWM_D are connected to both fans 3 and 4. The temperature detection interface CH1 is connected to the speed control interface PWM_D and is used to detect the LED screen temperature. The temperature detection interface CH2 is connected to the backlight brightness adjustment device and is used to detect the backlight temperature.
[0032] For example, a device tree file is configured according to the control requirements of the multi-fan system. This configuration file contains the corresponding information (e.g., the control functions to be enabled when controlling the multi-fan system, and the number of functions corresponding to each function). The device tree file is then loaded into the multi-fan control device. After the multi-fan driver is loaded and started, the configuration information in the device tree file is loaded and parsed. Based on this information, the control functions to be enabled and their number are determined.
[0033] In one possible embodiment, the control functions provided by this solution include power-on control (GPIO function), speed regulation (PWM function), and temperature detection (NTC function). Correspondingly, the control function for controlling multiple fans can be a combination of one or more of these functions. The power-on control function can be understood as controlling the power-on of the fans. When the fans are powered on, a speed control signal can be sent to control their rotation; when the fans are powered off, they stop working. The speed regulation function can be understood as controlling the fan speed, for example, by sending PWM signals with different duty cycles to control the fan speed. The temperature detection function can be understood as detecting the temperature at locations requiring temperature detection (e.g., the environment where the projection platform is located, the screen, backlight, etc.) and outputting the corresponding detection output value. The temperature at the detection location can be determined based on the detection output value.
[0034] Correspondingly, such as Figure 3 The provided schematic diagram illustrates a functional object construction process. When constructing a functional object based on the enabled control functions and the number of functions, this solution includes:
[0035] S111: When it is determined that the enabled control functions include power-on control functions, construct the corresponding number of power-on control function objects; and / or
[0036] S112: When it is determined that the enabled control functions include speed regulation functions, construct speed regulation function objects of the corresponding number of functions; and / or
[0037] When S113 determines that the enabled control function includes temperature detection function, it constructs a temperature function object with the corresponding number of functions.
[0038] For example, when configuring the device tree file, the achievable control functions and the number of each control function are determined based on the hardware of the multi-fan control device to be controlled. Further, based on the achievable control functions and the number of functions, the control functions to be enabled and their number are determined according to the control requirements of the multi-fan system. It is understood that the number of enabled control functions must be determined within the limitations of the control functions and their number provided by the hardware of the multi-fan control device. The number of enabled control functions can be the same as or less than the number of control functions provided by the hardware of the multi-fan control device (for example, in some controls of the multi-fan system, all control functions are required, while in other controls, some control functions are not needed).
[0039] For example, the hardware of a multi-channel fan control device is equipped with control functions including power-on control, speed regulation, and temperature detection. Furthermore, the power-on control, speed regulation, and temperature detection functions are all configured to be multi-channel. In other words, the hardware of a multi-channel fan control device is equipped with control functions that can power on multiple fans, control their speed, and detect temperatures at multiple locations.
[0040] Specifically, when starting the fan driver and parsing the device tree file, the system determines the supported control functions declared in the device tree file's configuration information. For example, if it determines that power-on control is supported, it constructs and initializes the corresponding number of power-on control function objects and enables them. If it determines that speed control is supported, it constructs and initializes the corresponding number of speed control function objects and enables them. If it determines that temperature detection is supported, it constructs and initializes the corresponding number of temperature detection function objects and enables them.
[0041] S120: Configure the object parameters of the function object based on the configuration information of different control functions in the device tree file.
[0042] For example, after constructing the functional objects, the object parameters of each functional object are configured according to the configuration information of different control functions in the device tree file. These object parameters can serve as the basis for controlling multiple fans.
[0043] Optionally, after constructing the functional objects and configuring the object parameters according to the device tree file, the object parameters or key parameters set for each functional object can be printed (dumped) to facilitate debugging of the multi-fan system or device tree file.
[0044] The control functions provided by this solution include one or more combinations of power-on control function, speed regulation function, and temperature detection function. Correspondingly, when configuring the object parameters of the function object according to the configuration information of different control functions in the device tree file, this solution may initialize the power-on control parameters of the constructed power-on control function object according to the power-on configuration information of the power-on control function in the device tree file; and / or initialize the speed regulation function parameters of the constructed speed regulation function object according to the speed regulation configuration information of the speed regulation function in the device tree file; and / or initialize the temperature function parameters of the constructed temperature function object according to the temperature configuration information of the temperature detection function in the device tree file.
[0045] For example, when constructing a power-on control function object corresponding to a power-on control function, the power-on configuration information for the power-on control function in the corresponding branch is read from the device tree file, and the power-on control parameters of the constructed power-on control function object are initialized according to the power-on configuration information. When constructing a speed regulation function object corresponding to a speed regulation function, the speed regulation configuration information for the speed regulation function in the corresponding branch is read from the device tree file, and the speed regulation function parameters of the constructed speed regulation function object are initialized according to the speed regulation configuration information. When constructing a temperature function object corresponding to a temperature detection function, the temperature configuration information for the temperature detection function in the corresponding branch is read from the device tree file, and the temperature function parameters of the constructed temperature function object are initialized according to the temperature configuration information.
[0046] In one possible embodiment, the speed regulation function object provided by this solution includes a speed regulation control object, a speed regulation parameter object, and a speed regulation curve table object. The speed regulation function parameters corresponding to the speed regulation control object, the speed regulation parameter object, and the speed regulation curve table object are respectively the speed regulation control parameter, the control corresponding parameter, and the speed curve table corresponding to the speed regulation curve table object. The temperature function object includes a temperature channel object, a temperature parameter object, and a temperature curve table object, and the temperature function parameters corresponding to the temperature channel object, the temperature parameter object, and the temperature curve table object are the channel parameter, the control corresponding parameter, and the temperature curve table. Based on this, as... Figure 4 The provided diagram illustrates an object parameter configuration process. This solution includes the following steps when configuring object parameters for a functional object:
[0047] S121: Based on the power-on configuration information of the power-on control function in the device tree file, initialize the power-on control parameters of the constructed power-on control function object; and / or
[0048] S122: Based on the speed control configuration information of the speed control function in the device tree file, initialize the speed control parameters corresponding to the speed control object, the control parameters corresponding to the speed parameter object, and the speed curve table corresponding to the speed curve table object in the constructed speed control function object; and / or
[0049] S123: Based on the temperature configuration information of the temperature detection function in the device tree file, initialize the channel parameters corresponding to the temperature channel object, the control parameters corresponding to the temperature parameter object, and the temperature curve table corresponding to the temperature curve table object in the constructed temperature function object.
[0050] For example, after constructing the power-on control function object corresponding to the power-on control function, the power-on configuration information for the corresponding path's power-on control function is read from the device tree file, and the power-on control parameters of the corresponding power-on control function object are configured based on the power-on configuration information to complete the initialization of the constructed power-on control function object. The power-on control parameters can be used to indicate the power-on enable strategy for fans on different paths under different application scenarios (e.g., the GPIO interface that the fan needs to control, the identifier corresponding to the GPIO interface, whether power-on is enabled, etc.).
[0051] When constructing a speed control function object (which includes a speed control object, a speed parameter object, and a speed curve table object), the speed configuration information for the corresponding path's speed control function is read from the device tree file. Based on this configuration information, the speed control parameters corresponding to the speed control object, the control parameters corresponding to the speed parameter object, and the speed curve table corresponding to the speed curve table object are configured to complete the initialization of the speed control object, speed parameter object, and speed curve table object within the speed control function object. The speed control parameters can be used to indicate the speed control strategy, PWM signal frequency, and PWM signal period for fans on different paths under different application scenarios. The control parameters can be used to indicate the current ambient temperature of the fan, the current speed control signal controlling the fan (e.g., the PWM signal duty cycle), and the corresponding fan temperature under the speed control signal. The speed curve table can be used to record the correspondence between different temperatures, speed control signals (PWM signal duty cycles), and fan speeds. The required speed control signal or fan speed can be determined based on the temperature at the corresponding detection location.
[0052] When constructing a temperature function object (which includes temperature channel objects, temperature parameter objects, and temperature curve table objects), the temperature configuration information for the corresponding temperature detection function is read from the device tree file. Based on this configuration information, the channel parameters corresponding to the temperature channel object, the control parameters corresponding to the temperature parameter object, and the temperature curve table corresponding to the temperature curve table object are configured to complete the initialization of the temperature channel object, temperature parameter object, and temperature curve table object within the temperature function object. Specifically, the channel parameters indicate the channel identifier of the corresponding temperature sensor, the control parameters record the detection output value of the temperature sensor, the corresponding ADC value, and the corresponding temperature value, and the temperature curve table records the temperature values corresponding to different ADC values.
[0053] In one possible embodiment, such as Figure 5 As shown in the schematic diagram of a functional object management framework, the speed control object (pwm_object) provided in this solution is managed through a speed control object set (pwm_object_set), the speed parameter object (pwm_item) is managed through a speed parameter object set (pwm_item_set), the speed curve table object (pwm_table) is managed through a speed curve table object set (pwm_table_set), the temperature channel object (iio_channel) is managed through a temperature channel object set (customer_chan), and the temperature parameter object (ntc_item) is managed through a temperature parameter object set (ntc_item_set). The temperature curve table object... (ntc_table) is managed through the temperature profile table object set (ntc_table_set), the power-on control function object (gpio_object) is managed through the power-on control function object set (customer_gpio), the speed regulation parameter object set, the speed regulation control object set, and the speed regulation profile table object set are managed through the speed regulation function object set (customer_pwm), the temperature channel object set, the temperature parameter object set, and the temperature profile table object set are managed through the temperature function object set (customer_ntc), and the power-on control function object set, the speed regulation function object set, and the temperature function object set are managed through the multi-fan management set (customer_fan_info). Among them, the multi-fan management set records the addresses of different functional object sets through a first-level pointer. Different functional object sets such as the power-on control functional object set, speed regulation functional object set, and temperature functional object set record the addresses of different functional objects (e.g., power-on control functional object, speed regulation functional object, and temperature functional object) through a second-level pointer. Different functional objects record the addresses of different sub-functional objects (e.g., the speed regulation control object, speed regulation parameter object, and speed regulation curve table object corresponding to the speed regulation functional object) through a third-level pointer. Different sub-functional objects record the addresses of different object parameters (e.g., the speed curve table corresponding to the speed regulation curve table object) through a fourth-level pointer.
[0054] S130: Controls multiple fans based on object parameters through a function object.
[0055] For example, after configuring the object parameters corresponding to each functional object according to the device tree file, each functional object controls the multi-channel fans according to the configured object parameters. The functional objects provided in this solution can be one or more combinations of power-on control functions, speed regulation functions, and temperature functions.
[0056] In one possible embodiment, such as Figure 6 The provided flowchart illustrates a method for controlling multiple fans. This solution, when controlling multiple fans based on object parameters through a functional object, includes:
[0057] S131: Enable the power-on of multiple fans by controlling the power-on control parameters corresponding to the power-on control function object; and / or
[0058] S132: Control the speed of multiple fans by using the speed control parameters corresponding to the speed control object in the speed control function object, the control parameters corresponding to the speed parameter object, and the speed curve table corresponding to the speed curve table object; and / or
[0059] S133: Temperature monitoring is performed through the channel parameters corresponding to the temperature channel object, the temperature status parameters corresponding to the temperature parameter object, and the temperature curve table corresponding to the temperature curve table object in the temperature function object.
[0060] For example, when the functional object includes a power-on control functional object, the power-on control functional object, in conjunction with the current application scenario, determines whether to enable the fan of the corresponding channel based on the power-on control parameters corresponding to each channel's power-on control functional object, and sends the corresponding power-on enable control signal to the fan's GPIO power-on control interface to control whether the corresponding fan is enabled for power-on.
[0061] When the functional object includes a speed regulation functional object, the speed regulation functional object determines the speed regulation control signal for the corresponding road fan based on the speed regulation control parameters corresponding to the speed regulation control object, the control parameters corresponding to the speed regulation parameter object, and the speed curve table corresponding to the speed regulation curve table object, and sends the speed regulation control signal to the corresponding road fan to control the fan speed.
[0062] In one possible embodiment, when this solution controls the speed of multiple fans through the speed control parameters corresponding to the speed control object in the speed control function object, the control parameters corresponding to the speed parameter object, and the speed curve table corresponding to the speed curve table object, it includes:
[0063] S1321: Determine the temperature information of multiple temperature sensors by using the temperature status parameters corresponding to the temperature parameter object.
[0064] S1322: Determine the duty cycle parameters corresponding to the temperature information of each temperature sensor by using the speed curve table corresponding to the speed curve table object in the speed regulation function object.
[0065] S1323: Control multiple fans based on duty cycle parameters using the speed control parameters corresponding to the speed control object in the speed control function object, and update the corresponding control parameters of the speed control parameter object in the speed control function object based on temperature information, duty cycle parameters, and corresponding speed.
[0066] In this system, different fan paths correspond to different temperature sensors, and the temperature parameter object records the temperature status parameters of each temperature sensor. For example, the temperature status parameters of multiple temperature sensors are obtained in real time from the temperature parameter object, and the temperature information of the multiple temperature sensors is determined based on these parameters. After determining the temperature information of each temperature sensor, the duty cycle parameter corresponding to each temperature information is determined based on the speed curve table corresponding to the speed control curve table object. The speed control curve table object records the duty cycle parameters corresponding to the fan control required under different temperature conditions, as well as the fan speed corresponding to different duty cycle parameters. Optionally, the duty cycle parameter corresponding to each temperature information can be determined using a binary search algorithm based on the speed curve table.
[0067] In one possible embodiment, the speed curve table corresponding to the speed control curve table object can be dynamically set according to the speed control range set by the user. Traditional speed curve table settings require defining a macro variable to specify the length of the speed curve table. Furthermore, different customers require different speed control ranges, necessitating the definition of more macros to differentiate between customers. This results in bloated and difficult-to-read driver code, prone to errors. The length of the speed curve table can be automatically calculated without modifying the driver code. This solution records the speed curve table through a header file (.h file), requiring only modification of this header file for direct execution. No macro definitions are needed for differentiation, and the solution achieves this without driver modifications, reducing the need for extensive driver code modifications. Moreover, when adding new speed curve tables, adding a header file to the device tree file enables rapid expansion of the speed curve table.
[0068] Furthermore, after determining the duty cycle parameters for each fan, a speed control signal can be sent to the fan based on the determined duty cycle parameters using the speed control parameters corresponding to the speed control object, thereby controlling the speed of the corresponding fan. After controlling the fan speed based on the aforementioned duty cycle parameters, the corresponding control parameters for the speed control object are updated using the latest temperature information, duty cycle parameters, and corresponding speed.
[0069] When the functional object includes a temperature functional object, the temperature functional object obtains the detection output value of the corresponding temperature sensor according to the channel parameters corresponding to the temperature channel object, determines the temperature information corresponding to the detection output value according to the temperature curve table corresponding to the temperature curve table object, and updates the temperature status parameters corresponding to the temperature parameter object according to the temperature detection information, so as to realize the temperature monitoring of the multi-fan system.
[0070] In one possible embodiment, this solution monitors temperature by using the channel parameters corresponding to the temperature channel object in the temperature function object, the temperature status parameters corresponding to the temperature parameter object, and the temperature curve table corresponding to the temperature curve table object, including:
[0071] S1331: The enabled temperature sensor channel is determined by the channel parameters corresponding to the temperature channel object in the temperature function object.
[0072] S1332: Based on the enabled temperature sensor channel, obtain the detection output value of the corresponding temperature sensor, and determine the temperature information corresponding to the detection output value based on the temperature curve table object in the temperature function object.
[0073] S1333: Update the temperature status parameter corresponding to the temperature parameter object in the temperature function object based on temperature information.
[0074] For example, the temperature channel object in the temperature function object determines whether the corresponding temperature sensor channel is enabled through channel parameters. When determining the enabled temperature sensor channel based on the channel parameters, the detection output value of the corresponding temperature sensor is obtained through the enabled temperature sensor channel, and the temperature information corresponding to the detection output value is determined using the temperature curve table corresponding to the temperature curve table object. Optionally, the determination of the temperature information corresponding to the detection output value based on the temperature curve table can be performed using a binary search algorithm. After determining the temperature information corresponding to the detection output value, the temperature status parameters corresponding to the temperature parameter object can be updated using the latest temperature information. The temperature status parameters are in the format of [temperature information, detection output value, ADC value], so the corresponding temperature information can be determined based on either the detection output value or the ADC value of the temperature sensor. The ADC value can be calculated based on the detection output value (voltage value) and the resistance value of the temperature sensor's sensing probe.
[0075] In one possible embodiment, the temperature profile table corresponding to the temperature profile table object can be dynamically set according to the temperature detection range set by the user. Traditional temperature profile table settings require defining a macro variable to specify the length of the temperature profile table. Furthermore, different customers require different temperature detection ranges, necessitating the definition of more macros to differentiate between customers. This results in bloated and difficult-to-read driver code, prone to errors. The length of the temperature profile table can be automatically calculated without modifying the driver code. This solution records the temperature profile table through a header file (.h file), requiring only modification to this header file for direct execution. No macro definitions are needed for differentiation, and the solution achieves this without altering the driver, reducing the need for extensive driver code modifications. Moreover, when adding new temperature profile tables, adding a header file to the device tree file enables rapid expansion of the temperature profile table.
[0076] As described above, by determining the required control functions and their quantity based on the device tree file, corresponding functional objects are constructed according to the required control functions and their quantity. The object parameters of these constructed functional objects are then configured based on the configuration information for different control functions in the device tree file. This allows for the control of multiple fans through these functional objects based on the configured object parameters. The device tree file can be configured to meet the control requirements of different multi-fan systems, improving the flexibility of multi-fan control and satisfying the control needs of different customers. Simultaneously, the power-on control, speed regulation, and temperature detection functions of different fans enable and control the power, speed, and temperature of multiple fans. Furthermore, by modifying the configuration information for different control functions in the device tree file, the multi-fan driver can be adapted to different hardware design scenarios. Different combinations of power-on control, speed regulation, and temperature detection functions can be used to adapt to different hardware designs, achieving fan driver multiplexing. Moreover, the temperature and speed control ranges can be dynamically set by the user using temperature and speed curve tables, making multi-fan control more flexible.
[0077] Figure 7 A schematic diagram of a multi-channel fan control device according to an embodiment of this application is provided. (Reference) Figure 7 The multi-channel fan control device includes an object construction module 71, an object configuration module 72, and a fan control module 73.
[0078] The object construction module 71 is used to determine the enabled control functions and the number of functions according to the device tree file, and construct function objects according to the enabled control functions and the number of functions. The device tree file is configured based on the control requirements of the multi-channel fans. The object configuration module 72 is used to configure the object parameters of the function objects according to the configuration information of different control functions in the device tree file. The fan control module 73 is used to control the multi-channel fans based on the object parameters through the function objects.
[0079] As described above, by determining the control functions and their number to be enabled based on the device tree file, constructing corresponding function objects according to the required control functions and their number, and configuring the object parameters of the constructed function objects based on the configuration information of different control functions in the device tree file, the function objects can control multiple fans based on the configured object parameters. The corresponding device tree file can be configured for the control requirements of multiple fans, realizing the control requirements of different multi-fan systems, improving the flexibility of multi-fan control, and meeting the control requirements of different customers for multi-fan systems.
[0080] In one possible embodiment, the control function includes one or more combinations of power-on control function, speed regulation function, and temperature detection function;
[0081] Correspondingly, when constructing a function object based on the enabled control functions and the number of functions, the object construction module 71 includes:
[0082] When the enabled control functions are determined to include power-on control functions, construct the corresponding number of power-on control function objects; and / or
[0083] When the enabled control functions include speed regulation functions, construct the corresponding number of speed regulation function objects; and / or
[0084] When the enabled control functions include temperature detection, construct the corresponding number of temperature function objects.
[0085] In one possible embodiment, when configuring the object parameters of a function object based on the configuration information of different control functions in the device tree file, the object configuration module 72 includes:
[0086] Based on the power-on configuration information of the power-on control function in the device tree file, initialize the power-on control parameters of the constructed power-on control function object; and / or
[0087] Based on the speed control configuration information of the speed control function in the device tree file, initialize the speed control parameters corresponding to the speed control object, the control parameters corresponding to the speed parameter object, and the speed curve table corresponding to the speed curve table object in the constructed speed control function object; and / or
[0088] Based on the temperature configuration information of the temperature detection function in the device tree file, initialize the channel parameters corresponding to the temperature channel object, the control parameters corresponding to the temperature parameter object, and the temperature curve table corresponding to the temperature curve table object in the constructed temperature function object.
[0089] In one possible embodiment, when the fan control module 73 controls multiple fans based on object parameters through a functional object, it includes:
[0090] The power-on enable of multiple fans is controlled by the power-on control parameters corresponding to the power-on control function object; and / or
[0091] The speed of multiple fans is controlled by the speed control parameters corresponding to the speed control object in the speed control function object, the control parameters corresponding to the speed parameter object, and the speed curve table corresponding to the speed curve table object; and / or
[0092] Temperature monitoring is performed using the channel parameters corresponding to the temperature channel object, the temperature status parameters corresponding to the temperature parameter object, and the temperature curve table corresponding to the temperature curve table object within the temperature function object.
[0093] In one possible embodiment, when the fan control module 73 controls the speed of multiple fans through the speed control parameters corresponding to the speed control object in the speed control function object, the control parameters corresponding to the speed parameter object, and the speed curve table corresponding to the speed curve table object, the fan control module 73 includes:
[0094] The temperature information of the multi-channel temperature sensor is determined by the temperature status parameters corresponding to the temperature parameter object.
[0095] The duty cycle parameters corresponding to the temperature information of each temperature sensor are determined by the speed curve table corresponding to the speed curve table object in the speed regulation function object.
[0096] By using the speed control parameters corresponding to the speed control object in the speed control function object, multiple fans are controlled based on the duty cycle parameters, and the corresponding control parameters of the speed control parameter object in the speed control function object are updated based on temperature information, duty cycle parameters, and corresponding speed.
[0097] In one possible embodiment, when the fan control module 73 monitors the temperature using the channel parameters corresponding to the temperature channel object in the temperature function object, the temperature status parameters corresponding to the temperature parameter object, and the temperature curve table corresponding to the temperature curve table object, it includes:
[0098] The enabled temperature sensor channel is determined by the channel parameters corresponding to the temperature channel object in the temperature function object.
[0099] The detection output value of the corresponding temperature sensor is obtained based on the enabled temperature sensor channel, and the temperature information corresponding to the detection output value is determined based on the temperature curve table object in the temperature function object.
[0100] Update the temperature status parameters corresponding to the temperature parameter objects in the temperature function object based on the temperature information.
[0101] In one possible embodiment, the speed curve is dynamically set according to a set speed control range, and the temperature curve is dynamically set according to a set temperature detection range.
[0102] It is worth noting that in the above embodiments of the multi-channel fan control device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of the present invention.
[0103] This application also provides a multi-channel fan control device, which can integrate the multi-channel fan control device provided in this application. Figure 8 This is a schematic diagram of a multi-channel fan control device provided in an embodiment of this application. (Reference) Figure 8 The multi-channel fan control device includes: an input device 83, an output device 84, a memory 82, and one or more processors 81; the memory 82 is used to store one or more programs; when one or more programs are executed by one or more processors 81, the one or more processors 81 implement the multi-channel fan control method provided in the above embodiments. The input device 83, output device 84, memory 82, and processor 81 can be connected via a bus or other means. Figure 8 Taking the example of a connection between China and Israel via a bus.
[0104] The memory 82, as a computing device readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the multi-channel fan control method provided in any embodiment of this application (e.g., object construction module 71, object configuration module 72, and fan control module 73 in the multi-channel fan control device). The memory 82 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the device, etc. Furthermore, the memory 82 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 82 may further include memory remotely located relative to the processor 81, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0105] Input device 83 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the device. Output device 84 may include display devices such as a display screen.
[0106] The processor 81 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 82, thereby realizing the above-mentioned multi-channel fan control method.
[0107] The multi-channel fan control device, equipment, and computer provided above can be used to execute the multi-channel fan control method provided in any of the above embodiments, and have corresponding functions and beneficial effects.
[0108] This application also provides a storage medium for storing computer-executable instructions. When executed by a computer processor, these computer-executable instructions are used to execute the multi-fan control method provided in the above embodiments. The multi-fan control method includes: determining enabled control functions and the number of functions based on a device tree file, and constructing function objects based on the enabled control functions and the number of functions, wherein the device tree file is configured based on the control requirements for the multi-fan; configuring object parameters of the function objects based on the configuration information of different control functions in the device tree file; and controlling the multi-fan through the function objects based on the object parameters.
[0109] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROMs, floppy disks, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disks or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. Furthermore, storage media may reside in a first computer system in which a program is executed, or may reside in a different second computer system connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term “storage medium” can include two or more storage media that may reside in different locations (e.g., in different computer systems connected via a network). Storage media may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.
[0110] Of course, the computer-executable instructions stored in the storage medium provided in the embodiments of this application are not limited to the multi-fan control method provided above, but can also execute related operations in the multi-fan control method provided in any embodiment of this application.
[0111] The multi-fan control device, equipment, and storage medium provided in the above embodiments can execute the multi-fan control method provided in any embodiment of this application. For technical details not described in detail in the above embodiments, please refer to the multi-fan control method provided in any embodiment of this application.
[0112] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments provided herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the claims.
Claims
1. A multi-channel fan control method, characterized in that, include: The device tree file determines the enabled control functions and their number. These control functions include one or more combinations of power-on control, speed regulation, and temperature detection functions. When the enabled control function includes power-on control, a corresponding number of power-on control function objects are constructed. And / or, when the enabled control function includes speed regulation, a corresponding number of speed regulation function objects are constructed. And / or, when the enabled control function includes temperature detection, a corresponding number of temperature detection function objects are constructed. The device tree file is configured based on the control requirements for multiple fans. Based on the configuration information of different control functions in the device tree file, configure the object parameters of the function object, including: based on the speed regulation configuration information of the speed regulation function in the device tree file, initialize the speed regulation control parameters corresponding to the speed regulation control object, the control corresponding parameters corresponding to the speed regulation parameter object, and the speed curve table corresponding to the speed regulation curve table object in the constructed speed regulation function object; Controlling multiple fans based on the object parameters through the functional object includes controlling the speed of multiple fans through the speed control parameters corresponding to the speed control object in the speed control functional object, the control parameters corresponding to the speed parameter object, and the speed curve table corresponding to the speed curve table object.
2. The multi-channel fan control method according to claim 1, characterized in that, The step of configuring the object parameters of the function object based on the configuration information of different control functions in the device tree file further includes: Based on the power-on configuration information of the power-on control function in the device tree file, initialize the power-on control parameters of the constructed power-on control function object; and / or Based on the temperature configuration information of the temperature detection function in the device tree file, initialize the channel parameters corresponding to the temperature channel object, the control parameters corresponding to the temperature parameter object, and the temperature curve table corresponding to the temperature curve table object in the constructed temperature function object.
3. The multi-channel fan control method according to claim 2, characterized in that, The method of controlling multiple fans based on the object parameters through the functional object further includes: The power-on enable of multiple fans is controlled by the power-on control parameters corresponding to the power-on control function object. and / or Temperature monitoring is performed using the channel parameters corresponding to the temperature channel object, the temperature status parameters corresponding to the temperature parameter object, and the temperature curve table corresponding to the temperature curve table object within the temperature function object.
4. The multi-channel fan control method according to claim 1, characterized in that, The method of controlling the speed of multiple fans through the speed control parameters corresponding to the speed control object in the speed control function object, the control parameters corresponding to the speed parameter object, and the speed curve table corresponding to the speed curve table object includes: The temperature information of the multi-channel temperature sensor is determined by the temperature status parameters corresponding to the temperature parameter object. The duty cycle parameters corresponding to the temperature information of each temperature sensor are determined by the speed curve table corresponding to the speed curve table object in the speed regulation function object. By using the speed control parameters corresponding to the speed control object in the speed control function object, the multi-channel fan is controlled based on the duty cycle parameter, and the corresponding control parameters corresponding to the speed control parameter object in the speed control function object are updated based on the temperature information, the duty cycle parameter, and the corresponding speed.
5. The multi-channel fan control method according to claim 3, characterized in that, The temperature monitoring is performed through the channel parameters corresponding to the temperature channel object, the temperature status parameters corresponding to the temperature parameter object, and the temperature curve table corresponding to the temperature curve table object in the temperature function object, including: The enabled temperature sensor channel is determined by the channel parameters corresponding to the temperature channel object in the temperature function object. The detection output value of the corresponding temperature sensor is obtained based on the enabled temperature sensor channel, and the temperature information corresponding to the detection output value is determined based on the temperature curve table corresponding to the temperature curve table object in the temperature function object. The temperature status parameters corresponding to the temperature parameter object in the temperature function object are updated based on the temperature information.
6. The multi-channel fan control method according to claim 2, characterized in that, The speed curve is dynamically set according to the set speed control range, and the temperature curve is dynamically set according to the set temperature detection range.
7. A multi-channel fan control device, characterized in that, It includes an object construction module, an object configuration module, and a fan control module, among which: The object construction module is used to determine the enabled control functions and the number of functions based on the device tree file. The control functions include one or more combinations of power-on control functions, speed regulation functions, and temperature detection functions. When the enabled control functions include power-on control functions, a corresponding number of power-on control function objects are constructed; and / or, when the enabled control functions include speed regulation functions, a corresponding number of speed regulation function objects are constructed; and / or, when the enabled control functions include temperature detection functions, a corresponding number of temperature function objects are constructed. The device tree file is configured based on the control requirements for multiple fans. The object configuration module is used to configure the object parameters of the function object according to the configuration information of different control functions in the device tree file, including: initializing the speed control parameters corresponding to the speed control object, the control parameters corresponding to the speed parameter object, and the speed curve table corresponding to the speed curve table object in the constructed speed control function object according to the speed control configuration information of the speed control function in the device tree file. The fan control module is used to control multiple fans based on the object parameters through the functional object, including: controlling the speed of multiple fans through the speed control parameters corresponding to the speed control object in the speed control functional object, the control parameters corresponding to the speed parameter object, and the speed curve table corresponding to the speed curve table object.
8. A multi-channel fan control device, characterized in that, include: Memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the multi-fan control method as described in any one of claims 1-6.
9. A storage medium for storing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the multi-fan control method as described in any one of claims 1-6.
Citation Information
Patent Citations
GPIO controller configuration method and system
CN112069102A
Automatic rotating speed control system for multi-path fan of rack-mounted equipment
CN201953698U