CN115562727A - Power state control method, processor and related equipment - Google Patents

Power state control method, processor and related equipment Download PDF

Info

Publication number
CN115562727A
CN115562727A CN202211182319.1A CN202211182319A CN115562727A CN 115562727 A CN115562727 A CN 115562727A CN 202211182319 A CN202211182319 A CN 202211182319A CN 115562727 A CN115562727 A CN 115562727A
Authority
CN
China
Prior art keywords
power
electronic device
state
processor
interrupt request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211182319.1A
Other languages
Chinese (zh)
Inventor
李泓霖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Feiteng Technology Changsha Co ltd
Phytium Technology Co Ltd
Original Assignee
Feiteng Technology Changsha Co ltd
Phytium Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Feiteng Technology Changsha Co ltd, Phytium Technology Co Ltd filed Critical Feiteng Technology Changsha Co ltd
Priority to CN202211182319.1A priority Critical patent/CN115562727A/en
Publication of CN115562727A publication Critical patent/CN115562727A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30076Arrangements for executing specific machine instructions to perform miscellaneous control operations, e.g. NOP
    • G06F9/30083Power or thermal control instructions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Power Sources (AREA)

Abstract

The invention provides a power state control method, a processor and related equipment, wherein a GPIO (general purpose input/output) interface of the processor is connected with other hardware of electronic equipment, and the power state control method comprises the following steps: the processor receives an interrupt request input by the GPIO interface, wherein the interrupt request represents a power state switching event of the electronic device, the GPIO interface is configured to generate the interrupt request based on a trigger signal output by other hardware, and the other hardware is configured to generate the trigger signal based on user operation; the processor responds to the interrupt request and controls to switch the power state of the electronic equipment to the power state indicated by the state control instruction based on the state control instruction input by the user, wherein the power state at least comprises a normal power-off state, so that the power control functions of other hardware of the electronic equipment, such as a power key, can be increased, and the experience effect of the user is improved.

Description

