Driver loading method, driver loading device and storage medium
By dividing the functional driver into sub-functional drivers and detecting the loading status, the problem of excessively long driver loading time in the existing technology is solved, thereby shortening the driver loading time and improving production efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-06
- Publication Date
- 2026-04-03
AI Technical Summary
In the factory production process, existing technologies use the same software package to load all function drivers during the product flashing process at different stages, which leads to excessively long driver loading time and reduces production efficiency.
By dividing the functional driver into sub-functional drivers and detecting the loading status of each sub-functional driver during the loading process, if a loading failure is detected, the loading of the current functional driver is stopped and the next functional driver is loaded, with priority given to loading sub-functional drivers with higher importance.
It effectively shortens the drive loading time and improves the factory's production efficiency.
Smart Images

Figure CN115756614B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of application design, and more particularly to driver loading methods, driver loading devices, and storage media. Background Technology
[0002] During factory production, testing products at different stages is crucial to ensuring the smooth operation of the final product. Examples include testing the motherboard, testing after attaching a touchscreen to the motherboard, and testing after installing sensors on the motherboard. This testing process is also known as the flashing process. The flashing software package integrates all the drivers for the entire product system. During flashing, the corresponding functional drivers from all the drivers in the software package are loaded into the kernel before the system boots up.
[0003] In related technologies, in order to ensure the consistency of flashing, the same software package is used in different stages of the product flashing process, and all the functional drivers in the software package are loaded in each flashing process, which results in excessively long driver loading time and reduces the production efficiency of the factory. Summary of the Invention
[0004] To overcome the problems existing in the related technologies, this disclosure provides a driver loading method, a driver loading device, and a storage medium.
[0005] According to a first aspect of the present disclosure, a driver loading method is provided, comprising:
[0006] During the loading of a driver that includes multiple functional drivers, the sub-functional drivers included in the currently loaded functional driver are determined; the sub-functional drivers are loaded, and the loading status of the sub-functional drivers is determined; in response to the detection of a sub-functional driver that failed to load, the loading of the unloaded sub-functional drivers in the currently loaded functional driver is stopped, and the loading of the next functional driver continues.
[0007] In one implementation, the sub-function drivers included in the function driver are predetermined in the following manner: determining whether there are existing sub-function drivers in the function driver that conform to a preset sub-function driver classification; if there are existing sub-function drivers that conform to the preset sub-function driver classification, then the existing sub-function drivers are included in the function driver; if there are no existing sub-function drivers that conform to the preset sub-function driver classification, then the function driver is divided into sub-function drivers according to the preset sub-function driver classification to obtain sub-function drivers that conform to the preset sub-function driver classification.
[0008] In one embodiment, loading the sub-function driver includes: determining the priority of loading each sub-function driver; loading each sub-function driver one by one according to the priority from high to low; the priority of each sub-function driver is allocated based on the importance of the executed function, wherein each sub-function driver includes a first sub-function driver and a second sub-function driver, the importance of the executed function corresponding to the first sub-function driver is greater than the importance of the executed function corresponding to the second sub-function driver, and the priority of the first sub-function driver is higher than the priority of the second sub-function driver.
[0009] In one implementation, the sub-function drivers are loaded one by one according to their priority from high to low, including: determining the current priority and the loading status of the sub-function driver corresponding to the previous priority; loading the sub-function driver corresponding to the current priority in response to the successful loading of the sub-function driver of the previous priority; and stopping the loading of the sub-function driver corresponding to the current priority in response to the failure to load the sub-function driver of the previous priority.
[0010] In one embodiment, the driver loading method further includes: in response to detecting that a sub-function driver has failed to load, setting a loading failure status flag for the sub-function driver that failed to load.
[0011] According to a second aspect of the present disclosure, a drive loading device is provided, comprising:
[0012] The determining unit is used to determine the sub-functional drivers included in the currently loaded functional driver during the process of loading a driver that includes multiple functional drivers; the loading unit is used to load the sub-functional drivers, determine the loading status of the sub-functional drivers, and stop loading the unloaded sub-functional drivers in the currently loaded functional driver in response to detecting that there are sub-functional drivers that have failed to load, and continue loading the next functional driver.
[0013] In one implementation, the sub-function drivers included in the function driver are predetermined in the following manner: determining whether there are existing sub-function drivers in the function driver that conform to a preset sub-function driver classification; if there are existing sub-function drivers that conform to the preset sub-function driver classification, then the existing sub-function drivers are included in the function driver; if there are no existing sub-function drivers that conform to the preset sub-function driver classification, then the function driver is divided into sub-function drivers according to the preset sub-function driver classification to obtain sub-function drivers that conform to the preset sub-function driver classification.
[0014] In one embodiment, the loading unit is configured to: determine the priority of loading each sub-function driver; load each sub-function driver one by one according to the priority from high to low; the priority of each sub-function driver is allocated based on the importance of the executed function, wherein each sub-function driver includes a first sub-function driver and a second sub-function driver, the importance of the executed function corresponding to the first sub-function driver is greater than the importance of the executed function corresponding to the second sub-function driver, and the priority of the first sub-function driver is higher than the priority of the second sub-function driver.
[0015] In one embodiment, the loading unit is configured to: determine the current priority and the loading status of the sub-function driver corresponding to the previous priority; in response to the successful loading of the sub-function driver of the previous priority, load the sub-function driver corresponding to the current priority; in response to the failure to load the sub-function driver of the previous priority, stop loading the sub-function driver corresponding to the current priority.
[0016] In one embodiment, the driver loading device further includes: a setting unit, configured to set a loading failure status flag for the sub-function driver that failed to load in response to detecting that a sub-function driver has failed to load.
[0017] According to a third aspect of the present disclosure, a drive loading device is provided, comprising:
[0018] A processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the driver loading method described in either the first or second aspect.
[0019] According to a fourth aspect of the present disclosure, a storage medium is provided, the storage medium storing instructions that, when executed by a processor of a mobile terminal, enable the mobile terminal to execute the driver loading method described in any one of the first or second aspects.
[0020] The technical solutions provided by the embodiments of this disclosure can include the following beneficial effects: During the loading of a driver program comprising multiple functional drivers, the sub-functional drivers included in the currently loaded functional driver are determined, the sub-functional drivers are loaded, and the loading status of the sub-functional drivers is determined. When a sub-functional driver that has failed to load is detected, loading of the unloaded sub-functional drivers in the currently loaded functional driver program is stopped, and the loading of the next functional driver continues. This disclosure effectively shortens the driver loading time by detecting the loading status of each sub-function and stopping the loading of unloaded sub-functional drivers in the currently loaded functional driver program if a sub-functional driver that has failed to load is found.
[0021] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0023] Figure 1 This is a flowchart illustrating a driver loading method according to an exemplary embodiment.
[0024] Figure 2 This is a flowchart illustrating a loading sub-function driver according to an exemplary embodiment.
[0025] Figure 3 This is a flowchart illustrating, according to an exemplary embodiment, the sequential loading of sub-function drivers in order of priority.
[0026] Figure 4 This is a flowchart illustrating a touchscreen driver loading method according to an exemplary embodiment.
[0027] Figure 5 This is a block diagram illustrating a drive loading device according to an exemplary embodiment.
[0028] Figure 6 This is a block diagram of an apparatus for driving loading, according to an exemplary embodiment. Detailed Implementation
[0029] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0030] Currently, there are multiple manufacturers of integrated circuit chips (ICs). When different manufacturers flash products at different stages using the same software package, the loading logic for function drivers varies. Generally, when flashing products at different stages, all function drivers in the software package are loaded into the kernel. However, not every flashing process requires loading all function drivers into the kernel.
[0031] During the product manufacturing process, at different stages, it is necessary to perform firmware flashing tests on the completed products. This involves loading the drivers corresponding to multiple functions into the product to verify whether the product completed at the current stage meets the requirements. In this embodiment, "product" is a general term for equipment at different stages of the factory production process. "Product" can refer to a chip, a motherboard, a motherboard with a touchscreen but without a touchscreen installed, or a motherboard with a touchscreen installed. It can also refer to the final assembled terminal. This embodiment does not specifically limit the definition.
[0032] To more clearly illustrate the differences between the different stages of flashing, this embodiment of the disclosure uses the process of loading the touch screen driver during motherboard testing of a mobile phone or other terminal as an example.
[0033] During factory production, the motherboard is manufactured using Surface Mount Technology (SMT). This motherboard is then flashed with firmware, and subsequent processing follows. At this stage, the touchscreen is not attached to the motherboard, but the software package used for flashing includes the touchscreen driver. Therefore, the relevant technology still loads the touchscreen driver into the kernel during the flashing process. Although the touchscreen is not attached to the motherboard, causing communication failure between the central processing unit (CPU) and the touch IC, the loading of the touchscreen driver continues, even loading the entire driver at this point, which is unnecessary. Therefore, during the flashing process when the touchscreen is not attached to the motherboard, loading the unnecessary touchscreen driver increases the driver loading time, leading to longer boot times and reduced production efficiency in mass production. The above embodiment uses a touchscreen as an example to illustrate the defects in driver loading during flashing of terminals at different stages. However, this defect is not limited to whether the touchscreen is attached to the motherboard; it also exists in fingerprint recognition, camera, and other stages.
[0034] In view of this, this disclosure provides a driver loading method. When flashing a product at different stages, the driver is loaded based on this method, i.e., the corresponding software package is loaded. The driver loading method includes: dividing the functional drivers in the software package into sub-functional drivers according to their sub-functions; when loading each functional driver in the software package, determining the loading status of each sub-functional driver within the currently loaded functional driver; if a failed sub-functional driver is detected in the currently loaded functional driver, immediately stopping the loading of the remaining sub-functional drivers in the currently loaded functional driver, i.e., stopping the loading of the currently loaded functional driver, and continuing to load the next functional driver. This driver loading method can effectively shorten the driver loading time by detecting the loading status of each sub-function. For example, the software package includes a touchscreen driver and a camera driver in sequence. The touchscreen driver includes a black screen gesture sub-function driver, a touchscreen firmware upgrade sub-function driver, and a game mode sub-function driver. Assuming that during the touchscreen driver loading process, the black screen gesture sub-function driver, touchscreen firmware upgrade sub-function driver, and game mode sub-function driver are loaded sequentially, if the black screen gesture sub-function driver loading failure is detected, the loading of the touchscreen firmware upgrade sub-function driver and game mode sub-function driver is stopped. This is equivalent to stopping the loading of the touchscreen driver and continuing to load the camera driver. It can be seen that stopping the loading of the touchscreen firmware upgrade sub-function driver and game mode sub-function driver after detecting the black screen gesture sub-function driver loading failure saves the time spent loading these two sub-function drivers, thus shortening the driver loading time. Furthermore, by shortening the flashing time for products at different stages, the factory's production efficiency is improved.
[0035] Figure 1 This is a flowchart illustrating a driver loading method according to an exemplary embodiment. For example... Figure 1 As shown, the driver loading method includes the following steps.
[0036] In step S11, during the loading of a driver that includes multiple functional drivers, the sub-functional drivers included in the currently loaded functional driver are determined.
[0037] Before loading a driver program containing multiple functional drivers, each functional driver is divided into multiple sub-functional drivers according to a preset sub-functional driver classification. It should be noted that the result of dividing each functional driver into sub-functional drivers according to the preset sub-functional driver classification includes three cases. One case is that the functional driver includes two or more sub-functional drivers. Another case is that the functional driver includes only one sub-functional driver. The third case is that the functional driver cannot be divided according to the preset sub-functional driver classification, that is, the functional driver does not include sub-functional drivers. This solution is applicable to loading functional drivers containing two or more sub-functional drivers, which is equivalent to loading each sub-functional driver within that functional driver, and determining whether to continue loading the remaining unloaded sub-functional drivers based on the loading status of each sub-functional driver, thereby shortening the driver loading time. When using this solution to load a functional driver that includes only one sub-functional driver or no sub-functional drivers, the loading process is the same as in related technologies, and will not be repeated in this embodiment.
[0038] In step S12, the sub-function driver is loaded, and the loading status of the sub-function driver is determined.
[0039] In this embodiment of the disclosure, if the currently loaded functional driver includes multiple sub-functional drivers, each sub-functional driver can be loaded one by one, and the loading status of the previous sub-functional driver can be determined when loading the current sub-functional driver. If the loading status of the previous sub-functional driver is loading failure, loading of the current sub-functional driver and the remaining unloaded sub-functional drivers after stopping loading of the current sub-functional driver are stopped. In this way, the driver loading time is shortened.
[0040] In this embodiment of the disclosure, if the currently loaded functional driver includes multiple sub-functional drivers, each sub-functional driver can be loaded simultaneously. However, because the drivers for each sub-functional driver are different, the loading time for each sub-functional driver varies. Therefore, when loading the sub-functional drivers included in the functional driver, the loading status of each sub-functional driver is determined. If any sub-functional driver fails to load, the loading of the remaining unloaded sub-functional drivers in the functional driver is stopped. In this way, the effect of shortening the driver loading time can also be achieved.
[0041] In step S13, in response to the detection of a failed sub-function driver, loading of the unloaded sub-function drivers in the currently loaded function driver is stopped, and the loading of the next function driver continues.
[0042] In this embodiment, the loading status of a sub-function driver can be characterized by setting a loading status flag. For example, when the loading status flag is set to 1, it indicates that the sub-function driver has been successfully loaded; when the loading status flag is set to 0, it indicates that the sub-function driver has failed to load. Alternatively, the loading status of a sub-function driver can be determined by monitoring whether all the corresponding drivers have been successfully loaded. That is, if all the corresponding drivers are successfully loaded, the sub-function driver is considered successfully loaded; if an error occurs during the loading process, the sub-function driver has failed to load.
[0043] During the loading of a driver that includes multiple functional drivers, if a sub-functional driver is detected as having failed to load, the loading of the unloaded sub-functional driver in the currently loaded functional driver is stopped, that is, the loading of the currently loaded functional driver is stopped, and the loading of the next functional driver continues.
[0044] This disclosure addresses the problem of long driver loading times caused by loading functional drivers in related technologies when they are not actually needed. It proposes dividing functional drivers into sub-functional drivers, detecting the loading status of these sub-functional drivers, and determining the subsequent loading process based on their loading status. This optimizes the driver loading logic, gradually loading sub-functional drivers into the kernel, shortening driver loading time, and improving production efficiency in mass production.
[0045] Furthermore, in this embodiment of the disclosure, the function drivers to be loaded can be pre-classified according to the functions they execute, and sub-function drivers that conform to the preset sub-function driver classification can be obtained. It can be understood that the rule for determining sub-function drivers in this embodiment of the disclosure is to integrate the code architecture according to different functions, placing code with the same function together.
[0046] In this embodiment of the disclosure, existing sub-functional drivers obtained by pre-dividing the functional driver are acquired, and it is determined whether the acquired existing sub-functional drivers conform to a preset sub-functional driver classification. If there are existing sub-functional drivers in the functional driver that conform to the preset sub-functional driver classification, then the existing sub-functional drivers are included as sub-functional drivers in the functional driver. If there are no existing sub-functional drivers in the functional driver, or if there are existing sub-functional drivers in the functional driver but they do not conform to the preset sub-functional driver classification, then the functional driver is divided into sub-functional drivers according to the preset sub-functional driver classification to obtain sub-functional drivers that conform to the preset sub-functional driver classification.
[0047] In one implementation, taking a touchscreen driver as an example, the touchscreen driver enables the touchscreen to have a black screen gesture function, a touchscreen firmware upgrade function, a game mode function, and tool functions used by the supplier for debugging firmware. It should be noted that the black screen gesture function is used to wake the screen by double-tapping when the screen is off. The touchscreen firmware upgrade function is used to upgrade the touchscreen firmware and optimize touch performance. The game mode function is used to set relevant function parameters during gameplay to improve the user experience. According to the touchscreen driver, the pre-defined sub-function driver categories include: black screen gesture sub-function driver, touchscreen firmware upgrade sub-function driver, game mode sub-function driver, and tool sub-function driver used by the supplier for debugging firmware.
[0048] During the implementation of the driver loading method, if the touchscreen driver already exists, the black screen gesture sub-function driver, touchscreen firmware upgrade sub-function driver, game mode sub-function driver, and tool sub-function driver used by the supplier's debugging firmware are included as sub-function drivers in the touchscreen driver. If the touchscreen driver does not have a sub-function driver that conforms to the preset sub-function driver classification, the touchscreen driver is divided into sub-function drivers according to the preset sub-function driver classification to obtain the black screen gesture sub-function driver, touchscreen firmware upgrade sub-function driver, game mode sub-function driver, and tool sub-function driver used by the supplier's debugging firmware that conform to the preset sub-function driver classification. In this embodiment, the touchscreen driver and the division of the touchscreen driver into black screen gesture sub-function drivers, touchscreen firmware upgrade sub-function drivers, game mode sub-function drivers, and tool sub-function drivers used by the supplier's debugging firmware are used as examples for illustration and should not be construed as limiting this application.
[0049] Furthermore, this disclosure describes the sub-function drivers included in the loading function driver involved in the above embodiments.
[0050] Figure 2 This is a flowchart illustrating a loading sub-function driver according to an exemplary embodiment. For example... Figure 2 As shown, the loading of sub-function drivers included in the function driver includes the following steps.
[0051] In step S21, the priority of each sub-function driver included in the loading function driver is determined.
[0052] In this embodiment, a pre-defined importance level for each sub-function is obtained, and this importance level is used as the priority for each sub-function driver to execute its corresponding function. Priorities are assigned to each sub-function driver based on their importance level. For example, if the sub-function drivers include a first sub-function driver and a second sub-function driver, the first sub-function driver has a higher priority than the second sub-function driver. In this embodiment, assigning priorities to each sub-function driver ensures that sub-function drivers with higher importance are loaded first, enabling the product to perform important functions.
[0053] Taking touch functionality as an example, the priorities are ranked according to the importance of touch functionality: basic touch functionality first, firmware upgrade functionality second, game mode functionality third, double-tap to wake functionality fourth, and vendor debugging tool functionality last.
[0054] In step S22, each sub-function driver is loaded one by one according to priority from high to low.
[0055] If the touchscreen driver is simply divided into sub-function drivers without assigning priorities, subsequent sub-function drivers may continue to run even if the previous sub-function driver fails to load. This will increase the loading time of the function drivers and may also cause the system to fail to achieve its intended effect, triggering unexpected results. Therefore, in this embodiment, the touchscreen driver is not only divided into sub-function drivers but also prioritized according to the importance of the functions to shorten the loading time of the function drivers.
[0056] Figure 3 This is a flowchart illustrating the sequential loading of sub-function drivers according to priority, based on an exemplary embodiment. In one implementation, such as... Figure 3 As shown, each sub-function driver is loaded one by one according to priority, including the following steps.
[0057] In step S221, the current priority and the loading status of the sub-function driver corresponding to the previous priority are determined.
[0058] During the process of loading sub-function drivers according to priority, the current priority is first determined. If the current priority is first priority, the sub-function driver corresponding to the first priority is loaded directly. If the current priority is second priority, the loading status of the sub-function driver corresponding to the previous priority is further determined, that is, the loading status of the sub-function driver corresponding to the first priority. Among them, the first priority is superior to the second priority.
[0059] In step S222, in response to the successful loading of the sub-function driver of the previous priority, the sub-function driver corresponding to the current priority is loaded.
[0060] In step S223, in response to the failure of loading the sub-function driver of the previous priority, loading the sub-function driver corresponding to the current priority is stopped.
[0061] In this embodiment, sub-function drivers are loaded one by one according to priority. The current priority sub-function driver can only be loaded if the previous priority sub-function driver is successfully loaded. If the previous priority sub-function driver fails to load, the loading of the current priority sub-function driver is stopped, thus prioritizing the loading of sub-function drivers with higher functional importance. Furthermore, the reason for the failure to load the previous priority sub-function driver may be that the device corresponding to that sub-function driver is not connected to the currently flashed device, or that the device corresponding to that sub-function driver has malfunctioned. Upon detecting the failure of the previous priority sub-function driver, the loading of the current priority sub-function driver can be stopped, significantly shortening the loading time of the function drivers.
[0062] Furthermore, the driver loading method provided in this embodiment of the present disclosure further includes: in response to detecting that there is a sub-function driver that has failed to load in the currently loaded function driver, setting a loading failure status flag for the sub-function driver that has failed to load.
[0063] In this embodiment, setting a loading failure status flag for the sub-function driver that fails to load is to facilitate quick location of the fault point during the fault diagnosis and location process.
[0064] In one implementation, a status flag is set for each sub-function driver in the function driver. During the loading process of each sub-function driver, if the current sub-function driver is loaded successfully, its status flag is set to a loading success flag. If the current sub-function driver fails to load, its status flag is set to a loading failure flag. Furthermore, when loading the current sub-function driver, the loading decision is based on whether the status flag of the previous sub-function driver, indicating whether the previous sub-function driver was loaded successfully.
[0065] The following embodiments of this disclosure, using the touchscreen driver loading process as an example, illustrate the content involved in the above embodiments.
[0066] Figure 4 This is a flowchart illustrating a touchscreen driver loading method according to an exemplary embodiment, such as... Figure 4 As shown, the touchscreen driver loading method includes the following steps.
[0067] In step S31, it is detected whether the touchscreen driver is divided according to the preset sub-function driver classification requirements to obtain each sub-function driver. If it is detected that the touchscreen driver is not divided according to the preset sub-function driver classification requirements to obtain each sub-function driver, then step S32 is executed; if it is detected that the touchscreen driver has been divided according to the preset sub-function driver classification requirements to obtain each sub-function driver, then step S33 is executed.
[0068] In step S32, the touch screen driver is classified according to the preset sub-function driver classification requirements to obtain each sub-function driver.
[0069] The sub-function drivers include: basic touch sub-function driver, firmware upgrade sub-function driver, game mode sub-function driver, double-tap to wake sub-function driver, and vendor debugging tool sub-function driver.
[0070] In step S33, priorities are assigned to each sub-function driver, and each sub-function driver is loaded one by one according to priority.
[0071] The priorities of the sub-function drivers are as follows: basic touch sub-function driver, firmware upgrade sub-function driver, game mode sub-function driver, double-tap to wake sub-function driver, and vendor debugging tool sub-function driver. During the boot process, each sub-function driver is loaded one by one according to priority. In this embodiment, when loading the touch screen driver, the basic touch sub-function driver with the highest priority is loaded into the kernel first.
[0072] In step S34, status flags are set for each sub-function driver in the touchscreen driver.
[0073] In this step, a status flag is set for each sub-function driver so that it can be referenced by other sub-function drivers. A variable representing the flag is set for each of the above sub-function drivers; for example, tp_load_ok is used as the status flag representing the loading status of the basic touch sub-function driver.
[0074] In step S35, the driver for the highest priority basic touch sub-function is loaded, and the tp_load_ok corresponding to the basic touch sub-function is set according to the loading status of the basic touch sub-function driver.
[0075] If the basic touch sub-function driver loads successfully, the corresponding `tp_load_ok` value is set to 1, indicating successful loading. If the basic touch sub-function driver fails to load, the corresponding `tp_load_ok` value is set to 0, indicating loading failure.
[0076] In step S36, the current loading priority is determined, and the tp_load_ok of the sub-function driver corresponding to the previous priority is determined. Taking the current loading priority as the second priority as an example, the tp_load_ok of the basic touch sub-function driver corresponding to the first priority is determined.
[0077] In step S37, if tp_load_ok is 0, loading the sub-function driver corresponding to the current priority is stopped, and loading the touchscreen driver ends. Continuing the previous example, if tp_load_ok of the basic touch sub-function driver is 0, loading the firmware upgrade sub-function driver of the second priority is stopped, and loading the touchscreen driver ends.
[0078] In step S38, if tp_load_ok is 1, the sub-function driver corresponding to the current priority is loaded, and the process returns to step S36 to continue loading the sub-function driver corresponding to the next priority. Continuing the example above, if the tp_load_ok of the basic touch sub-function driver is 1, the firmware upgrade sub-function driver corresponding to the second priority is loaded, and the process returns to step S36 to continue loading the game mode sub-function driver corresponding to the third priority.
[0079] By following the steps above to load the touchscreen driver, when starting without a screen, `tp_load_ok` will be 0. At this point, the remaining sub-function drivers will not run, significantly shortening the touchscreen driver loading time and improving production efficiency in the factory. Furthermore, if a previous sub-function driver fails, subsequent sub-function drivers will also fail, but higher-priority sub-function drivers will not fail, facilitating troubleshooting and location.
[0080] In this embodiment, if there is a hardware malfunction or the screen is not attached to the motherboard, the entire touchscreen driver is subdivided into sub-function drivers, and priorities are assigned according to the importance of the functions. Each sub-function driver is then loaded sequentially according to its priority, shortening the boot time when starting without a screen and improving production efficiency. Furthermore, status flags are set for each sub-function driver to facilitate quick location of the fault point when touch failure occurs.
[0081] Based on the same concept, embodiments of this disclosure also provide a drive loading device.
[0082] It is understood that the driver loading device provided in this disclosure includes hardware structures and / or software modules corresponding to each function in order to achieve the above-mentioned functions. In conjunction with the units and algorithm steps of the various examples disclosed in this disclosure, this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the technical solutions of this disclosure.
[0083] Figure 5 This is a block diagram illustrating a drive loading device according to an exemplary embodiment. (Refer to...) Figure 5 The drive loading device 100 includes a determining unit 101, a loading unit 102, and a setting unit 103.
[0084] The determining unit 101 is used to determine the sub-functional drivers included in the currently loaded functional driver during the process of loading a driver that includes multiple functional drivers.
[0085] The loading unit 102 is used to load sub-function drivers, determine the loading status of sub-function drivers, and, in response to detecting that there are sub-function drivers that have failed to load, stop loading the unloaded sub-function drivers in the currently loaded function drivers and continue loading the next function driver.
[0086] In one implementation, the sub-function drivers included in the function driver are predetermined in the following manner:
[0087] Determine whether there are existing sub-function drivers that conform to the preset sub-function driver classification in the function driver; if there are existing sub-function drivers that conform to the preset sub-function driver classification, then the existing sub-function drivers are included as sub-function drivers in the function driver; if there are no existing sub-function drivers that conform to the preset sub-function driver classification, then the function driver is divided into sub-function drivers according to the preset sub-function driver classification to obtain sub-function drivers that conform to the preset sub-function driver classification.
[0088] In one embodiment, the loading unit 102 is used for:
[0089] Determine the priority of loading each sub-function driver; load each sub-function driver one by one according to the priority from high to low; the priority of each sub-function driver is allocated based on the importance of the function to be executed. Each sub-function driver includes a first sub-function driver and a second sub-function driver. The importance of the function to be executed corresponding to the first sub-function driver is greater than the importance of the function to be executed corresponding to the second sub-function driver. The priority of the first sub-function driver is higher than the priority of the second sub-function driver.
[0090] In one embodiment, the loading unit 102 is used for:
[0091] Determine the current priority and the loading status of the sub-function driver corresponding to the previous priority; if the sub-function driver of the previous priority is successfully loaded, load the sub-function driver corresponding to the current priority; if the sub-function driver of the previous priority fails to load, stop loading the sub-function driver corresponding to the current priority.
[0092] In one embodiment, the drive loading device further includes:
[0093] Setting unit 103 is used to set a loading failure status flag for a sub-function driver that has failed to load in response to the detection of a sub-function driver that has failed to load.
[0094] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0095] Figure 6 This is a block diagram illustrating a device for driving loading according to an exemplary embodiment. For example, device 200 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0096] Reference Figure 6 The device 200 may include one or more of the following components: processing component 202, memory 204, power component 206, multimedia component 208, audio component 210, input / output (I / O) interface 212, sensor component 214, and communication component 216.
[0097] Processing component 202 typically controls the overall operation of device 200, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 202 may include one or more processors 220 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 202 may include one or more modules to facilitate interaction between processing component 202 and other components. For example, processing component 202 may include a multimedia module to facilitate interaction between multimedia component 208 and processing component 202.
[0098] Memory 204 is configured to store various types of data to support the operation of device 200. Examples of such data include instructions for any application or method operating on device 200, contact data, phonebook data, messages, pictures, videos, etc. Memory 204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0099] The power supply component 206 provides power to the various components of the device 200. The power supply component 206 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device 200.
[0100] Multimedia component 208 includes a screen that provides an output interface between the device 200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 208 includes a front-facing camera and / or a rear-facing camera. When the device 200 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0101] Audio component 210 is configured to output and / or input audio signals. For example, audio component 210 includes a microphone (MIC) configured to receive external audio signals when device 200 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 204 or transmitted via communication component 216. In some embodiments, audio component 210 also includes a speaker for outputting audio signals.
[0102] I / O interface 212 provides an interface between processing component 202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0103] Sensor assembly 214 includes one or more sensors for providing status assessments of various aspects of device 200. For example, sensor assembly 214 may detect the on / off state of device 200, the relative positioning of components such as the display and keypad of device 200, changes in the position of device 200 or a component of device 200, the presence or absence of user contact with device 200, the orientation or acceleration / deceleration of device 200, and temperature changes of device 200. Sensor assembly 214 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 214 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 214 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0104] Communication component 216 is configured to facilitate wired or wireless communication between device 200 and other devices. Device 200 can access wireless networks based on communication standards, such as WiFi, 4G, or 5G, or combinations thereof. In one exemplary embodiment, communication component 216 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 216 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0105] In an exemplary embodiment, the apparatus 200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0106] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 204 including instructions, which can be executed by a processor 220 of the device 200 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0107] It is understood that in this disclosure, "multiple" refers to two or more, and other quantifiers are similar. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. The singular forms "a," "the," and "the" are also intended to include the plural forms unless the context clearly indicates otherwise.
[0108] It is further understood that the terms "first," "second," etc., are used to describe various types of information, but this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another, and do not indicate a specific order or degree of importance. In fact, the expressions "first," "second," etc., are completely interchangeable. For example, without departing from the scope of this disclosure, first information can also be referred to as second information, and similarly, second information can also be referred to as first information.
[0109] It can be further understood that, unless otherwise specified, "connection" includes both direct connections where no other components exist between the two parties and indirect connections where other components exist between them.
[0110] It is further understood that although operations are described in a specific order in the accompanying drawings in the embodiments of this disclosure, this should not be construed as requiring these operations to be performed in the specific order or serial order shown, or requiring all of the shown operations to be performed to obtain the desired result. In certain environments, multitasking and parallel processing may be advantageous.
[0111] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following scope of claims.
[0112] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A driver loading method, characterized in that, include: During the loading of a driver that includes multiple functional drivers, the sub-functional drivers included in the currently loaded functional driver are determined. The sub-functional drivers are obtained by determining whether there are existing sub-functional drivers in the functional driver that conform to a preset sub-functional driver classification. Load the sub-function driver and determine the loading status of the sub-function driver; In response to the detection of a failed sub-function driver, stop loading any unloaded sub-function drivers in the currently loaded function driver and continue loading the next function driver.
2. The driver loading method according to claim 1, characterized in that, The sub-function drivers included in the function driver are predetermined in the following manner: Determine whether there are existing sub-function drivers that conform to the preset sub-function driver classification in the function driver; If there is an existing sub-function driver that conforms to the preset sub-function driver classification, then the existing sub-function driver is included as a sub-function driver in the function driver. If there is no existing sub-function driver that matches the preset sub-function driver classification, then the function driver is divided into sub-function drivers according to the preset sub-function driver classification to obtain sub-function drivers that match the preset sub-function driver classification.
3. The driver loading method according to claim 1, characterized in that, The loading of the sub-function driver includes: Determine the priority of loading each sub-function driver; The sub-function drivers are loaded one by one according to their priority from high to low. The priority of each sub-function driver is allocated based on the importance of the execution function. Each sub-function driver includes a first sub-function driver and a second sub-function driver. The importance of the execution function corresponding to the first sub-function driver is greater than that of the execution function corresponding to the second sub-function driver. The priority of the first sub-function driver is higher than that of the second sub-function driver.
4. The driver loading method according to claim 3, characterized in that, According to the aforementioned priority from high to low, the sub-function drivers are loaded one by one, including: Determine the current priority and the loading status of the sub-function driver corresponding to the previous priority; In response to the successful loading of the sub-function driver of the previous priority, the sub-function driver corresponding to the current priority is loaded. In response to the failure to load the sub-function driver of the previous priority, the loading of the sub-function driver corresponding to the current priority is stopped.
5. The drive loading method according to any one of claims 1 to 4, characterized in that, The driver loading method further includes: In response to the detection of a sub-function driver that failed to load, a loading failure status flag is set for the sub-function driver that failed to load.
6. A driving loading device, characterized in that, include: The determining unit is used to determine the sub-functional drivers included in the currently loaded functional driver during the process of loading a driver that includes multiple functional drivers. The sub-functional drivers are obtained by determining whether there are existing sub-functional drivers in the functional driver that conform to a preset sub-functional driver classification. The loading unit is used to load the sub-function driver, determine the loading status of the sub-function driver, and, in response to detecting that there is a sub-function driver that has failed to load, stop loading the unloaded sub-function drivers in the currently loaded function drivers and continue loading the next function driver.
7. The driving loading device according to claim 6, characterized in that, The sub-function drivers included in the function driver are predetermined in the following manner: Determine whether there are existing sub-function drivers that conform to the preset sub-function driver classification in the function driver; If there is an existing sub-function driver that conforms to the preset sub-function driver classification, then the existing sub-function driver is included as a sub-function driver in the function driver. If there is no existing sub-function driver that conforms to the preset sub-function driver classification, then the function driver is divided into sub-function drivers according to the preset sub-function driver classification to obtain sub-function drivers that conform to the preset sub-function driver classification.
8. The driving loading device according to claim 6, characterized in that, The loading unit is used for: Determine the priority of loading each sub-function driver; The sub-function drivers are loaded one by one according to their priority from high to low. The priority of each sub-function driver is allocated based on the importance of the execution function. Each sub-function driver includes a first sub-function driver and a second sub-function driver. The importance of the execution function corresponding to the first sub-function driver is greater than that of the execution function corresponding to the second sub-function driver. The priority of the first sub-function driver is higher than that of the second sub-function driver.
9. The driving loading device according to claim 8, characterized in that, The loading unit is used for: Determine the current priority and the loading status of the sub-function driver corresponding to the previous priority; In response to the successful loading of the sub-function driver of the previous priority, the sub-function driver corresponding to the current priority is loaded. In response to the failure to load the sub-function driver of the previous priority, the loading of the sub-function driver corresponding to the current priority is stopped.
10. The driving loading device according to any one of claims 6 to 9, characterized in that, The drive loading device further includes: The setting unit is used to set a loading failure status flag for the sub-function driver that has failed to load in response to the detection of a loading failure.
11. A driving loading device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to execute the driver loading method according to any one of claims 1 to 5.
12. A storage medium, characterized in that, The storage medium stores instructions that, when executed by the terminal's processor, enable the terminal to perform the driver loading method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method for detecting loading of fingerprint sensor driver, mobile terminal and storage medium
CN107589975A