A chip driver loading configuration method, apparatus, device, and storage medium
By writing the model number into the variable resistor chip and generating a data model, the problems of poor flexibility and low efficiency in VR chip driver loading in the prior art are solved, and dynamic loading and efficient configuration of the chip driver are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-16
- Publication Date
- 2026-03-06
AI Technical Summary
Existing technologies lack flexibility in loading VR chip drivers, leading to repetitive generation of chip drivers, wasting human and material resources, and resulting in low efficiency, high cost, and inadequate supervision due to human operation.
By pre-writing the variable resistor chip model, a data model is generated, and the chip driver is obtained from the hardware monitoring framework based on the model, enabling dynamic loading of configurations, reducing manpower and material resources consumption, and improving efficiency.
It enables flexible and dynamic loading and configuration of chip drivers, reduces the consumption of manpower and material resources, improves work efficiency, and avoids inefficiency and insufficient supervision caused by human operation.
Smart Images

Figure CN115454512B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of driver loading in the field of electronic application technology, and in particular to a chip driver loading configuration method, apparatus, device and storage medium. Background Technology
[0002] The BMC (Baseboard Management Controller) hardware itself is a computer system. Compared to commonly used computer systems, the hardware resources in a BMC are very limited. The CPU (Central Processing Unit) in a BMC hardware runs relatively slowly, flash memory is typically around 32MB, and RAM (random access memory) is generally less than 256MB. Therefore, OpenBMC (Open Baseboard Management Controller) is designed as a complete Linux distribution, which can be flexibly customized to support different BMCSoCs (System on Chip) or boards.
[0003] With the diversification of server hardware models, to ensure that the BMC system can monitor hardware parameters such as temperature and voltage information for various types of boards, existing technologies often rely on the following methods when loading VR (Variable Resistor) chip drivers. Since VR chips do not store their model information, those skilled in the art typically obtain the chip model information from the VR chip technical manual provided by the manufacturer. Then, a VR chip driver is generated based on this information. However, existing technologies lack a framework for generating VR chip drivers based on the VR chip itself, often resulting in the repeated generation of drivers for the same chip model, wasting significant resources. Furthermore, the loading process lacks dynamic indexing based on the VR chip model information, leading to poor flexibility and high resource consumption. In addition, manually obtaining the VR chip model and configuring the VR chip driver inevitably results in low efficiency, high costs, and inadequate oversight.
[0004] Therefore, there is an urgent need to propose a chip driver loading configuration method, apparatus, device, and storage medium that can achieve flexible and dynamic loading configuration chip driver and improve the efficiency of loading configuration chip driver. Summary of the Invention
[0005] Therefore, it is necessary to provide a chip driver loading configuration method, apparatus, device, and storage medium that can flexibly and dynamically load configuration chip drivers and improve the efficiency of loading configuration chip drivers, in order to address the above-mentioned technical problems.
[0006] On one hand, a chip driver loading configuration method is provided, wherein the chip includes a variable resistor chip, and the method includes:
[0007] Step A: Pre-write the variable resistor chip model number into the variable resistor;
[0008] Step B: Based on the voltage data to be monitored, generate a data model according to the preset data model generation rules. The data model includes the variable resistor chip model, I2C bus channel, and register address.
[0009] Step C: Based on the variable resistor chip model, according to the preset chip driver loading configuration rules, obtain the chip driver from the preset hardware monitoring framework to realize the loading configuration of the chip driver.
[0010] In one embodiment, the preset data model generation rules include: obtaining a variable resistor chip for monitoring the voltage data based on the voltage data to be monitored; reading the variable resistor chip model based on the variable resistor chip; obtaining the I2C bus channel and register address for monitoring the voltage data based on the variable resistor chip and the voltage data to be monitored; and generating a data model based on the variable resistor chip model, the I2C bus channel, and the register address.
[0011] In one embodiment, generating the preset hardware monitoring framework includes: monitoring whether the generation status of the data model is in progress; if the generation status of the data model is in progress, then after the data model is generated, obtaining the variable resistor chip model in the data model; generating the chip driver based on the variable resistor chip model, and naming the chip driver with the variable resistor chip model; and generating the preset hardware monitoring framework based on the chip driver.
[0012] In one embodiment, the preset chip driver loading configuration rule includes: chip driver loading rule and chip driver configuration rule; the chip driver acquisition rule includes: loading a chip driver named with the same name as the variable resistor chip model from the preset hardware monitoring framework based on the variable resistor chip model.
[0013] In one embodiment, the chip driver configuration rules include: obtaining the I2C bus channel and the register address based on the data model and the variable resistor chip model; and loading and configuring the chip driver into the device tree source code according to the configuration code generation rules based on the I2C bus channel, the register address, and the chip driver.
[0014] In one embodiment, when generating the preset hardware monitoring framework, the method further includes: obtaining the variable resistor chip model in the data model; determining, based on the variable resistor chip model, whether a chip driver with the same name as the variable resistor chip model already exists in the preset hardware monitoring framework; if no chip driver with the same name as the variable resistor chip model exists, generating the chip driver based on the variable resistor chip model, and naming the chip driver with the variable resistor chip model.
[0015] In one embodiment, pre-writing the variable resistor chip model to the variable resistor includes: pre-setting a standard format for the variable resistor chip model, wherein the standard format includes the total number of characters, the number of English characters, and the number of Chinese characters; if the variable resistor chip model written to the variable resistor chip does not conform to the standard format, it is determined that writing the variable resistor chip model to the variable resistor chip has failed, and an alarm is issued.
[0016] On the other hand, a chip driver loading configuration device is provided, wherein the chip includes a variable resistor chip, and the device includes:
[0017] A writing unit for pre-writing the variable resistor chip model to the variable resistor;
[0018] A data model generation unit is used to generate a data model based on the voltage data to be monitored, according to a preset data model generation rule. The data model includes the variable resistor chip model, I2C bus channel, and register address.
[0019] A configuration loading unit is used to obtain the chip driver from a preset hardware monitoring framework based on the variable resistor chip model and according to preset chip driver loading configuration rules, so as to realize the loading configuration of the chip driver.
[0020] In another aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0021] Step A: Pre-write the variable resistor chip model number into the variable resistor;
[0022] Step B: Based on the voltage data to be monitored, generate a data model according to the preset data model generation rules. The data model includes the variable resistor chip model, I2C bus channel, and register address.
[0023] Step C: Based on the variable resistor chip model, according to the preset chip driver loading configuration rules, obtain the chip driver from the preset hardware monitoring framework to realize the loading configuration of the chip driver.
[0024] In another aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0025] Step A: Pre-write the variable resistor chip model number into the variable resistor;
[0026] Step B: Based on the voltage data to be monitored, generate a data model according to the preset data model generation rules. The data model includes the variable resistor chip model, I2C bus channel, and register address.
[0027] Step C: Based on the variable resistor chip model, according to the preset chip driver loading configuration rules, obtain the chip driver from the preset hardware monitoring framework to realize the loading configuration of the chip driver.
[0028] The aforementioned chip driver loading configuration method, apparatus, device, and storage medium include the following steps: pre-writing the variable resistor chip model to the variable resistor; generating a data model based on the voltage data to be monitored, according to a preset data model generation rule, wherein the data model includes the variable resistor chip model, I2C bus channel, and register address; and obtaining the chip driver from a preset hardware monitoring framework based on the variable resistor chip model, according to the preset chip driver loading configuration rule, to achieve the loading configuration of the chip driver. This method achieves readability of the variable resistor chip model by writing it into the variable resistor; pre-generating the hardware monitoring framework enables chip driver reusability; and obtaining the chip driver loading configuration based on the variable resistor chip model enables dynamic loading and flexible chip driver loading configuration, reducing the consumption of manpower and resources and eliminating the technical drawbacks of low work efficiency and inadequate supervision caused by manual operation. In summary, this application has the beneficial effects of enabling flexible and dynamic loading configuration of chip drivers and improving the efficiency of loading configuration of chip drivers. Attached Figure Description
[0029] Figure 1 This is an application environment diagram of the chip driver loading and configuration method in one embodiment;
[0030] Figure 2This is a flowchart illustrating a chip driver loading configuration method in one embodiment;
[0031] Figure 3 This is a flowchart illustrating a chip driver loading configuration method in one embodiment;
[0032] Figure 4 This is a structural block diagram of a chip driver loading and configuration device in one embodiment;
[0033] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0035] Example 1
[0036] The driver chip loading and configuration method provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. The storage unit within server 104 stores the chip driver loading and configuration method. When terminal 102 sends a chip driver loading and configuration request to server 104, server 104 invokes the chip driver loading and configuration method stored in the storage unit to load and configure the chip driver. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. Server 104 can be a standalone server or a server cluster consisting of multiple servers.
[0037] In one embodiment, a chip driver loading and configuration method is provided. The method includes: First, obtaining the variable resistor chip model, register address, I2C bus number (Inter-Integrated Circuit BUS, used to connect the microcontroller and its peripherals), and channel information used when monitoring voltage data of the variable resistor chip, and generating a data model; Second, adding pin functions to the variable resistor chip, obtaining the variable resistor chip model based on the variable resistor chip generation information provided by the manufacturer at the time of manufacture, and storing the variable resistor chip model in the storage unit within the variable resistor chip for access by the OpenBMC (based on an open-source baseboard management controller); Then, when it is necessary to load and configure the chip driver, obtaining the chip driver from a preset hardware monitoring framework (Hwmon) based on the variable resistor chip model; Finally, dynamically configuring the chip driver into the DTS (Device Tree). Source (full Chinese name: Device Tree Source Code, a data structure describing a specific computer's hardware components); finally, the kernel can be started to load the relevant chip driver, and the voltage data information monitored by the variable resistor chip can be read. The specific configuration code for dynamically configuring the chip driver into DTS is as follows:
[0038]
[0039] Example 2
[0040] In one embodiment, such as Figure 2 As shown, a chip driver loading configuration method is provided, wherein the chip includes a variable resistor chip, and the method includes:
[0041] Step A: Pre-write the variable resistor chip model number into the variable resistor;
[0042] Specifically, the pin functions of the variable resistor chip are added to the hardware, and the model number of the variable resistor chip is obtained based on the information parameters provided by the variable resistor chip manufacturer.
[0043] Step B: Based on the voltage data to be monitored, generate a data model according to the preset data model generation rules. The data model includes the variable resistor chip model, I2C bus channel, and register address.
[0044] Step C: Based on the variable resistor chip model, according to the preset chip driver loading configuration rules, obtain the chip driver from the preset hardware monitoring framework to realize the loading configuration of the chip driver.
[0045] In the aforementioned chip driver loading and configuration method, the method achieves readable chip model information by writing the variable resistor chip model into the variable resistor; pre-generated hardware monitoring framework enables chip driver reusability; and obtaining the chip driver loading configuration based on the variable resistor chip model achieves dynamic loading and flexible chip driver configuration, reducing manpower and material resource consumption and eliminating the technical drawbacks of low work efficiency and inadequate supervision caused by manual operation. In summary, this application has the beneficial effects of enabling flexible and dynamic loading and configuration of chip drivers and improving the efficiency of chip driver loading and configuration.
[0046] In one embodiment, the preset data model generation rules include: obtaining a variable resistor chip for monitoring the voltage data based on the voltage data to be monitored; reading the variable resistor chip model based on the variable resistor chip; obtaining the I2C bus channel and register address for monitoring the voltage data based on the variable resistor chip and the voltage data to be monitored; and generating a data model based on the variable resistor chip model, the I2C bus channel, and the register address.
[0047] In one embodiment, such as Figure 3 As shown, generating the preset hardware monitoring framework includes: monitoring whether the generation status of the data model is in progress; if the generation status of the data model is in progress, then after the data model is generated, obtaining the variable resistor chip model in the data model; generating the chip driver based on the variable resistor chip model, and naming the chip driver with the variable resistor chip model; and generating the preset hardware monitoring framework based on the chip driver.
[0048] In one embodiment, the preset chip driver loading configuration rule includes: chip driver loading rule and chip driver configuration rule; the chip driver acquisition rule includes: loading a chip driver named with the same name as the variable resistor chip model from the preset hardware monitoring framework based on the variable resistor chip model.
[0049] In one embodiment, the chip driver configuration rules include: obtaining the I2C bus channel and the register address based on the data model and the variable resistor chip model; and loading and configuring the chip driver into the device tree source code according to the configuration code generation rules based on the I2C bus channel, the register address, and the chip driver.
[0050] In one embodiment, such as Figure 3As shown, when generating the preset hardware monitoring framework, the method further includes: obtaining the variable resistor chip model in the data model; determining, based on the variable resistor chip model, whether a chip driver with the same name as the variable resistor chip model already exists in the preset hardware monitoring framework; if no chip driver with the same name as the variable resistor chip model exists, generating the chip driver based on the variable resistor chip model and naming the chip driver with the variable resistor chip model; if a chip driver with the same name as the variable resistor chip model exists, then no further generation of the chip driver based on the variable resistor chip model is performed.
[0051] In one embodiment, pre-writing the variable resistor chip model to the variable resistor includes: pre-setting a standard format for the variable resistor chip model, wherein the standard format includes the total number of characters, the number of English characters, and the number of Chinese characters; if the variable resistor chip model written to the variable resistor chip does not conform to the standard format, it is determined that writing the variable resistor chip model to the variable resistor chip has failed, and an alarm is issued.
[0052] It should be understood that, although Figure 2-3 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2-3 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0053] Example 3
[0054] In one embodiment, such as Figure 4 As shown, a chip driver loading configuration device is provided, comprising: a writing unit, a data model generation unit, and a loading configuration unit, wherein:
[0055] A writing unit for pre-writing the variable resistor chip model to the variable resistor;
[0056] A data model generation unit is used to generate a data model based on the voltage data to be monitored, according to a preset data model generation rule. The data model includes the variable resistor chip model, I2C bus channel, and register address.
[0057] A configuration loading unit is used to obtain the chip driver from a preset hardware monitoring framework based on the variable resistor chip model and according to preset chip driver loading configuration rules, so as to realize the loading configuration of the chip driver.
[0058] In one embodiment, the data model generation unit is further configured to: obtain a variable resistor chip for monitoring the voltage data based on the voltage data to be monitored; read the variable resistor chip model based on the variable resistor chip; obtain the I2C bus channel and register address for monitoring the voltage data based on the variable resistor chip and the voltage data to be monitored; and generate a data model based on the variable resistor chip model, the I2C bus channel and the register address.
[0059] In one embodiment, the apparatus further includes: a monitoring and generation unit for monitoring whether the generation status of the data model is being generated; if the generation status of the data model is being generated, then after the data model is generated, obtaining the variable resistor chip model in the data model; generating the chip driver based on the variable resistor chip model, and naming the chip driver with the variable resistor chip model; and generating the preset hardware monitoring framework based on the chip driver.
[0060] In one embodiment, the loading configuration unit is further configured to load a chip driver named with the same name as the variable resistor chip model from the preset hardware monitoring framework based on the variable resistor chip model.
[0061] In one embodiment, the configuration loading unit is further configured to obtain the I2C bus channel and the register address based on the data model and the variable resistor chip model; and to load and configure the chip driver to the device tree source code based on the I2C bus channel, the register address and the chip driver, according to the configuration code generation rules.
[0062] In one embodiment, the generation unit is further configured to acquire the variable resistor chip model in the data model; based on the variable resistor chip model, determine whether a chip driver with the same name as the variable resistor chip model already exists in the preset hardware monitoring framework; if no chip driver with the same name as the variable resistor chip model exists, then the chip driver is generated based on the variable resistor chip model, and the chip driver is named with the variable resistor chip model.
[0063] Specific limitations regarding the chip driver loading and configuration device can be found in the limitations of the chip driver loading and configuration method described above, and will not be repeated here. Each module in the aforementioned chip driver loading and configuration device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in the computer device, or stored in software in the memory of the computer device, so that the processor can call and execute the operations corresponding to each module.
[0064] Example 4
[0065] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a chip driver loading and configuration method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0066] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0067] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0068] Step A: Pre-write the variable resistor chip model number into the variable resistor;
[0069] Step B: Based on the voltage data to be monitored, generate a data model according to the preset data model generation rules. The data model includes the variable resistor chip model, I2C bus channel, and register address.
[0070] Step C: Based on the variable resistor chip model, according to the preset chip driver loading configuration rules, obtain the chip driver from the preset hardware monitoring framework to realize the loading configuration of the chip driver.
[0071] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0072] Based on the voltage data to be monitored, obtain the variable resistor chip used to monitor the voltage data; based on the variable resistor chip, read the variable resistor chip model; based on the variable resistor chip and the voltage data to be monitored, obtain the I2C bus channel and register address for monitoring the voltage data; based on the variable resistor chip model, the I2C bus channel and the register address, generate a data model.
[0073] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0074] The system monitors whether the data model is being generated. If the data model is being generated, the system obtains the variable resistor chip model number after the data model is generated. Based on the variable resistor chip model number, the system generates the chip driver and names the chip driver with the variable resistor chip model number. Based on the chip driver, the system generates the preset hardware monitoring framework.
[0075] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0076] Based on the variable resistor chip model, load the chip driver with the same name as the variable resistor chip model from the preset hardware monitoring framework.
[0077] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0078] Based on the data model and the variable resistor chip model, obtain the I2C bus channel and the register address; based on the I2C bus channel, the register address and the chip driver, load and configure the chip driver to the device tree source code according to the configuration code generation rules.
[0079] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0080] Obtain the variable resistor chip model from the data model; based on the variable resistor chip model, determine whether a chip driver with the same name as the variable resistor chip model already exists in the preset hardware monitoring framework; if no chip driver with the same name as the variable resistor chip model exists, generate the chip driver based on the variable resistor chip model and name the chip driver with the variable resistor chip model.
[0081] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0082] A standard format for the variable resistor chip model is preset, which includes the total number of characters, the number of English characters, and the number of Chinese characters. If the variable resistor chip model written to the variable resistor chip does not conform to the standard format, the writing of the variable resistor chip model to the variable resistor chip is determined to have failed, and an alarm is issued.
[0083] Example 5
[0084] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0085] Step A: Pre-write the variable resistor chip model number into the variable resistor;
[0086] Step B: Based on the voltage data to be monitored, generate a data model according to the preset data model generation rules. The data model includes the variable resistor chip model, I2C bus channel, and register address.
[0087] Step C: Based on the variable resistor chip model, according to the preset chip driver loading configuration rules, obtain the chip driver from the preset hardware monitoring framework to realize the loading configuration of the chip driver.
[0088] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0089] Based on the voltage data to be monitored, obtain the variable resistor chip used to monitor the voltage data; based on the variable resistor chip, read the variable resistor chip model; based on the variable resistor chip and the voltage data to be monitored, obtain the I2C bus channel and register address for monitoring the voltage data; based on the variable resistor chip model, the I2C bus channel and the register address, generate a data model.
[0090] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0091] The system monitors whether the data model is being generated. If the data model is being generated, the system obtains the variable resistor chip model number after the data model is generated. Based on the variable resistor chip model number, the system generates the chip driver and names the chip driver with the variable resistor chip model number. Based on the chip driver, the system generates the preset hardware monitoring framework.
[0092] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0093] Based on the variable resistor chip model, load the chip driver with the same name as the variable resistor chip model from the preset hardware monitoring framework.
[0094] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0095] Based on the data model and the variable resistor chip model, the I2C bus channel and the register address are obtained; based on the I2C bus channel, the register address, and the chip driver, the chip driver is loaded and configured into the device tree source code according to the configuration code generation rules.
[0096] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0097] Obtain the variable resistor chip model from the data model; based on the variable resistor chip model, determine whether a chip driver with the same name as the variable resistor chip model already exists in the preset hardware monitoring framework; if no chip driver with the same name as the variable resistor chip model exists, generate the chip driver based on the variable resistor chip model and name the chip driver with the variable resistor chip model.
[0098] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0099] A standard format for the variable resistor chip model is preset, which includes the total number of characters, the number of English characters, and the number of Chinese characters. If the variable resistor chip model written to the variable resistor chip does not conform to the standard format, the writing of the variable resistor chip model to the variable resistor chip is determined to have failed, and an alarm is issued.
[0100] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0101] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0102] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A chip drive loading configuration method, characterized by, The chip comprises a variable resistance chip, and the method comprises: pre-writing the variable resistance chip model to the storage unit of the variable resistance chip; based on the to-be-monitored voltage data, obtaining a variable resistance chip for monitoring the voltage data; based on the variable resistance chip, reading the variable resistance chip model of the variable resistance chip; based on the variable resistance chip and the to-be-monitored voltage data, obtaining an I2C bus channel and a register address for realizing the monitoring of the voltage data; based on the variable resistance chip model, the I2C bus channel and the register address, generating a data model, the data model comprising the variable resistance chip model, the I2C bus channel and the register address; based on the variable resistance chip model, obtaining a chip driver from a preset hardware monitoring framework according to a preset chip driver loading configuration rule, to realize the loading configuration of the chip driver; wherein generating the preset hardware monitoring framework comprises: monitoring whether the generation state of the data model is being generated; if the generation state of the data model is being generated, obtaining the variable resistance chip model in the data model after the data model is generated; based on the variable resistance chip model, judging whether a chip driver with the same name as the variable resistance chip model exists in the preset hardware monitoring framework; if no chip driver with the same name as the variable resistance chip model exists, generating the chip driver based on the variable resistance chip model, and naming the chip driver with the variable resistance chip model; based on the chip driver, generating the preset hardware monitoring framework.
2. The chip drive loading configuration method of claim 1, wherein, The preset chip driver loading configuration rule comprises a chip driver loading rule and a chip driver configuration rule; the chip driver obtaining rule comprises loading a chip driver with the same name as the variable resistance chip model from the preset hardware monitoring framework based on the variable resistance chip model.
3. The chip drive loading configuration method of claim 2, wherein, The chip driver configuration rule comprises: based on the data model and the variable resistance chip model, obtaining the I2C bus channel and the register address; based on the I2C bus channel, the register address and the chip driver, loading and configuring the chip driver to a device tree source code according to a configuration code generation rule.
4. The chip drive loading configuration method of claim 1, wherein, pre-writing the variable resistance chip model to the variable resistance chip comprises: pre-setting a variable resistance chip model standard format, the variable resistance chip model standard format comprising the total number of characters, the number of English characters and the number of Chinese characters; if the variable resistance chip model written to the variable resistance chip does not conform to the variable resistance chip model standard format, it is determined that writing the variable resistance chip model to the variable resistance chip fails, and an alarm is issued.
5. An apparatus for implementing the chip drive loading configuration method of any one of claims 1-4, characterized by The chip comprises a variable resistance chip, and the device comprises: a writing unit for pre-writing a variable resistance chip model to the variable resistance chip; The data model generation unit is configured to generate a data model according to preset data model generation rules based on the to-be-monitored voltage data, wherein the data model comprises a variable resistance chip model, an I2C bus channel and a register address. The loading configuration unit is configured to acquire a chip driver from a preset hardware monitoring framework according to preset chip driver loading configuration rules based on the variable resistance chip model, so as to realize loading configuration of the chip driver.
6. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the steps of the method in any one of claims 1 to 4 when executing the computer program.
7. A computer storage medium having stored thereon a computer program, characterized in that The computer program implements the steps of the method in any one of claims 1 to 4 when executed by the processor.
Citation Information
Patent Citations
Method and system for enabling Android system to be compatible with wifi chip
CN103677921A
Priority-based data-driven flattening equipment driving method
CN110908785A