Power state control method, processor and related equipment
Technical Field
The invention relates to the technical field of power management, in particular to a power state control method, a processor and related equipment.
Background
At present, although a user can realize a forced shutdown function by long-pressing a power key of an electronic device in a power-on state of the electronic device, the user cannot trigger the electronic device to realize other functions such as normal shutdown and hibernation by pressing the power key, so that a power control function of the power key is single, and the experience effect of the user is poor.
Disclosure of Invention
The invention provides a power state control method, a processor and related equipment, which are used for increasing the power control function of hardware such as a power key and the like and improving the experience effect of a user.
In a first aspect, the present invention provides a power state control method, where the power state control method is applied to a processor of an electronic device, where the processor includes a GPIO interface, and the GPIO interface is connected to other hardware of the electronic device, and the power state control method includes:
the processor receives an interrupt request input by the GPIO interface, wherein the interrupt request represents a power state switching event of the electronic device, the GPIO interface is configured to generate an interrupt request based on a trigger signal output by the other hardware, and the other hardware is configured to generate the trigger signal based on a user operation;
and the processor responds to the interrupt request and controls to switch the power state of the electronic equipment to the power state indicated by the state control instruction based on the state control instruction input by the user, wherein the power state at least comprises a normal shutdown state.
Optionally, the other hardware of the electronic device includes a power key, and the receiving, by the processor, the interrupt request input by the GPIO interface includes:
the processor receives an interrupt request input by the power key through the GPIO interface, the GPIO interface is configured to generate the interrupt request based on a trigger signal output by the power key, and the power key is configured to generate the trigger signal based on a short-press operation of a user.
Optionally, the electronic device further includes a power management module, where the power management module is configured to manage a power state of the electronic device, the power management module is connected to the processor, and the controlling, by the processor, the switching the power state of the electronic device to the power state indicated by the state control instruction includes:
and the processor controls the power management module to switch the power state of the electronic equipment to the power state indicated by the state control instruction.
Optionally, the electronic device further includes a human-computer interaction module, the human-computer interaction module is connected to the processor, and after the processor responds to the interrupt request, the electronic device further includes:
the processor controls the human-computer interaction module to display a plurality of power states of the electronic equipment, and receives a state control instruction input by the human-computer interaction module after a user selects one of the plurality of power states.
Optionally, the power state indicated by the state control instruction includes a normal shutdown state, a restart state, or a hibernation state.
In a second aspect, the present invention provides a processor for executing instructions, which when executed perform the power state control method as defined in any one of the above.
In a third aspect, the invention provides a computer readable storage medium having stored thereon instructions for executing the power state control method as described in any one of the above.
In a fourth aspect, the present invention provides an electronic device, where the electronic device includes a processor, the processor includes a GPIO interface, the GPIO interface is connected to other hardware of the electronic device, the GPIO interface is configured to generate an interrupt request based on a trigger signal output by the other hardware, the other hardware is configured to generate the trigger signal based on a user operation, and the processor is configured to receive the interrupt request input by the GPIO interface, where the interrupt request represents a power state switching event of the electronic device, respond to the interrupt request, and control, based on a state control instruction input by a user, to switch a power state of the electronic device to a power state indicated by the state control instruction, where the power state at least includes a normal power-off state.
Optionally, the other hardware of the electronic device includes a power key, the processor is configured to receive an interrupt request input by the power key through the GPIO interface, the GPIO interface is configured to generate an interrupt request based on a trigger signal output by the power key, and the power key is configured to generate the trigger signal based on a short-press operation by a user.
Optionally, the electronic device further includes a power management module, where the power management module is configured to manage a power state of the electronic device, the power management module is connected to the processor, and the processor is configured to control the power management module to switch the power state of the electronic device to a power state indicated by the state control instruction.
Optionally, the electronic device further includes a human-computer interaction module, the human-computer interaction module is connected to the processor, and the processor is further configured to control the human-computer interaction module to display multiple power states of the electronic device, and receive a state control instruction input by the human-computer interaction module after a user selects one of the multiple power states.
Optionally, the electronic device further includes a level conversion module, other hardware of the electronic device is connected to the GPIO interface through the level conversion module, and the level conversion module is configured to perform level conversion on the trigger signal output by the other hardware and then output the trigger signal to the GPIO interface.
Optionally, the power state indicated by the state control instruction includes a normal shutdown state, a restart state, or a hibernation state.
The GPIO interface of the processor is connected with other hardware of the electronic device, such as a power key, the other hardware, such as the power key, is configured to generate a trigger signal based on user operation, the GPIO interface is configured to generate an interrupt request for indicating a power state switching event of the electronic device based on the trigger signal output by the other hardware, such as the power key, and the processor responds to the interrupt request after receiving the interrupt request input by the GPIO interface and controls to switch the power state of the electronic device to a power state indicated by a state control instruction based on the state control instruction input by a user, wherein the power state at least comprises a normal power-off state, so that the power control function of the other hardware of the electronic device, such as the power key, can be increased, and the experience effect of the user is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the background art of the present invention, the drawings required to be used in the embodiments or the background art of the present invention will be described below.
Fig. 1 is a flowchart of a power state control method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of another electronic device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of another electronic device according to an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating a power state switching according to an embodiment of the invention;
fig. 6 is a schematic structural diagram of another electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all 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 application.
As an optional implementation of the disclosure, an embodiment of the present invention provides a power state control method, which is applied to a processor of an electronic device, as shown in fig. 1, where fig. 1 is a flowchart of the power state control method provided in the embodiment of the present invention, and the power state control method includes:
s101: the processor receives an interrupt request input by the GPIO interface, wherein the interrupt request represents a power state switching event of the electronic device, the GPIO interface is configured to generate the interrupt request based on a trigger signal output by other hardware, and the other hardware is configured to generate the trigger signal based on user operation;
in the embodiment of the present invention, an interface of a processor (Central Processing Unit, CPU for short) includes a GPIO (General-purpose input/output) interface, where the interface may also be referred to as a PIN or a PIN.
As shown in fig. 2, fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, at least one GPIO interface of the processor 10 is connected to other hardware 11 of the electronic device, and the other hardware 11 is configured to generate a trigger signal based on a user operation, and the GPIO interface is configured to generate an interrupt request indicating a power state switching event of the electronic device based on the trigger signal output by the other hardware 11.
Other hardware includes, but is not limited to, power keys and sensors of the electronic device, among others. The power key can be a power control key on a mainboard of the electronic equipment, the processor can also be a processor on the mainboard of the electronic equipment, the sensor can be an optical sensor or a pressure sensor in the electronic equipment, and the electronic equipment can be a computer, a mobile phone, a camera or a tablet computer.
S102: the processor responds to the interrupt request and controls the power state of the electronic equipment to be switched into one power state indicated by the state control instruction based on the state control instruction input by the user.
In the embodiment of the invention, when the electronic device is in the power-on state, a user applies corresponding operation to other hardware of the electronic device to enable the other hardware to output the trigger signal to the GPIO interface of the processor, the GPIO interface can generate an interrupt request representing a power state switching event of the electronic device and input the interrupt request to the processor, then the processor can respond to the interrupt request and control the switching of the power state of the electronic device to one power state indicated by the state control instruction based on the state control instruction input by the user, wherein the power state indicated by the state control instruction at least comprises a normal power-off state, so that the power state control function of other hardware of the electronic device, such as a power key, can be increased, and the use experience effect of the user is improved.
In some embodiments of the present invention, the other hardware of the electronic device may include a power key, and the receiving, by the processor, the interrupt request input by the GPIO interface includes: the processor receives an interrupt request input by the power key through the GPIO interface, the GPIO interface is configured to generate the interrupt request based on a trigger signal output by the power key, and the power key is configured to generate the trigger signal based on a short-press operation of a user.
When the electronic equipment is in a starting state, the power key outputs a level signal to the GPIO interface, if the power key is not pressed for a short time, the level signal output to the GPIO interface by the power key is kept unchanged, if the power key is pressed for a short time, the level signal output to the GPIO interface by the power key jumps, and after a GPIO controller of the GPIO interface monitors a jump edge (such as a rising edge or a falling edge) of the level signal, a corresponding interrupt request is generated and input to the processor, and the processor controls the power state of the electronic equipment to be switched to the power state indicated by the state control instruction by responding to the interrupt request and the state control instruction input by a user.
It should be noted that each GPIO interface corresponds to a setting register, and the state of the GPIO interface is configured through the setting register. When the data 0 is written into the flag bit of the register, the register disables the corresponding bit configuration interrupt of the GPIO interface, so that the GPIO interface enables the input and output functions; when the data 1 is written into the flag bit of the register, the register configures the corresponding bit of the GPIO interface to enable interrupt, so that the GPIO interface enables the interrupt trigger function. The BIOS system or OS system or the like may write data 1 or 0 into the register to enable or turn off the GPIO interrupt function through the register.
Of course, the present invention is not limited to this, and in other embodiments, other hardware of the electronic device may further include a sensor, for example, an optical sensor in the camera, and the user may trigger the optical sensor to generate a trigger signal by blocking the optical lens, and transmit the trigger signal to the GPIO interface of the processor, so that the GPIO interface generates an interrupt request indicating a power state switching event of the electronic device. In other embodiments, other hardware of the electronic device may also be a pressure sensor, and so on, which are not described herein again.
It should be noted that, in the embodiment of the present invention, when the electronic device is in the power-on state, the power key may be switched to the power state indicated by the state control instruction through the interrupt request after being pressed for a short time by the user, where the power state at least includes a normal power-off state; when the electronic equipment is in a power-off state, the power key can control the power state of the electronic equipment to be switched to a power-on state after being pressed by a user for a short time; when the electronic equipment is in a power-on state, the power key is pressed by a user for a long time, and the power state of the electronic equipment is controlled to be switched into a forced power-off state.
Wherein, the short-press of the power key means that the time for pressing the power key is between 1 second and 2 seconds, and the long-press of the power key means that the time for pressing the power key is more than 4 seconds. It is understood that the normal shutdown state is another shutdown state relative to the forced shutdown state. After the electronic equipment enters a normal shutdown state, the power supply of each part is stopped in sequence according to a power-down sequence; after the electronic device enters the forced shutdown state, the power supply of all the components can be stopped instantaneously. Although multiple forced shutdowns may cause irreversible damage to components of the electronic device, forced shutdown functionality is still required to restart the electronic device in the event that the operating system of the electronic device does not respond.
In some embodiments of the present invention, the power states indicated by the state control instruction may only include a normal shutdown state, but the present invention is not limited thereto.
Based on this, in some embodiments of the present invention, the electronic device may display a plurality of selectable power states through the human-computer interaction module or the display module, so that the user can select one of the power states. And, the user can input a state control command indicating a selected one of the power states through the man-machine interaction module or other hardware such as a power key or a sensor.
In some embodiments of the present invention, as shown in fig. 3, fig. 3 is a schematic structural diagram of another electronic device according to an embodiment of the present invention, where the electronic device further includes a human-computer interaction module 12, the human-computer interaction module 12 may include a touch display screen, and the human-computer interaction module 12 is connected to the processor 10, and after the processor 10 responds to an interrupt request, the method for controlling a power state further includes: the processor 10 controls the human-computer interaction module to display a plurality of power states of the electronic device, and receives a state control command input by the human-computer interaction module after a user selects one of the plurality of power states.
The example that a user needs to control the electronic device to enter a normal shutdown state is described, when the electronic device is in the startup state, after the user inputs an interrupt request to the processor through other hardware of the electronic device, such as a power key, the processor responds to the interrupt request to control the human-computer interaction module to display multiple power states of the electronic device, such as a normal shutdown state, a sleep state, a restart state, and the like, after the user selects one of the multiple power states, such as the normal shutdown state, the human-computer interaction module inputs a normal shutdown state control instruction to the processor, and the processor controls to switch the power state of the electronic device to the normal shutdown state based on the normal shutdown state control instruction.
Of course, the present invention is not limited to this, in other embodiments, the processor may further control the display screen to display multiple power states of the electronic device, and the user may further select one of the multiple power states by pressing the power key again or blocking the camera again, or by pressing the mouse or the keyboard, and input a state control instruction to the processor, which is not described herein again.
In some embodiments of the present invention, as shown in fig. 4, fig. 4 is a schematic structural diagram of another electronic device according to an embodiment of the present invention, where the electronic device further includes a power management module 13, the power management module 13 is configured to manage a power state of the electronic device, and the power management module 13 is connected to the processor 10. The processor 10 controls to switch the power state of the electronic device to one of the power states indicated by the state control instruction, including: the processor 10 controls the power management module 13 to switch the power state of the electronic device to a power state indicated by the state control instruction.
Taking other hardware as a power key as an example, as shown in fig. 5, fig. 5 is a schematic diagram of switching a power state provided in an embodiment of the present invention, when an electronic device is in a power-on state, after the power key is pressed for a short time by a user, a GPIO interface inputs an interrupt request to a processor, after the processor responds to the interrupt request and a state control instruction input by the user, the processor sends a control instruction to a power management module, and switches the power state of the electronic device to a power state indicated by the state control instruction by controlling the power management module, where one power state indicated by the state control instruction may be a normal power-off state, a sleep state, or a restart state.
In the embodiment of the present invention, the power key may also be directly connected to the power management module, as shown in fig. 5, when the electronic device is in the power-off state, the power key is pressed for a short time to input a power-on instruction to the power management module, so as to control the electronic device to power on; when the electronic equipment is in a power-on state, a forced power-off instruction is input to the power management module by long pressing of a power key, so that the electronic equipment is controlled to be forced to be powered off. The GPIO controller of the GPIO interface can determine whether the power key is pressed for a short time or a long time according to the jumping edge and the jumping duration of the output signal of the power key.
In some embodiments of the present invention, as shown in fig. 6, fig. 6 is a schematic structural diagram of another electronic device provided in the embodiments of the present invention, where the electronic device further includes a level conversion module 14, other hardware 11 of the electronic device is connected to the GPIO interface through the level conversion module 14, and the level conversion module 14 is configured to perform level conversion on a trigger signal output by the other hardware 11 and output the trigger signal to the GPIO interface.
Because the upper limit of the level of the GPIO interface of the processor is 1.8V, and the high-level signal of the power key is generally 3.3V, the level signal output by the power key can be converted into a proper level signal and then transmitted to the GPIO interface, so that the normal operation of the GPIO interface is not influenced.
In the embodiment of the present invention, at a BIOS (Basic Input Output System) start stage of a processor, a GPIO interface is initialized to have a GPIO function, and an interrupt trigger function is enabled. The BIOS system may describe an AEI object and a method (method) function unit through an Advanced Configuration and Power Management Interface (ACPI) table, and bind the AEI object to the GPIO controller, so as to respond to a trigger signal received by the GPIO Interface through the GPIO controller and the method function unit, where the ACPI table may also describe information such as an interrupt number and an interrupt trigger manner, so as to identify a trigger signal that can trigger an interrupt request from a signal received by the GPIO Interface.
When other hardware such as a power key outputs a trigger signal to the GPIO interface, the GPIO controller generates an interrupt request, the GPIO controller aggregates the interrupt request and sends the interrupt request to the interrupt controller, the interrupt controller sends the interrupt request to an interrupt service unit of an Operating System (OS for short) of each processor core, and the interrupt service unit routes the interrupt request to a method function unit described in an ACPI table for processing. Wherein, the interrupt service unit is described as Exx method in ACPI table, and xx represents the event number.
In the process that the processor responds to the interrupt request, the method function unit disables the interrupt source of the GPIO interface and clears the interrupt state bit of the GPIO interface, so that the GPIO interface cannot receive the trigger signal, and then the method function unit reports a power state switching event to the OS system in a notify mode, wherein the power state switching event can be represented as a 0x80 event and represents that a power key is short-pressed in a starting state, namely an S0 state. Then the OS system controls the human-computer interaction module to display the selectable power states, then the OS system enables an interrupt source capable of the GPIO interface to enable the GPIO interface to receive signals, then the OS system sends a control instruction to the power management module, and the power state of the electronic device is switched to be the power state indicated by the state control instruction by controlling the power management module.
As another alternative implementation of the disclosure, an embodiment of the present invention provides a processor, where the processor is configured to execute an instruction, and when the instruction is executed, the power state control method provided in any embodiment is executed.
As another alternative implementation of the disclosure, an embodiment of the present invention provides a computer-readable storage medium, on which a method for executing power state control provided in any embodiment is stored.
As another optional implementation of the disclosure, an embodiment of the present invention provides an electronic device, as shown in fig. 2, the electronic device includes a processor 10, the processor 10 includes a GPIO interface, the GPIO interface is connected to other hardware 11 of the electronic device, the GPIO interface is configured to generate an interrupt request based on a trigger signal output by the other hardware 11, the other hardware 11 is configured to generate a trigger signal based on a user operation, the processor 10 is configured to receive the interrupt request input by the GPIO interface, the interrupt request indicates a power state switching event of the electronic device, respond to the interrupt request, and control, based on a state control instruction input by a user, to switch a power state of the electronic device to a power state indicated by the state control instruction, where the power state at least includes a normal power-off state.
Other hardware 11 includes, but is not limited to, power keys and sensors of the electronic device. The power key may be a power control key on a motherboard of the electronic device, the processor 10 may also be a processor on the motherboard of the electronic device, the sensor may be an optical sensor or a pressure sensor in the electronic device, and the electronic device may be a computer, a mobile phone, a camera, a tablet computer, or the like.
In the embodiment of the present invention, when the electronic device is in the power-on state, a user applies corresponding operations to other hardware 11 of the electronic device, so that the other hardware 11 outputs a trigger signal to a GPIO interface of the processor 10, the GPIO interface generates an interrupt request indicating a power state switching event of the electronic device, and inputs the interrupt request to the processor 10, and then the processor 10 responds to the interrupt request and controls, based on a state control instruction input by the user, to switch the power state of the electronic device to a power state indicated by the state control instruction, where the power state indicated by the state control instruction at least includes a normal power-off state, so that a power state control function of other hardware 11 of the electronic device, such as a power key, can be increased, and a user experience effect is improved.
In some embodiments of the present invention, the other hardware of the electronic device includes a power key, the processor 10 is configured to receive an interrupt request input by the power key through a GPIO interface, the GPIO interface is configured to generate the interrupt request based on a trigger signal output by the power key, and the power key is configured to generate the trigger signal based on a short-press operation by a user.
When the electronic device is in a power-on state, if the power key is pressed for a short time, a level signal output by the power key to the GPIO interface jumps, a GPIO controller of the GPIO interface generates a corresponding interrupt request after monitoring a jump edge (such as a rising edge or a falling edge) of the level signal and inputs the interrupt request to the processor, and the processor controls the power state of the electronic device to be switched to a power state indicated by a state control instruction by responding to the interrupt request and the state control instruction input by a user.
In some embodiments of the present invention, as shown in fig. 3, the electronic device further includes a human-computer interaction module 12, the human-computer interaction module 12 is connected to the processor 10, and the processor 10 is further configured to control the human-computer interaction module 12 to display a plurality of power states of the electronic device, and receive a state control instruction input by the human-computer interaction module after a user selects one of the plurality of power states.
Of course, the present invention is not limited to this, in other embodiments, the processor may further control the display screen to display multiple power states of the electronic device, and the user may further select one of the multiple power states by pressing the power key again or blocking the camera again, or by pressing the mouse or the keyboard, and input a state control instruction to the processor, which is not described herein again.
In some embodiments of the present invention, as shown in fig. 4, the electronic device further includes a power management module 13, where the power management module 13 is configured to control a power state of the electronic device, the power management module 13 is connected to the processor 10, and the processor 10 is configured to control the power management module 13 to switch the power state of the electronic device to a power state indicated by the state control instruction.
In some embodiments of the present invention, as shown in fig. 6, the electronic device further includes a level conversion module 14, other hardware 11 of the electronic device is connected to the GPIO interface through the level conversion module 14, and the level conversion module 14 is configured to perform level conversion on the trigger signal output by the other hardware and output the trigger signal to the GPIO interface.
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present specification, and the description thereof is specific and detailed, but not to be construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present description, which falls within the scope of protection of the present description. Therefore, the protection scope of the patent of the specification shall be subject to the appended claims.

