Pin configuration method, device and storage medium
By configuring the pin pin as a preset attribute and setting the processing module, the problem of repeated settings and poor portability of pin pin configuration information in Linux systems is solved, and efficient processing and flexible configuration are achieved when calling Probe function.
Patent Information
- Application Number
- CN202010322041.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-22
- Publication Date
- 2024-11-05
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, when calling Probe functions in Linux systems, it is necessary to know the configuration information of the pin pin in advance and repeatedly set the registers, resulting in waste of time and poor code portability.
By configuring the pin pin as preset attributes, the processing module is set to identify and process these attributes, so that the pin pin is processed according to the preset attributes when calling the Probe function, avoiding giving configuration information and obtaining register settings in the configuration file.
It solves the problem of repeated register setting and poor portability, simplifies the pin configuration process, maintains the configuration in the startup loading stage, and improves the flexibility and portability of the system.
Smart Images

Figure CN113535242B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer processing, and in particular to a pin configuration method, device and storage medium. Background Art
[0002] In the related art, for example, in a Linux system, when calling the Probe function, if it is necessary to maintain the pin configuration of the boot loading (BootLoader) stage, it is necessary to know the configuration of the relevant pins at the boot loading stage in advance, and then modify the relevant content in the device-tree, so that the Linux operating system can obtain the configuration information of the relevant pins from the device-tree when calling the Probe function. This means that if the configuration of the pins is to be maintained at the boot loading stage, that is, the configuration of the relevant pins is not changed, the existing solution still needs to configure the corresponding configuration information in the device-tree. When running the Probe function, the Linux system first obtains this configuration information, and then sets it to the register corresponding to the pin. In this way, the register is repeatedly set, wasting time. In addition, the configuration of the pins is generally different for different projects, and each project must obtain the configuration of the boot loading stage, resulting in poor code portability of the existing solution. Providing a pin configuration method with good flexibility is an issue that needs to be solved urgently. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a pin configuration method, device and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a pin configuration method is provided, wherein the pin configuration method is applied to the configuration of the pin when a Probe function is called, and the configuration method is applied to an electronic device, comprising:
[0005] Configuring the pin to have a preset attribute, wherein the preset attribute includes ignoring an attribute configured for the pin;
[0006] A processing module for processing the preset attributes of the pin is set; the processing module for processing the preset attributes of the pin is used to execute the processing flow of the preset attributes of the pin, so that when the Probe function is called, the pin is processed according to the preset attributes.
[0007] Wherein, the processing module for setting and processing the preset attributes of the pin includes:
[0008] Setting a recognition module for the preset attribute of the pin, wherein the recognition module for the preset attribute of the pin is used to recognize the preset attribute of the pin, so that when the Probe function is called, the preset attribute of the pin is recognized as a legal attribute;
[0009] A processing module for the preset attributes of the pin is set, and the processing module for the preset attributes of the pin is used to process the pin according to the preset attributes when calling the Probe function.
[0010] The configuring the pin to have a preset attribute includes:
[0011] The pin is configured as a preset attribute in a device-tree configuration file of the electronic device.
[0012] The calling module for setting and calling the preset attribute of the pin includes:
[0013] A calling module for calling the preset attribute of the pin is set at the processing layer of the chip.
[0014] According to a second aspect of an embodiment of the present disclosure, a pin configuration method is provided, which is applied to an electronic device. The pin configuration method is applied to the configuration of the pin when a Probe function is called. The configuration method includes:
[0015] Get the properties of the pin;
[0016] When the attribute of the pin is a preset attribute, a processing module of the preset attribute of the pin is called so that when the Probe function is called, the pin is processed according to the preset attribute; the preset attribute includes an attribute of ignoring the configuration of the pin.
[0017] When the attribute of the pin is a preset attribute, calling the processing module of the preset attribute of the pin so that when the Probe function is called, the pin is processed according to the preset attribute includes:
[0018] Identify the preset attributes of the pin so that when the Probe function is called, the preset attributes of the pin are identified as legal attributes;
[0019] Process the pin according to the preset attributes.
[0020] Wherein, obtaining the attribute of the pin includes:
[0021] The attribute of the pin is obtained in a device-tree configuration file of the electronic device.
[0022] The processing module for calling the preset attribute of the pin so that when the Probe function is called, the pin is processed according to the preset attribute includes:
[0023] The processing module for calling the preset attribute of the pin is set in the processing layer of the calling chip, so that when the Probe function is called, the pin is processed according to the preset attribute.
[0024] According to a third aspect of an embodiment of the present disclosure, a pin configuration device is provided, the pin configuration device is applied to the configuration of the pin when calling a Probe function, and the configuration device includes:
[0025] A configuration module, configured to configure the pin to a preset attribute, wherein the preset attribute includes ignoring an attribute of the configuration of the pin;
[0026] A setting module is used to set a processing module for processing the preset attributes of the pin pin; the processing module for processing the preset attributes of the pin pin is used to execute the processing flow of the preset attributes of the pin pin, so that when the Probe function is called, the pin pin is processed according to the preset attributes.
[0027] Wherein, the setting module is configured as follows:
[0028] Setting a recognition module for the preset attribute of the pin, wherein the recognition module for the preset attribute of the pin is used to recognize the preset attribute of the pin, so that when the Probe function is called, the preset attribute of the pin is recognized as a legal attribute;
[0029] A processing module for the preset attributes of the pin is set, and the processing module for the preset attributes of the pin is used to process the pin according to the preset attributes when calling the Probe function.
[0030] Wherein, the configuration module is configured as follows:
[0031] The pin is configured as a preset attribute in the device-tree of the electronic device.
[0032] Wherein, the setting module is configured as follows:
[0033] A calling module for calling the preset attribute of the pin is set at the processing layer of the chip.
[0034] According to a fourth aspect of an embodiment of the present disclosure, a pin configuration device is provided, the pin configuration device is applied to the configuration of the pin when the Probe function is called, and the configuration device includes:
[0035] An acquisition module, configured to acquire the attribute of the pin;
[0036] The calling module calls the processing module of the preset attribute of the pin when the attribute of the pin is a preset attribute, so that when the Probe function is called, the pin is processed according to the preset attribute; the preset attribute includes an attribute of ignoring the configuration of the pin.
[0037] Wherein, the calling module is configured as follows:
[0038] Identify the preset attributes of the pin so that when the Probe function is called, the preset attributes of the pin are identified as legal attributes;
[0039] Process the pin according to the preset attributes.
[0040] Wherein, the acquisition module is configured as follows:
[0041] The attribute of the pin is obtained in a device-tree configuration file of the electronic device.
[0042] Wherein, the calling module is configured as follows:
[0043] The processing module for calling the preset attribute of the pin is set in the processing layer of the calling chip, so that when the Probe function is called, the pin is processed according to the preset attribute.
[0044] According to a fifth aspect of an embodiment of the present disclosure, a pin configuration device is provided, including:
[0045] processor;
[0046] a memory for storing processor-executable instructions;
[0047] Wherein, the processor is configured to:
[0048] Configuring the pin to have a preset attribute, wherein the preset attribute includes ignoring an attribute configured for the pin;
[0049] A processing module for processing the preset attributes of the pin is set; the processing module for processing the preset attributes of the pin is used to execute the processing flow of the preset attributes of the pin, so that when the Probe function is called, the pin is processed according to the preset attributes.
[0050] According to a sixth aspect of an embodiment of the present disclosure, a pin configuration device is provided, including:
[0051] processor;
[0052] a memory for storing processor-executable instructions;
[0053] Wherein, the processor is configured to:
[0054] Get the properties of the pin;
[0055] When the attribute of the pin is a preset attribute, a processing module of the preset attribute of the pin is called so that when the Probe function is called, the pin is processed according to the preset attribute; the preset attribute includes an attribute of ignoring the configuration of the pin.
[0056] According to a seventh aspect of an embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to perform a pin configuration method, the configuration method comprising:
[0057] Configuring the pin to a preset attribute, wherein the preset attribute includes ignoring the configured attribute of the pin;
[0058] A processing module for processing the preset attributes of the pin is set; the processing module for processing the preset attributes of the pin is used to execute the processing flow of the preset attributes of the pin, so that when the Probe function is called, the pin is processed according to the preset attributes.
[0059] According to an eighth aspect of an embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to perform a pin configuration method, the configuration method comprising:
[0060] Get the properties of the pin;
[0061] When the attribute of the pin is a preset attribute, a processing module of the preset attribute of the pin is called so that when the Probe function is called, the pin is processed according to the preset attribute; the preset attribute includes an attribute of ignoring the configuration of the pin.
[0062] The technical solution provided by the embodiment of the present disclosure may include the following beneficial effects: the pin configuration method provided by the present disclosure allows the pin configuration to be ignored when calling the Probe function, without providing the configuration information of the relevant pin in the configuration file, and after ignoring the attribute information of the relevant pin, the Linux system does not need to obtain the configuration information of the relevant pin and set it again in the register of the relevant pin. This solves the problems of repeated setting of relevant registers and poor portability in the prior art.
[0063] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0065] Figure 1 is a flowchart of a pin configuration method according to an exemplary embodiment;
[0066] Figure 2 Shown as Figure 1 A flowchart of a method for setting a processing module for processing a preset attribute of a pin in step S12;
[0067] Figure 3 As shown in Figure 1 The flowchart of the method for configuring the pin to the preset attribute in step S11 is shown;
[0068] Figure 4 As shown in Figure 1 The flowchart of the method for setting the processing module of the preset attribute of the pin in step S12 shown;
[0069] Figure 5 is a flowchart of a pin configuration method according to an exemplary embodiment;
[0070] Figure 6 As shown in Figure 5 In step S22, when the attribute of the pin is a preset attribute, the processing module of the preset attribute of the pin is called, so that when the Probe function is called, the pin is processed according to the preset attribute.
[0071] Figure 7 As shown in Figure 5 The flowchart of the method for obtaining the attributes of the pin in step S21 is shown;
[0072] Figure 8 As shown in Figure 5 In step S22 shown, when the attribute of the pin is a preset attribute, a processing module of the preset attribute of the pin is called, so that when the Probe function is called, the pin is processed according to the preset attribute.
[0073] Fig. 9 is a block diagram of a pin configuration device according to an exemplary embodiment;
[0074] Fig.10is a block diagram of a pin configuration device according to an exemplary embodiment;
[0075] Fig.11 It is a block diagram of a device for predicting product sales according to an exemplary embodiment (general structure of a mobile terminal). DETAILED DESCRIPTION
[0076] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0077] A pin configuration method is provided in an embodiment of the present disclosure. Figure 1 is a flowchart of a pin configuration method according to an exemplary embodiment. Figure 1 As shown, the pin configuration method is used in an electronic device. The pin configuration method is applied to the configuration of the pin when calling the Probe function, and includes the following steps.
[0078] Step S11, configuring the pin to a preset attribute, where the preset attribute includes ignoring the configured attribute of the pin.
[0079] Step S12, setting a processing module for processing the preset attributes of the pin pin; the processing module for processing the preset attributes of the pin pin is used to execute the processing flow of the preset attributes of the pin pin, so that when the Probe function is called, the pin pin is processed according to the preset attributes.
[0080] In order to solve the defects existing in the prior art, in the pin configuration method provided by the present disclosure, the pin attributes are set to preset attributes. The preset attributes include attributes for ignoring the pin configuration, that is, the preset attributes include attributes for ignoring the original configuration of the pin. For example, the preset attributes of the pin can be set in the relevant configuration file. For example, in a Linux system, the "bypass" attribute can be set for the relevant pin in the configuration file. After the preset attributes are set for the relevant pin, it is also necessary to set a processing module for the preset attributes, which executes the processing flow of the preset attributes of the pin, so that when the Probe function is called, the pin is processed according to the preset attributes, that is, when the Probe function is called, the processing module for processing the preset attributes of the pin can be called to process the relevant pin according to the preset attributes.
[0081] In this way, when calling the Probe function, the pin configuration can be ignored without providing the configuration information of the relevant pin in the configuration file. After ignoring the attribute information of the relevant pin, the Linux system does not need to obtain the configuration information of the relevant pin and set it to the register of the relevant pin again. This solves the problems of repeated setting of relevant registers and poor portability in the prior art.
[0082] The pin configuration method provided by the present disclosure is applied to electronic devices, such as mobile phones, tablet computers, etc.
[0083] In an exemplary embodiment of the present disclosure, a pin configuration method is provided. Figure 2 As shown, Figure 2 Shown as Figure 1 Flowchart of the method for setting the processing module of the preset attribute of the processing pin in step S12:
[0084] In step S121, a pin preset attribute recognition module is set, and the pin preset attribute recognition module is used to recognize the pin preset attribute, so that when the Probe function is called, the pin preset attribute is recognized as a legal attribute.
[0085] In step S122, a processing module for the preset attributes of the pin is set, and the processing module for the preset attributes of the pin is used to process the pin according to the preset attributes when the Probe function is called.
[0086] After setting the preset attributes of the pins, and setting the related pins to ignore the attributes of the configuration of the related pins, it is also necessary to set an identification module for the preset attributes of the related pins, so that when the Probe function is called, the preset attributes of the related pins can be identified as legal attributes. That is, when the Probe function is called, the Linux system can consider the preset attributes to be legal attributes. It is also necessary to set a processing module for the preset attributes of the pins, and after the Linux system identifies the preset attributes as legal attributes, the processing module for the preset attributes of the pins processes the related pins according to the preset attributes. In this way, when the Linux system calls the Probe function, the configuration of the related pins can be ignored, that is, when the Probe function is called, the configuration processing of the related pins is not performed.
[0087] Through such a setting, when the Linux system calls the Probe function, the configuration of the relevant pins can be ignored, that is, the configuration of the relevant pins is not repeated, and the configuration of the pins is maintained unchanged in the boot loading stage, and the Linux system does not need to set the configuration of the relevant pins to the relevant registers, so that the configuration of the relevant pins is not changed when the Linux system calls the Probe function. When the Linux system calls the Probe function, it does not need to know the configuration of the relevant pins in the boot loading stage in advance, and the portability is good.
[0088] In an exemplary embodiment of the present disclosure, a pin configuration method is provided. Figure 3 As shown, Figure 3 As shown in Figure 1 The flowchart of the method for configuring the pin to the preset attribute in step S11 is shown as follows:
[0089] In step S111, the pin is configured as a preset attribute in a device-tree configuration file of the electronic device.
[0090] In the pin configuration method provided in the present disclosure, the pin can be configured as a preset attribute in the device-tree configuration file of the electronic device. When the Probe function is called, the configuration information of the relevant pin is obtained from the device-tree configuration file. For example, the "bypass" attribute can be added to the init configuration of the device-tree configuration file, as shown below:
[0091]
[0092] In this way, the configuration of the preset properties of the relevant pins is completed.
[0093] In an exemplary embodiment of the present disclosure, a pin configuration method is provided. Figure 4 As shown, Figure 4 As shown in Figure 1 The flowchart of the method for setting the processing module of the preset attribute of the pin in step S12 is shown as follows:
[0094] In step S123, a calling module for calling the preset attribute of the pin is set in the processing layer of the chip.
[0095] In order not to change the relevant settings of the framework layer of pin management, such as the framework layer of pinctrl of the Linux system, the configuration settings of the preset attributes of the relevant pins can be performed in the processing layer of each chip.
[0096] Taking the Qualcomm platform as an example, the relevant implementation code can be:
[0097] The procedures in the identification module for setting the preset attributes of the pin include:
[0098]
[0099]
[0100] The above program is the corresponding program in the identification module of the preset attribute of the pin. Through the identification module, the framework layer of the pinctrl of the Linux system can identify "bypass" as a legal attribute.
[0101] The processing module that sets the preset attributes of the pin pin, in its corresponding program, add the following to the msm_config_reg function:
[0102] +case MSM_PIN_CONFIG_BYPASS:
[0103] +break;
[0104] Add in the msm_config_group_set function:
[0105] case MSM_PIN_CONFIG_BYPASS:
[0106] +dev_err(pctrl->dev,"bypass config
[0107] parameter:%x,just return\n",
[0108] +param);
[0109] +return 0;
[0110] When the msm_config_reg function finds that the attribute is "bypass", it breaks directly and returns 0 to the msm_config_group_set function. The msm_config_group_set function returns 0 directly without performing any operation on the corresponding register, thus maintaining the configuration of the relevant pins in the boot loading phase.
[0111] By ignoring the repeated setting operation of the relevant pin configuration in the Probe phase, the pin configuration process in the Probe phase is simplified, and there is no need to repeatedly configure the configuration of the relevant pins, and there is no need for the Linux system to set the configuration of the relevant pins to the relevant registers, so that the Linux system does not change the configuration of the relevant pins in the Probe function phase, and maintains the configuration of the pins unchanged in the boot loading phase. When calling the Probe function, the Linux system does not need to know the configuration of the relevant pins in the boot loading phase in advance, and has good portability.
[0112] The pin configuration method provided by the present invention does not need to change any settings of the pinctrl framework layer of the Linux system, but only needs to add corresponding settings in the processing layer of the chip. Dedicated configuration attributes can be added independently by the manufacturers of each chip, which is highly flexible.
[0113] A pin configuration method is provided in an embodiment of the present disclosure. Figure 5 is a flowchart of a pin configuration method according to an exemplary embodiment. Figure 5 As shown, the pin configuration method is used in an electronic device. The pin configuration method is applied to the configuration of the pin when calling the Probe function, and includes the following steps.
[0114] Step S21, obtaining the attributes of the pin.
[0115] Step S22, when the attribute of the pin is a preset attribute, calling the processing module of the preset attribute of the pin, so that when the Probe function is called, the pin is processed according to the preset attribute; the preset attribute includes an attribute of ignoring the configuration of the pin.
[0116] In order to solve the defects in the prior art, the pin configuration method provided in the present disclosure obtains the properties of the pin.
[0117] When the attribute is a preset attribute, the processing module for the preset attribute is called, and the processing module executes the processing flow of the preset attribute of the pin, so that when the Probe function is called, the pin is processed according to the preset attribute, that is, when the Probe function is called, the processing module for processing the preset attribute of the pin can be called to process the relevant pin according to the preset attribute.
[0118] The preset attribute may include an attribute for ignoring the pin configuration, that is, the preset attribute includes an attribute for ignoring the original configuration of the pin. The preset attribute may be set in a related configuration file to set the preset attribute of the pin. For example, in a Linux system, a "bypass" attribute may be set for the related pin in the configuration file. The preset attribute of the pin is obtained from the related configuration file.
[0119] In this way, when calling the Probe function, the pin configuration can be ignored without providing the configuration information of the relevant pin in the configuration file. After ignoring the attribute information of the relevant pin, the Linux system does not need to obtain the configuration information of the relevant pin and set it to the register of the relevant pin again. This solves the problems of repeated setting of relevant registers and poor portability in the prior art.
[0120] The pin configuration method provided by the present disclosure is applied to electronic devices, such as mobile phones, tablet computers, etc.
[0121] In an exemplary embodiment of the present disclosure, a pin configuration method is provided. Figure 6 As shown, Figure 6 As shown in Figure 5 In step S22, when the attribute of the pin is a preset attribute, the processing module of the preset attribute of the pin is called, so that when the Probe function is called, the pin is processed according to the preset attribute. Flowchart of the method:
[0122] In step S221, the preset attributes of the pin are identified so that when the Probe function is called, the preset attributes of the pin are identified as legal attributes.
[0123] In step S222, the pin is processed according to the preset attributes.
[0124] When the attribute of the relevant pin is a preset attribute, the preset attribute of the relevant pin is identified so that when the Probe function is called, the preset attribute of the relevant pin can be identified as a legal attribute. That is, when the Probe function is called, the Linux system can consider the preset attribute as a legal attribute. After the preset attribute is identified as a legal attribute, the processing module is called to process the relevant pin according to the preset attribute. That is, when the Linux system calls the Probe function, the configuration of the relevant pin is ignored and the configuration processing of the relevant pin is not performed.
[0125] Through such a setting, when the Linux system calls the Probe function, the configuration of the relevant pins can be ignored, that is, the configuration of the relevant pins is not repeated, and the Linux system does not need to set the configuration of the relevant pins to the relevant registers, so that the configuration of the relevant pins is not changed during the Linux system calling the Probe function, and the configuration of the pins is maintained unchanged during the boot loading stage. When the Linux system calls the Probe function, it does not need to know the configuration of the relevant pins in the boot loading stage in advance, and the portability is good.
[0126] In an exemplary embodiment of the present disclosure, a pin configuration method is provided. Figure 7 As shown, Figure 7 As shown in Figure 5 The flowchart of the method for obtaining the attributes of the pin in step S21 is shown as follows:
[0127] In step S211, the attributes of the pins are obtained in the device-tree file of the electronic device.
[0128] In the pin configuration method provided in the present disclosure, the pin can be configured as a preset attribute in a device-tree configuration file of the electronic device. When the Probe function is called, the attribute information of the relevant pin is obtained from the device-tree configuration file.
[0129] In an exemplary embodiment of the present disclosure, a pin configuration method is provided. Figure 8 As shown, Figure 8 As shown in Figure 5 In step S22 shown in the figure, when the attribute of the pin is a preset attribute, the processing module of the preset attribute of the pin is called, so that when the Probe function is called, the pin is processed according to the preset attribute.
[0130] In step S223, when the attribute of the pin is a preset attribute, a processing module for calling the preset attribute of the pin set in the processing layer of the chip is called, so that when the Probe function is called, the pin is processed according to the preset attribute.
[0131] In order not to change the related settings of the framework layer of pin management, such as the framework layer of pinctrl of Linux system, the configuration settings of the preset attributes of the related pins can be performed in the processing layer of each chip. The Linux system can call the processing module of calling the preset attributes of the pins set in the processing layer of the chip, so that when the Probe function is called, the pins are processed according to the preset attributes.
[0132] By ignoring the repeated setting operation of the relevant pin configuration in the Probe phase, the pin configuration process in the Probe phase is simplified, and there is no need to repeatedly configure the configuration of the relevant pins, and there is no need for the Linux system to set the configuration of the relevant pins to the relevant registers, so that the Linux system does not change the configuration of the relevant pins in the Probe function phase, and maintains the configuration of the pins unchanged in the boot loading phase. When calling the Probe function, the Linux system does not need to know the configuration of the relevant pins in the boot loading phase in advance, and has good portability.
[0133] In an exemplary embodiment of the present disclosure, a pin configuration device is provided. Fig. 9 As shown, Fig. 9 1 is a block diagram of a pin configuration device according to an exemplary embodiment. The pin configuration device is applied to the configuration of the pin when calling the Probe function. Fig. 9 The device includes a configuration module 101 and a setting module 102.
[0134] The configuration module 101 configures the pin to a preset attribute, wherein the preset attribute includes ignoring the attribute of the configuration of the pin;
[0135] The setting module 102 is used to set a processing module for processing the preset attributes of the pin pin; the processing module for processing the preset attributes of the pin pin is used to execute the processing flow of the preset attributes of the pin pin, so that when the Probe function is called, the pin pin is processed according to the preset attributes.
[0136] Wherein, the setting module 102 is configured to:
[0137] Setting a recognition module for the preset attribute of the pin, wherein the recognition module for the preset attribute of the pin is used to recognize the preset attribute of the pin, so that when the Probe function is called, the preset attribute of the pin is recognized as a legal attribute;
[0138] A processing module for the preset attributes of the pin is set, and the processing module for the preset attributes of the pin is used to process the pin according to the preset attributes when calling the Probe function.
[0139] Wherein, the configuration module 101 is configured as follows:
[0140] The pin is configured as a preset attribute in the device-tree of the electronic device.
[0141] Wherein, the setting module 102 is configured to:
[0142] A calling module for calling the preset attribute of the pin is set at the processing layer of the chip.
[0143] In an exemplary embodiment of the present disclosure, a pin configuration device is provided. Fig.10 As shown, Fig.10 1 is a block diagram of a pin configuration device according to an exemplary embodiment. The pin configuration device is applied to the configuration of the pin when the Probe function is called. Fig.10 The device includes an acquisition module 201 and a calling module 202.
[0144] The acquisition module 201 is configured to acquire the attributes of the pin;
[0145] The calling module 202 calls the processing module of the preset attribute of the pin when the attribute of the pin is a preset attribute, so that when the Probe function is called, the pin is processed according to the preset attribute; the preset attribute includes an attribute of ignoring the configuration of the pin.
[0146] Wherein, the calling module 202 is configured as follows:
[0147] Identify the preset attributes of the pin so that when the Probe function is called, the preset attributes of the pin are identified as legal attributes;
[0148] Process the pin according to the preset attributes.
[0149] Wherein, the acquisition module 201 is configured as follows:
[0150] The attribute of the pin is obtained in a device-tree configuration file of the electronic device.
[0151] Wherein, the calling module 202 is configured as follows:
[0152] The processing module for calling the preset attribute of the pin is set in the processing layer of the calling chip, so that when the Probe function is called, the pin is processed according to the preset attribute.
[0153] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0154] Fig.111 is a block diagram of a device 1100 for predicting product sales according to an exemplary embodiment. For example, the device 1100 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0155] Reference Fig.11 , the device 1100 may include one or more of the following components: a processing component 1102 , a memory 1104 , a power component 1106 , a multimedia component 1108 , an audio component 1110 , an input / output (I / O) interface 1112 , a sensor component 1114 , and a communication component 1116 .
[0156] The processing component 1102 generally controls the overall operation of the device 1100, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1102 may include one or more processors 1120 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 1102 may include one or more modules to facilitate interaction between the processing component 1102 and other components. For example, the processing component 1102 may include a multimedia module to facilitate interaction between the multimedia component 1108 and the processing component 1102.
[0157] The memory 1104 is configured to store various types of data to support operations on the device 1100. Examples of such data include instructions for any application or method operating on the device 1100, contact data, phone book data, messages, pictures, videos, etc. The memory 1104 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 memory, flash memory, magnetic disk or optical disk.
[0158] The power component 1106 provides power to the various components of the device 1100. The power component 1106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 1100.
[0159] The multimedia component 1108 includes a screen that provides an output interface between the device 1100 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 touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1108 includes a front camera and / or a rear camera. When the device 1100 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0160] The audio component 1110 is configured to output and / or input audio signals. For example, the audio component 1110 includes a microphone (MIC), and when the device 1100 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1104 or sent via the communication component 1116. In some embodiments, the audio component 1110 also includes a speaker for outputting audio signals.
[0161] I / O interface 1112 provides an interface between processing component 1102 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0162] The sensor assembly 1114 includes one or more sensors for providing various aspects of the status assessment of the device 1100. For example, the sensor assembly 1114 can detect the open / closed state of the device 1100, the relative positioning of components, such as the display and keypad of the device 1100, the sensor assembly 1114 can also detect the position change of the device 1100 or a component of the device 1100, the presence or absence of user contact with the device 1100, the orientation or acceleration / deceleration of the device 1100, and the temperature change of the device 1100. The sensor assembly 1114 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1114 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1114 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0163] The communication component 1116 is configured to facilitate wired or wireless communication between the device 1100 and other devices. The device 1100 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1116 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1116 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0164] In an exemplary embodiment, the device 1100 can 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 above methods.
[0165] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1104 including instructions, and the instructions can be executed by the processor 1120 of the device 1100 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0166] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform a pin configuration method, the configuration method comprising:
[0167] Configuring the pin to a preset attribute, wherein the preset attribute includes ignoring the configured attribute of the pin;
[0168] A processing module for processing the preset attributes of the pin is set; the processing module for processing the preset attributes of the pin is used to execute the processing flow of the preset attributes of the pin, so that when the Probe function is called, the pin is processed according to the preset attributes.
[0169] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform a pin configuration method, the configuration method comprising:
[0170] Get the properties of the pin;
[0171] When the attribute of the pin is a preset attribute, a processing module of the preset attribute of the pin is called so that when the Probe function is called, the pin is processed according to the preset attribute; the preset attribute includes an attribute of ignoring the configuration of the pin.
[0172] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0173] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A pin configuration method, applied to electronic equipment, It is characterized in that The pin configuration method is applied to the configuration of the pin when calling the Probe function, and the configuration method includes: Configuring the pin to have a preset attribute, wherein the preset attribute includes ignoring an attribute configured for the pin; A processing module for processing the preset attributes of the pin is set; the processing module for processing the preset attributes of the pin is used to execute the processing flow of the preset attributes of the pin; The attribute of ignoring the configuration of the pin can make the preset attribute of the pin processed by the processing module when the Probe function is called, and the processing module is used to cancel the configuration of the pin and the setting of the register corresponding to the pin.
2. The pin configuration method according to claim 1, It is characterized in that The processing module for setting and processing the preset attributes of the pin includes: Setting a recognition module for the preset attribute of the pin, wherein the recognition module for the preset attribute of the pin is used to recognize the preset attribute of the pin, so that when the Probe function is called, the preset attribute of the pin is recognized as a legal attribute; A processing module for the preset attributes of the pin is set, and the processing module for the preset attributes of the pin is used to process the pin according to the preset attributes when calling the Probe function.
3. The pin configuration method according to claim 1, It is characterized in that The configuring the pin to have a preset attribute includes: The pin is configured as a preset attribute in a device-tree configuration file of the electronic device.
4. The pin configuration method according to claim 1, It is characterized in that The calling module for setting the preset attribute of the pin includes: A calling module for calling the preset attribute of the pin is set at the processing layer of the chip.
5. A pin configuration method, applied to electronic equipment, It is characterized in that The pin configuration method is applied to the configuration of the pin when calling the Probe function, and the configuration method includes: Get the properties of the pin; When the attribute of the pin is a preset attribute, calling a processing module of the preset attribute of the pin; the preset attribute includes an attribute of ignoring the configuration of the pin; The attribute of ignoring the configuration of the pin can make the preset attribute of the pin processed by the processing module when the Probe function is called, and the processing module is used to cancel the configuration of the pin and the setting of the register corresponding to the pin.
6. The configuration method according to claim 5, It is characterized in that When the attribute of the pin is a preset attribute, calling the processing module of the preset attribute of the pin so that when the Probe function is called, the pin is processed according to the preset attribute includes: Identify the preset attributes of the pin so that when the Probe function is called, the preset attributes of the pin are identified as legal attributes; Process the pin according to the preset attributes.
7. The pin configuration method according to claim 5, It is characterized in that The obtaining of the pin attributes includes: The attribute of the pin is obtained in a device-tree configuration file of the electronic device.
8. The pin configuration method according to claim 5, It is characterized in that The processing module for calling the preset attribute of the pin so that when the Probe function is called, the pin is processed according to the preset attribute comprises: The processing module for calling the preset attribute of the pin is set in the processing layer of the calling chip, so that when the Probe function is called, the pin is processed according to the preset attribute.
9. A pin configuration device, It is characterized in that The pin configuration device is applied to the configuration of the pin when calling the Probe function, and the configuration device includes: A configuration module, configured to configure the pin to a preset attribute, wherein the preset attribute includes ignoring an attribute of the configuration of the pin; A setting module, which is used to set a processing module for processing the preset attributes of the pin pin; the processing module for processing the preset attributes of the pin pin is used to execute the processing flow of the preset attributes of the pin pin; The attribute of ignoring the configuration of the pin can make the preset attribute of the pin processed by the processing module when the Probe function is called, and the processing module is used to cancel the configuration of the pin and the setting of the register corresponding to the pin.
10. The pin configuration device according to claim 9, It is characterized in that The setting module is configured to: Setting a recognition module for the preset attribute of the pin, wherein the recognition module for the preset attribute of the pin is used to recognize the preset attribute of the pin, so that when the Probe function is called, the preset attribute of the pin is recognized as a legal attribute; A processing module for the preset attributes of the pin is set, and the processing module for the preset attributes of the pin is used to process the pin according to the preset attributes when calling the Probe function.
11. The pin configuration device according to claim 9, It is characterized in that The configuration module is configured to: The pin is configured as a preset attribute in the device-tree of the electronic device.
12. The pin configuration device according to claim 9, It is characterized in that The setting module is configured to: A calling module for calling the preset attributes of the pin is set at the processing layer of the chip.
13. A pin configuration device, It is characterized in that The pin configuration device is applied to the configuration of the pin when the Probe function is called, and the configuration device includes: An acquisition module, configured to acquire the attribute of the pin; A calling module, when the attribute of the pin is a preset attribute, calling a processing module of the preset attribute of the pin; the preset attribute includes an attribute of ignoring the configuration of the pin; The attribute of ignoring the configuration of the pin can make the preset attribute of the pin processed by the processing module when the Probe function is called, and the processing module is used to cancel the configuration of the pin and the setting of the register corresponding to the pin.
14. The configuration device according to claim 13, It is characterized in that The calling module is configured as follows: Identify the preset attributes of the pin so that when the Probe function is called, the preset attributes of the pin are identified as legal attributes; Process the pin according to the preset attributes.
15. The pin configuration device according to claim 13, It is characterized in that The acquisition module is configured as follows: The attribute of the pin is obtained in a device-tree configuration file of the electronic device.
16. The pin configuration device according to claim 13, It is characterized in that The calling module is configured as follows: The processing module for calling the preset attribute of the pin is set in the processing layer of the calling chip, so that when the Probe function is called, the pin is processed according to the preset attribute.
17. A pin configuration device, It is characterized in that include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Configuring the pin to a preset attribute, wherein the preset attribute includes ignoring the configured attribute of the pin; A processing module for processing the preset attributes of the pin is set; the processing module for processing the preset attributes of the pin is used to execute the processing flow of the preset attributes of the pin; The attribute of ignoring the configuration of the pin can make the preset attribute of the pin processed by the processing module when the Probe function is called, and the processing module is used to cancel the configuration of the pin and the setting of the register corresponding to the pin.
18. A pin configuration device, It is characterized in that include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Get the properties of the pin; When the attribute of the pin is a preset attribute, calling a processing module of the preset attribute of the pin; the preset attribute includes an attribute of ignoring the configuration of the pin; The attribute of ignoring the configuration of the pin can make the preset attribute of the pin processed by the processing module when the Probe function is called, and the processing module is used to cancel the configuration of the pin and the setting of the register corresponding to the pin.
19. A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform a pin configuration method, the configuration method include: Configuring the pin to a preset attribute, wherein the preset attribute includes ignoring the configured attribute of the pin; Setting a processing module for processing the preset attributes of the pin; The processing module for processing the preset attributes of the pin pin is used to execute the processing flow of the preset attributes of the pin pin; The attribute of ignoring the configuration of the pin can make the preset attribute of the pin processed by the processing module when the Probe function is called, and the processing module is used to cancel the configuration of the pin and the setting of the register corresponding to the pin.
20. A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform a pin configuration method, the configuration method include: Get the properties of the pin; When the attribute of the pin is a preset attribute, calling a processing module of the preset attribute of the pin; The preset attribute includes an attribute for ignoring the configuration of the pin; The attribute of ignoring the configuration of the pin can make the preset attribute of the pin processed by the processing module when the Probe function is called, and the processing module is used to cancel the configuration of the pin and the setting of the register corresponding to the pin.
