Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, some terms or terms appearing in the description of the embodiments of the present invention are applicable to the following explanations:
UCSI, English is called USB Type-C Connector System Software Interface, Chinese is called USB Type-C Connector System Software Interface.
The EC is called Embedded Controller in English, the Embedded Controller in Chinese is used for executing a control system with an appointed independent control function and the capability of processing data in a complex mode, and comprises an Embedded microelectronic technology chip for controlling electronic equipment or devices, so that various automatic processing tasks such as monitoring, control and the like can be completed.
PD, also known collectively as Power Delivery, is a protocol specification for simultaneously supporting up to 100W (5V, 12A) Power transmission and data communications in a cable, and requests the charger to adjust the output voltage and circuitry by coupling an FSK signal on the VBUS dc level of the Power connection.
In accordance with an embodiment of the present invention, there is provided an embodiment of a control method for an interface chip, it should be noted that the steps shown in the flowchart of the figure may be executed in a computer system such as a set of computer executable instructions, and that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown.
Fig. 1 is a flowchart of a control method of an optional interface chip according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, receiving a command which is issued by an operating system and used for controlling a preset interface chip incompatible with the operating system;
step S104, calling an interface function for controlling a preset interface chip in a chip function library according to the received command, wherein the chip function library comprises a plurality of interface functions for controlling different interface chips;
and step S105, controlling a preset interface chip according to the interface function.
According to the above embodiment of the present invention, under the condition that the operating system is incompatible with the predetermined interface chip, the command issued by the operating system for controlling the predetermined interface chip is received, the interface function corresponding to the predetermined interface chip and used for controlling the predetermined interface is called in the chip function library according to the command, and the predetermined interface chip is controlled according to the interface function, so that the technical effect that the operating system controls interface chips of different types or incompatible with the operating system can be achieved, and the technical problem that different interface chips are incompatible with the operating system is solved.
In step S102, the operating system issues the same command for controlling the interface chip to any interface chip, i.e., the operating system does not issue different types of commands for different interface chips.
Alternatively, the interface chip may be a power protocol chip and the predetermined interface chip may be a power protocol chip.
Optionally, the interface function corresponding to the predetermined interface chip is pre-stored in the chip function library, wherein after the predetermined interface chip is accessed, the type of the predetermined interface is identified, and the interface function corresponding to the type of the predetermined interface is stored in the chip function library.
Optionally, the predetermined interface chip is used for controlling the operation of the interface, for example, the control interface receives information, the control interface outputs information, and the control interface receives power.
Alternatively, the predetermined interface chip and the interface may be applied to a smart mobile terminal or a computer terminal, for example, a smart phone, a tablet computer, a notebook computer, a desktop computer, and the like.
Alternatively, the device may transmit information or transmit power through the interface. For example, the smart phone may transmit data with other terminal devices through the interface, and may also be charged through the interface, where the predetermined interface chip is used to control the interface to implement a data or charging function.
Alternatively, the predetermined interface chip may be a USB PD chip, wherein the USP PD chip may be applied in a Type-C interface, and power is adjusted to 100W (5V, 12A) power transmission supported by the Type-C interface through the USB PD chip.
Optionally, the interface function is an indication function for controlling a predetermined interface chip, and is used for controlling the predetermined interface chip through the interface function, so as to control the interface function.
Optionally, the chip function library stores interface functions corresponding to different interface chips in advance, and when a command issued by the operating system is received, the type of the predetermined interface chip may be detected first, and then the interface function corresponding to the type of the predetermined interface chip is extracted, so as to control the predetermined interface control chip according to the interface function.
Optionally, a plurality of interface functions corresponding to the predetermined interface chip may be included in the chip database, where each interface function is used to control the interface chip to implement a function of the interface.
For example, the predetermined interface chip a includes an interface function a1, an interface function a2, and an interface function A3 in a chip database, wherein the predetermined interface chip a may cause the interface to implement the function a1 under the control of the interface function a 1; wherein, the predetermined interface chip A can make the interface realize the function a2 under the control of the interface function A2; wherein, the predetermined interface chip a can make the interface realize the function a3 under the control of the interface function a 3.
Alternatively, the chip database may obtain the control function of the interface chip when the interface chip is accessed or replaced.
Alternatively, in the case of accessing or replacing the interface chip, the control function of the interface chip may be acquired from the accessed or replaced interface chip.
Alternatively, in the case of accessing or replacing the interface chip, the accessed or replaced interface chip may be detected, and then the control function corresponding to the interface chip may be downloaded over the internet.
As an optional embodiment, after receiving a command issued by an operating system for controlling a predetermined interface chip incompatible with the operating system, the embodiment may further include: judging the running state of a preset interface chip; and calling an interface function for controlling the predetermined interface chip when the predetermined interface chip is idle.
By adopting the above embodiment of the present invention, after receiving the command for controlling the predetermined interface chip, the operating state of the predetermined interface is determined, and the interface function for controlling the predetermined interface chip is invoked when the predetermined interface chip is idle, so that the control of the predetermined interface function can be realized without affecting the operation of the predetermined interface chip.
Optionally, the operation state of the predetermined interface chip refers to a process of calling the interface function from the chip function library to control the predetermined interface chip.
As an optional example, when a command a issued by an operating system is received, it is first determined whether an interface chip corresponding to the command a can call an interface function. For example, in the case where the interface chip is in a running state, the interface chip may not call the interface function; the interface function may be called while the interface chip is in an idle state. And under the condition that the interface chip is in an idle state, calling an interface function A corresponding to the preset interface chip according to the command A to control the preset interface chip.
As an alternative embodiment, after controlling the predetermined interface chip according to the interface function, the embodiment may further include: and in the case that the type of the preset interface chip is changed, transmitting the changed type of the preset interface chip to the operating system.
By adopting the embodiment of the invention, under the condition that the type of the preset interface chip is changed, the changed type of the preset interface chip is transmitted to the operating system, so that the interface function corresponding to the changed preset interface chip can be called according to the command of the operating system, and the modified preset interface chip is controlled.
As an alternative example, in the case where the type of the predetermined interface chip is an a chip, if the a chip is changed to a B chip, the type of the B chip is passed to the operating system. After the command is sent by the operating system, the interface function corresponding to the B chip can be called from the chip function library, so that the control of the B chip is realized.
As an alternative embodiment, the predetermined interface chip is a USB Type-C power protocol chip.
By adopting the embodiment of the invention, the USB Type-C power protocol chip is taken as the preset interface chip, the control of the USB Type-C power protocol chip by the operating system can be realized, and the control of the USB Type-C interface by the operating system is further realized.
The present invention also provides a preferred embodiment that provides a way to implement UCSI processing inside the EC
The invention provides an embedded controller EC, and the USB Type-C connector system software interface part of the embedded controller EC part is designed into 3 layers, so that an operating system can operate a PD chip of an interface through the embedded controller EC of the 3 layers, and the problem of incompatibility caused by the fact that the operating system directly controls the PD chip is avoided.
Fig. 2 is a schematic diagram of an alternative embedded controller EC according to an embodiment of the present invention, as shown in fig. 2, an Embedded Controller (EC)20 is divided into three layers, where the first Layer is a UCSI platform policy manager interface Layer 21(UCSI ppm interface Layer) and is responsible for interacting with an interface of an operating system to parse commands of the operating system; the second Layer is a UCSI platform policy manager Translation Layer 23(UCSI PPM Translation Layer) which is responsible for distributing and processing different requests or commands of the operating system and then transmitting the requests or commands to the lower Layer for processing; the third chip execution layer 25 is responsible for the operations on the individual chips.
Alternatively, the chip execution Layer may be an ANX chip execution Layer (ANX Operation Layer).
Optionally, different types of PD chips are connected to the embedded controller EC in different ways, and the output and input of the selective control power supply line VBUS are different.
Fig. 3 is a schematic diagram of an alternative interface chip connection manner according to an embodiment of the present invention, as shown in fig. 3, an Embedded Controller (EC)30 is connected to a predetermined interface chip 36 through a pair of I2C signal lines, and 2 GPIO control lines and an interrupt signal line 31, where the pair of I2C signal lines includes an I2C clock signal line 32 and an I2C data line 33, the two GPIO control lines include a power enable control line 34 and a reset control line 35, and the predetermined interface chip 36 is connected to a USB Type-C connector 37 for controlling the USB Type-C connector 37 through the predetermined interface chip 36.
Alternatively, the predetermined interface chips may include Oho series chips and MI1 series chips. Optionally, the UCSI is mainly used in the embedded controller EC to receive a command issued by the operating system, execute the command, and return an execution result of the command to the operating system.
Alternatively, when a change occurs in the physical hardware, the event of the change may be passed to the operating system.
Alternatively, in the case where the type of the predetermined interface chip is changed, the changed type of the predetermined interface chip may be uploaded to the operating system.
Fig. 4 is a schematic diagram of an alternative interaction between an embedded controller EC and an operating system according to an embodiment of the present invention, and as shown in fig. 4, an Embedded Controller (EC)40 may return an execution result/send an asynchronous notification to an operating system 42 through a UCSI platform policy manager interface layer 41, and may also receive a command sent by the operating system 42.
Optionally, after receiving a command issued by the system, a UCSI platform policy manager Interface Layer (UCSI PPM Interface Layer) first enters a state determination process, and if the current Embedded Controller (EC) is idle and allows to execute the command, calls a corresponding Interface of a platform policy manager Translation Layer (PPM Translation Layer) to execute the command.
According to another aspect of the present invention, an embodiment of the present invention further provides a storage medium, where the storage medium includes a stored program, and when the program runs, the apparatus on which the storage medium is located is controlled to execute the control method of the interface chip.
According to another aspect of the present invention, an embodiment of the present invention further provides a processor, where the processor is configured to execute a program, where the program executes the control method of the interface chip when running.
According to an embodiment of the present invention, an embodiment of a control device of an interface chip is further provided, where it is to be noted that the control device of the interface chip may be configured to execute the control method of the interface chip in the embodiment of the present invention, and the control method of the interface chip in the embodiment of the present invention may be executed in the control device of the interface chip.
Fig. 5 is a schematic diagram of a control device of an alternative interface chip according to an embodiment of the present invention, and as shown in fig. 5, the control device may include:
a receiving unit 51, configured to receive a command issued by an operating system and used to control a predetermined interface chip incompatible with the operating system; a calling unit 53, configured to call, according to the received command, an interface function for controlling a predetermined interface chip in a chip function library, where the chip function library includes a plurality of interface functions for controlling different interface chips; and a control unit 55 for controlling a predetermined interface chip according to the interface function.
It should be noted that the receiving unit 51 in this embodiment may be configured to execute step S102 in this embodiment, the invoking unit 53 in this embodiment may be configured to execute step S104 in this embodiment, and the controlling unit 55 in this embodiment may be configured to execute step S106 in this embodiment. The modules are the same as the corresponding steps in the realized examples and application scenarios, but are not limited to the disclosure of the above embodiments.
According to the above embodiment of the present invention, under the condition that the operating system is incompatible with the predetermined interface chip, the command issued by the operating system for controlling the predetermined interface chip is received, the interface function corresponding to the predetermined interface chip and used for controlling the predetermined interface is called in the chip function library according to the command, and the predetermined interface chip is controlled according to the interface function, so that the technical effect that the operating system controls interface chips of different types or incompatible with the operating system can be achieved, and the technical problem that different interface chips are incompatible with the operating system is solved.
As an alternative embodiment, the embodiment may further include: the judging unit is used for judging the running state of a preset interface chip after receiving a command which is issued by an operating system and used for controlling the preset interface chip incompatible with the operating system; and the calling unit is used for calling the interface function for controlling the preset interface chip under the condition that the preset interface chip is idle.
As an alternative embodiment, the embodiment may further include: and the transmission unit is used for transmitting the type of the preset interface chip after being changed to the operating system under the condition that the type of the preset interface chip is changed after the preset interface chip is controlled according to the interface function.
As an alternative embodiment, the predetermined interface chip is a USB Type-C power protocol chip.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.