# US 2013/0275779 A1 · Terminal device and power supply method for terminal device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2013/0275779 A1
- Document ID: US20130275779A1
- Status: Published application
- Kind: A1
- Application number: 13/827,739
- Filed: 2013-03-14
- Published: 2013-10-17
- Earliest claimed: 2012-04-09
- Assignees: Huawei Device Co., Ltd.
- Applicants: Huawei Device Co., Ltd.
- Inventors: Qingjian He
- Web page: https://patentgrep.com/patent/US20130275779A1

## CPC

- G06F 1/26: Power supply means, e.g. regulation thereof (for memories G11C)
- G06F 1/266: {Arrangements to supply power to external peripherals either directly from the computer or under computer control, e.g. supply of power through the communication port, computer controlled power-strips}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present invention is applicable to the interface field, and in particular, relates to a power supply method for a terminal device, where the terminal device is communicatively connected to an accessory device. The method includes: detecting, by the terminal device, an ID resistance value of the accessory device; identifying a type of the accessory device according to the detected ID resistance value; selecting a power supply mode of the terminal device according to the identified type of the accessory device; and supplying power according to the selected power supply mode. In this way, the power input or output of the terminal device is free from the restriction of an OTG working mode of the terminal device.

## Claims

### Claim 1

A power supply method for a terminal device, wherein the terminal device is communicatively connected to an accessory device, and the method comprises:
detecting, by the terminal device, an ID resistance value of the accessory device;
identifying a type of the accessory device according to the detected ID resistance value;
selecting a power supply mode of the terminal device according to the identified type of the accessory device; and
supplying power according to the selected power supply mode.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the power supply mode of the terminal device comprises:
using the terminal device to power the accessory device, or using the accessory device to power the terminal device.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the step of selecting a power supply mode of the terminal device according to the identified type of the accessory device comprises:
selecting a power supply mode of the terminal device according to a power supply policy of the identified type of the accessory device.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the power supply policy comprises:
selecting a power supply mode by querying a preset power supply configuration file corresponding to the type of the accessory device; or applying a power supply mode of the terminal device currently set by a user; or selecting a power supply mode according to a power output status of the accessory device.

### Claim 5 (depends on 4)

The method according to claim 4, wherein:
if the power supply policy is to select a power supply mode by querying the preset power supply configuration file corresponding to the type of the accessory device, the configuration file comprises two configuration files, that is, a configuration file for using the terminal device to power the accessory device, and a configuration file for using the accessory device to power the terminal device, and the step of selecting a power supply mode of the terminal device according to a power supply policy of the identified type of the accessory device further comprises:
selecting one configuration file in the accessory device randomly or preferentially as a current power supply policy to select a power supply mode;
determining whether the selected configuration file runs successfully;
using, if the running succeeds, the selected configuration file as the current power supply policy to select a power supply mode; or
selecting, if the running fails, the other configuration file in the accessory device as the current power supply policy to select a power supply mode.

### Claim 6 (depends on 4)

The method according to claim 4, wherein:
if the power supply policy is to apply a power supply mode of the terminal device currently set by the user, the step of selecting a power supply mode of the terminal device according to a power supply policy of the identified type of the accessory device further comprises:
using a message to prompt the user to set a current power supply mode for the terminal device so that the user sets the current power supply mode for the terminal device according to the identified type of the accessory device;
receiving the current power supply mode set by the user; and
using the current power supply mode set by the user as a current power supply policy to select a power supply mode.

### Claim 7 (depends on 4)

The method according to claim 4, wherein:
if the power supply policy is to select a power supply mode according to the power output status of the accessory device, the step of selecting a power supply mode of the terminal device according to a power supply policy of the identified type of the accessory device further comprises:
detecting whether the current accessory device outputs power;
determining, if it is detected that the current accessory device does not output power, the power output status of the current accessory device as zero output, and selecting to use the terminal device to power the accessory device; and
determining, if it is detected that the current accessory device outputs power, the power output status of the current accessory device as active output, and selecting to use the accessory device to power the terminal device.

### Claim 8 (depends on 1)

The method according to claim 1, further comprising:
selecting a working mode of the terminal device according to the identified type of the accessory device while selecting the power supply mode of the terminal device according to the identified type of the accessory device.

