Embodiment
Please refer to Fig. 2, it is depicted as the synoptic diagram according to a kind of computer system of a preferred embodiment of the present invention.Computer system 30 comprises switch 32, peripheral element controller 34, systematic electricity feeding unit 35, reaches Operations Analysis 36.
Above-mentioned Operations Analysis 36 electrically connects with switch 32.Systematic electricity feeding unit 35 also electrically connects with switch 32.Switch 32 can electrically connect peripheral element 40 respectively with 34 of peripheral element controllers.
In the present embodiment, computer system 30 can be a portable computer, and in other embodiments, computer system 30 also can be server or desktop computer.
In the present embodiment, peripheral element controller 34 for example is bluetooth controller, universal serial bus console controller (Universal Serial Bus Host Controller) or high-speed peripheral element interface controller (Peripheral Component Interface Express Controller).Peripheral element controller 34 is controlled peripheral element 40 by control signal wire.
Said system electric power supply unit 35 can provide working power Vcc to peripheral element 40 under switch 32 conductings (turn on) state.In the present embodiment, peripheral element 40 for example is universal serial bus (UniversalSerial Bus, USB) device or high-speed peripheral element interface (Peripheral Component InterfaceExpress, PCI-E) device.In addition, universal sequence bus unit can be GPS (GlobalPositioning System, GPS) module, television module (TV module) or 3G wireless network (3G WirelessNetworks, WLAN) device, and high-speed peripheral element interface device for example be high-speed peripheral element interface display card or Wireless LAN device (Wireless Local Area Networks, WLAN).
What deserves to be mentioned is, in the present embodiment, in preferred embodiment of the present invention, above-mentioned peripheral element 40 is preferably the peripheral element 40 that can support hot plug (Hot Plug and Play) specification, for example: USB peripheral device, PCI-E peripheral device or IEEE 1394 peripheral devices.In the present embodiment, peripheral element controller 34 is preferably the peripheral element controller 34 that can support the hot plug specification, for example: USB controller, PCI-E controller or IEEE 1394 controllers.
When computer system 30 in when running, the central processing unit of Operations Analysis 36 can be carried out power supply interception driver 37, whether it has the application program that is relevant to peripheral element 40 to be performed in order to detect.Because in computer system 30, when Any Application will start specific peripheral element 40, (Hardware Abstract Layer HAL) controlled with driver the hardware abstraction layer that this application program must be by operating system.The power supply interception driver 37 that present embodiment provided is between the driver 39 of the hardware abstraction layer 38 of operating system and peripheral element 40.Therefore, power supply interception driver 37 can learn whether have Any Application will start or stop peripheral element driver 39.
Power supply interception driver 37 also can be exported dependent instruction to Operations Analysis 36 according to its testing result, make Operations Analysis 36 output switch control signal S1 to switch 32, with optionally conducting (turnon) or by (turn off) switch 32.For instance, when the application program that is relevant to peripheral element 40 is not performed, switch controlling signal S1 gauge tap 32 is ended, and to stop to provide working power Vcc to peripheral element 40, makes for example to enter hot removal (Hot Plug Out) state for the peripheral element 40 of USB 2.0.On the contrary, when the application program that is relevant to peripheral element 40 is performed, 32 conductings of switch controlling signal S1 gauge tap to provide working power Vcc to peripheral element 40, make and for example insert (Hot Plug In) state for the peripheral element 40 of USB 2.0 enters heat.
Because detecting by power supply interception driver 37, computer system 30 whether have the application program that is relevant to peripheral element 40 to be performed, with the conducting of gauge tap 32 or end, so, in the present embodiment, the peripheral element 40 that is used by Any Application will temporarily not stop by 35 power supplies of systematic electricity feeding unit, to save the electric power of computer system 30.
Please refer to Fig. 3, it is depicted as the thin portion synoptic diagram of Fig. 2.Furthermore, above-mentioned Operations Analysis 36 also comprise central processing unit 362, chipset 366, and embedded controller (Embedded Controller, EC) 364, wherein chipset 366 can comprise north bridge chips and South Bridge chip (scheming not show).Said chip group 366 also electrically connects with central processing unit 362 and embedded controller 364 respectively.Embedded controller 364 also electrically connects with switch 32.
Whether the central processing unit 362 of above-mentioned Operations Analysis 36 has the application program that is relevant to peripheral element 40 to be performed in order to carry out power supply interception driver 37 to detect.
In the present embodiment, power supply interception driver 37 for example is application program (application) or driver (driver), it can be by being SDK (Software Development Kit) (the Software Develop Kit that is provided by operating system, SDK) or the driver development tools (Driver Develop Kit DDK) develops and finishes.
Embedded controller 364 also comprises general input and output (General Purpose Input Output) pin 3642, and general input and output pin 3642 is electrically connected to switch 32.Whether embedded controller 364 is performed according to the application program that is relevant to peripheral element 40, plans (program) general input and output pin 3642 output switch control signal S1.
In other words, switch 32 is controlled by general input and output pin 3642, when general input and output pin 3642 was in high level state (high state), then switch 32 was cut off, and made systematic electricity feeding unit 35 stop supplies working power Vcc to peripheral element 40.On the contrary, when general input and output pin 3642 was in low level state (low state), then switch 32 was switched on, and made systematic electricity feeding unit 35 can supply working power Vcc to peripheral element 40.
As mentioned above, whether power supply interception driver 37 can detect the application program relevant with peripheral element 40 and be performed.When the application program relevant with peripheral element 40 is not performed, in the present embodiment, power supply interception driver 37 can unloading (unload) driver relevant with peripheral element 40.On the contrary, when the application program that is relevant to peripheral element 40 is performed, 37 of drivers of power supply interception can load the driver of (load) peripheral element 40.
Please refer to Fig. 4, it is depicted as another thin portion synoptic diagram of Fig. 2.
Peripheral element controller 34 also can be disposed at chipset 366 with peripheral element controller 34 as shown in Figure 4 except configuration as shown in Figure 3.For instance, peripheral element controller 34 can be integrated in the South Bridge chip of chipset 366 further.
Please refer to Fig. 5, it is depicted as the process flow diagram according to the electricity saving method of a kind of computer system of a preferred embodiment of the present invention.Relevant its explanation is please in the lump with reference to Fig. 3.Electricity saving method is used for above-mentioned computer system 30, and electricity saving method comprises the steps: at first shown in step 510, whether central processing unit 362 is carried out power supplys interception drivers 37, have the application program that is relevant to peripheral element 40 to be performed to detect, and output switch control signal S1 according to this.
When the application program that is relevant to peripheral element 40 is not performed, then shown in step 520, the driver of peripheral element 40 can be tackled driver 37 by power supply unload automatically.
Then shown in step 530, after peripheral element 40 is lost the job power Vcc, peripheral element 40 will enter hot drawing and go out (Hot Plug Out) state.With output switch control signal S1, end, to stop to provide working power Vcc to peripheral element 40 by switch controlling signal S1 gauge tap 32 by 37 planning of power supply interception driver for general input and output pin 3642.
On the contrary, when the application program that is relevant to peripheral element 40 is performed, then shown in step 540, general input and output pin 3642 is planned with output switch control signal S1 by power supply interception driver 37,32 conductings of switch controlling signal S1 gauge tap are to provide working power Vcc to peripheral element 40.
Then shown in step 550, after peripheral element 40 receives working power Vcc, peripheral element 40 will enter heat and insert (Hot Plug In) state.The driver that computer system 30 will be reloaded corresponding peripheral element 40 according to device identification code (Device ID) or manufacturer's identification code (Vendor ID) of peripheral element 40.
Whether whether computer system that the above embodiment of the present invention disclosed and dynamic electricity-saving method thereof have the application program that is relevant to peripheral element to be performed by detecting, provide working power to peripheral element with decision, and then save the battery electric power of computer system.
In sum, though the present invention with preferred embodiment announcement as above, yet it is not in order to limit the present invention.The persond having ordinary knowledge in the technical field of the present invention, without departing from the spirit and scope of the present invention, when doing various changes that are equal to and retouching.Therefore, protection scope of the present invention is when looking being as the criterion that claims define.