Claims (13)

1. A power state control method is applied to a processor of an electronic device, the processor comprises a GPIO interface, the GPIO interface is connected with other hardware of the electronic device, and the power state control method comprises the following steps:
the processor receives an interrupt request input by the GPIO interface, wherein the interrupt request represents a power state switching event of the electronic device, the GPIO interface is configured to generate an interrupt request based on a trigger signal output by the other hardware, and the other hardware is configured to generate the trigger signal based on a user operation;
and the processor responds to the interrupt request and controls to switch the power state of the electronic equipment to one power state indicated by the state control instruction based on the state control instruction input by a user, wherein the power state at least comprises a normal shutdown state.
2. The method of claim 1, wherein the other hardware of the electronic device comprises a power key, and wherein the processor receiving the interrupt request input by the GPIO interface comprises:
the processor receives an interrupt request input by the power key through the GPIO interface, the GPIO interface is configured to generate the interrupt request based on a trigger signal output by the power key, and the power key is configured to generate the trigger signal based on a short-press operation of a user.
3. The method according to claim 1, wherein the electronic device further comprises a power management module, the power management module is configured to manage a power state of the electronic device, the power management module is connected to the processor, and the processor controls to switch the power state of the electronic device to a power state indicated by the state control instruction, including:
and the processor controls the power management module to switch the power state of the electronic equipment into a power state indicated by the state control instruction.
4. The method according to claim 1, wherein the electronic device further comprises a human-computer interaction module, the human-computer interaction module is connected to the processor, and after the processor responds to the interrupt request, the method further comprises:
the processor controls the human-computer interaction module to display a plurality of power states of the electronic equipment, and receives a state control instruction input by the human-computer interaction module after a user selects one of the plurality of power states.
5. The method according to claim 1, wherein the power state indicated by the state control instruction comprises a normal shutdown state, a restart state or a hibernation state.
6. A processor arranged to execute instructions which when executed perform the power state control method of any of claims 1 to 5.
7. A computer-readable storage medium having stored thereon instructions for executing the power state control method according to any one of claims 1 to 5.
8. An electronic device, comprising a processor, wherein the processor comprises a GPIO interface, the GPIO interface is connected to other hardware of the electronic device, the GPIO interface is configured to generate an interrupt request based on a trigger signal output by the other hardware, the other hardware is configured to generate the trigger signal based on a user operation, and the processor is configured to receive the interrupt request input by the GPIO interface, wherein the interrupt request represents a power state switching event of the electronic device, and control, in response to the interrupt request and based on a state control instruction input by a user, switching a power state of the electronic device to a power state indicated by the state control instruction, and the power state at least comprises a normal power-off state.
9. The electronic device of claim 8, wherein the other hardware of the electronic device comprises a power key, wherein the processor is configured to receive an interrupt request input by the power key through the GPIO interface, wherein the GPIO interface is configured to generate the interrupt request based on a trigger signal output by the power key, and wherein the power key is configured to generate the trigger signal based on a short-press operation by a user.
10. The electronic device according to claim 8, further comprising a power management module, wherein the power management module is configured to manage a power state of the electronic device, and the power management module is connected to the processor, and the processor is configured to control the power management module to switch the power state of the electronic device to a power state indicated by the state control instruction.
11. The electronic device of claim 8, further comprising a human-machine interaction module, wherein the human-machine interaction module is connected to the processor, and the processor is further configured to control the human-machine interaction module to display a plurality of power states of the electronic device, and receive a state control command input by the human-machine interaction module after a user selects one of the plurality of power states.
12. The electronic device according to claim 8 or 9, wherein the electronic device further comprises a level conversion module, other hardware of the electronic device is connected to the GPIO interface through the level conversion module, and the level conversion module is configured to perform level conversion on the trigger signal output by the other hardware and output the trigger signal to the GPIO interface.
13. The electronic device of claim 8, wherein the power state indicated by the state control instruction comprises a normal power-off state, a reboot state, or a hibernation state.
CN202211182319.1A 2022-09-27 2022-09-27 Power state control method, processor and related equipment Pending CN115562727A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211182319.1A CN115562727A (en) 2022-09-27 2022-09-27 Power state control method, processor and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211182319.1A CN115562727A (en) 2022-09-27 2022-09-27 Power state control method, processor and related equipment