### Claim 9 (depends on 8)

The method according to claim 8, wherein:
the working mode refers to a working mode of a USB OTG (Universal Serial BUS On-The-Go) of a processor of the terminal device, and the working mode comprises a Host mode and a Device mode.

### Claim 10 (depends on 9)

The method according to claim 9, wherein the step of selecting a working mode of the terminal device according to the identified type of the accessory device comprises:
querying for a working mode corresponding to the type of the accessory device in a preset working mode configuration file according to the identified type of the accessory device, and using the found working mode as the working mode of the USB OTG.

### Claim 11

A terminal device, wherein the terminal device is communicatively connected to an accessory device and comprises:
an interface detecting module, configured to detect an ID resistance value of the accessory device;
a processor module, configured to identify a type of the accessory device according to the detected ID resistance value, and select a power supply mode of the terminal device according to the identified type of the accessory device; and
a power supply switching module, configured to switch a power supply of the terminal device according to the selected power supply mode.

### Claim 12 (depends on 11)

The terminal device according to claim 11, wherein the power supply mode of the terminal device comprises:
using the terminal device to power the accessory device, or using the accessory device to power the terminal device.

### Claim 13 (depends on 11)

The terminal device according to claim 11, wherein:
the processor module is further configured to select a power supply mode of the terminal device according to a power supply policy of the identified type of the accessory device.

### Claim 14 (depends on 13)

The terminal device according to claim 13, wherein:
the power supply policy comprises: selecting a power supply mode by querying a preset power supply configuration file corresponding to the type of the accessory device; or applying a power supply mode of the terminal device currently set by a user; or selecting a power supply mode according to a power output status of the accessory device.

### Claim 15 (depends on 14)

The terminal device according to claim 14, wherein:
if the power supply policy is to select a power supply mode by querying the preset power supply configuration file corresponding to the type of the accessory device, the configuration file comprises two configuration files, that is, a configuration file for using the terminal device to power the accessory device, and a configuration file for using the accessory device to power the terminal device, and the processor module is specifically configured to select one configuration file in the accessory device randomly or preferentially as a current power supply policy to select a power supply mode, and determine whether the selected configuration file runs successfully, and, if the running succeeds, use the selected configuration file as the current power supply policy to select a power supply mode, or, if the running fails, select the other configuration file in the accessory device as the current power supply policy to select a power supply mode.

### Claim 16 (depends on 14)

The terminal device according to claim 14, wherein:
if the power supply policy is to apply a power supply mode of the terminal device currently set by the user, the processor module is specifically configured to: use a message to prompt the user to set a current power supply mode for the terminal device so that the user sets the current power supply mode for the terminal device according to the identified type of the accessory device, receive the current power supply mode set by the user, and use the current power supply mode set by the user as a current power supply policy to select a power supply mode.

### Claim 17 (depends on 14)

The terminal device according to claim 14, wherein: when the power supply policy is to select a power supply mode according to the power output status of the accessory device,
the interface detecting module is specifically configured to detect whether the current accessory device outputs power; and
the processor module is specifically configured to: determine, if the interface detecting module detects that the current accessory device does not output power, the power output status of the current accessory device as zero output, and select to use the terminal device to power the accessory device; or the processor module is specifically configured to: determine, if the interface detecting module detects that the current accessory device outputs power, the power output status of the current accessory device as active output, and select to use the accessory device to power the terminal device.

### Claim 18 (depends on 11)

The terminal device according to claim 11, wherein:
the processor module is further configured to select a working mode of the terminal device according to the identified type of the accessory device while selecting the power supply mode of the terminal device according to the identified type of the accessory device.

### Claim 19 (depends on 18)

The terminal device according to claim 18, wherein:
the working mode refers to a working mode of a USB OTG (Universal Serial BUS On-The-Go) of a processor of the terminal device, and the working mode comprises a Host mode and a Device mode.

### Claim 20 (depends on 19)

The terminal device according to claim 19, wherein:
the processor module is further configured to query for a working mode corresponding to the type of the accessory device in a preset working mode configuration file according to the identified type of the accessory device, and use the found working mode as the working mode of the USB OTG.