Publications (1)

Publication Number Publication Date
CN115562727A true CN115562727A (en) 2023-01-03

Family

ID=84742273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211182319.1A Pending CN115562727A (en) 2022-09-27 2022-09-27 Power state control method, processor and related equipment

Country Status (1)

Country Link
CN (1) CN115562727A (en)

Similar Documents

Publication Publication Date Title
US10409482B2 (en) Electronic system, touch sensitive processing apparatus and method thereof for switching to normal operation mode upon receiving touch gesture in power saving mode
US20200183704A1 (en) Method and apparatus for waking up computer from sleep state
CN107430424B (en) Techniques for improved hybrid sleep power management
CN104182243B (en) Sleep state control system, computer system and sleep state detection method thereof
US8976380B2 (en) Image forming apparatus that shifts to different power state, method of controlling the same, and storage medium
US20100088547A1 (en) Computer motherboard and power-on self-test method thereof
CN112437914B (en) System recovery method and device
CN101855606A (en) Launching an application from a power management state
US9906661B2 (en) Apparatus having power-saving mode, control method of the apparatus, and storage medium
KR950001418B1 (en) Pop up control system for portable computer having setup function and popup function
EP2079003A1 (en) Computer system and power-saving method thereof
US9672048B2 (en) Electronic device and method for waking up operating system thereof
CN101201746A (en) Method for setting ROM-BIOS
US20130222833A1 (en) Image forming apparatus, image forming apparatus control method, and storage medium
CN106598323B (en) Method and device for eliminating touch screen fault and mobile terminal
JP2012138088A (en) Information processing device, power supply control method, and program
CN116700461A (en) Method and system for starting up computer by utilizing keyboard
US20150123875A1 (en) Power management device and method
CN115562727A (en) Power state control method, processor and related equipment
US20200133562A1 (en) Information processing device, controlling method and program
CN107203377B (en) Mobile terminal and awakening method thereof
CN114326522A (en) Control method, control device, electronic equipment and storage medium
JP2004070888A (en) Information processor, control method, program, and recording medium
CN103488387B (en) A kind of method of information processing and a kind of electronic equipment
US9733947B2 (en) Method of proactively event triggering and related computer system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination