ELECTRONIC DEVICE AND METHOD

According to one embodiment, an electronic device includes: an interface capable of being connected with outside to supply/receive power to/from a first electronic device; a determining processor configured to determine whether the first electronic device supports a switching function based on first information acquired from the first electronic device when the first electronic device is connected to the interface, the switching function being a function to switch whether the first electronic device serves as a source to supply power or serves a sink to receive power; an operational input receiver configured to receive operational input from a user to the electronic device; and a switching processor configured to switch whether the electronic device serves as the source or serves as the sink in accordance with the operational input when the first electronic device is determined to support the switching function.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims the benefit of priority from. Japanese Patent Application No. 2017-088658, filed on Apr. 27, 2017; the entire contents of which are incorporated herein by reference.

FIELD

Embodiments described herein relate generally to an electronic device and a method.

BACKGROUND

Conventionally, there has been known an electronic device that includes an interface capable of being connected with the outside and supplying power to a connection destination.

In the conventional electronic device as described above, the interface may be configured to be capable of receiving power from the connection destination as well as supplying power to the connection destination. For this kind of the electronic device capable of supplying and receiving power via of the interface, there is a demand that a user can intentionally switch the electronic device at any timing serving as a source to supply power and a sink to receive power.

DETAILED DESCRIPTION

In general, according to one embodiment, an electronic device includes: an interface capable of being connected with outside to supply/receive power to/from a first electronic device; a determining processor configured to determine whether the first electronic device supports a switching function based on first information acquired from the first electronic device when the first electronic device is connected to the interface, the switching function being a function to switch whether the first electronic device serves as a source to supply power or serves a sink to receive power; an operational input receiver configured to receive operational input from a user to the electronic device; and a switching processor configured to switch whether the electronic device serves as the source or serves as the sink in accordance with the operational input when the first electronic device is determined to support the switching function.

One embodiment will now be described with reference to the accompanying drawings. The configurations of the embodiment described below, and actions and results (effects) caused by the configurations have been presented by way of example, and are not limited to the contents described below.

FIG. 1is an exemplary diagram illustrating appearance of a personal computer (PC)1of an electronic device100according to an embodiment. As illustrated inFIG. 1, the PC1includes a display2that displays information such as a moving image, and a main body3that includes a processor and a memory provided inside the main body3and also includes a keyboard provided thereon. In the embodiment, the main body3of the PC1is provided with at least one universal serial bus power delivery (USB PD) port101that complies with the USB PD standard. It is indisputable that the PC1has the same configuration as that of a general computer other than the display2, the main body3, and the USB PD port101. AlthoughFIG. 1illustrates one example that has a single USB PD port, it may be possible for the electric device100to have two or more USB PD ports according to the embodiment.

The USB PD port101is an interface configured to be capable of being connected with the outside and supplying/receiving power to/from a connection destination.

In other words, when the USB PD port101is connected with the outside, the USB PD port101can serve as a source that supplies power to the connection destination or serve as a sink that receives power from the connection destination. According to the embodiment, whether the USB PD port101serves as the source or serves as the sink is determined based on a timing when the connection destination of the USB PD port101was confirmed. More specifically, the timing is when a negotiation between the electronic device100and the connection destination (other electronic device) connected with the electronic device100is executed.

In the embodiment, any interface other than the USB PD port101may be used if that interface satisfies a condition that the interface is capable of being connected with the outside and the interface is capable of supplying/receiving power to/from a connection destination. As the other embodiment, another electronic device such as a smartphone and a tablet can be applied to, in addition to the PC1illustrated inFIG. 1.

Here, a connection destination may be any device such as other PC similar but different from the PC illustrated inFIG. 1, a smartphone, a tablet, an electronic recording device, an audio device, and a video device.

FIG. 2is an exemplary and schematic block diagram illustrating an internal configuration of the electronic device100according to the embodiment.FIG. 2illustrates one example where the electronic device100is connected to an electronic device200via a cable150that complies with the USB PD standard.

As illustrated inFIG. 2, the electronic device100includes the USB PD port101, a battery102a, a charger102b, a USB PD controller103, and an embedded controller104, as hardware configuration.FIG. 2illustrates only the hardware configuration of apart related to the USB PD port101, but various kinds of hardware configurations in addition to the hardware configuration illustrated inFIG. 2may be provided in the embodiment.

The battery102ais a chargeable/dischargeable secondary battery. When the electronic device100serves as the sink, the charger102bcharges the battery102awith power received by the USB PD port101.

The USB PD controller103controls supply/reception of power and transmission/reception of data via the USB PD port101. More specifically, the USB PD controller103controls the supply of power and the transmission of data via the USB PD port101when the electronic device100serves as a source, and the USB PD controller103controls the reception of power and the reception of data via the USB PD port101when the electronic device100serves as a sink. The USB PD controller103includes a processor (not illustrated) that executes various kinds of processing, a memory (not illustrated) that stores therein various kinds of data, and the like.

The embedded controller104integrally controls the USB PD controller103and the like. Similarly to the USB PD controller103, the embedded controller104also includes a processor (not illustrated) that executes various kinds of processing, a memory (not illustrated) that stores therein various kinds of data, and the like.

Meanwhile, the electronic device100includes a basic input/output system (BIOS)105and a predetermined application106as software configuration. The BIOS105is the most basic system program to control various kinds of the hardware configuration included in the electronic device100. The application106implements a predetermined programmed function by use of service provided by the BIOS105.

In the above-described electronic device100capable of supplying/receiving power via the USB PD port101, it is preferable that a user can switch, at any timing and intentionally, whether the electronic device100serves as the source or serves as the sink.

Under the configurations described below, the electronic device100of the embodiment can switch, at any timing in accordance with operation (s) by a user, whether the electronic device100serves as a source or serves as a sink.

More specifically, in the embodiment, the USB PD controller103includes a storage processor103aand a switching processor103b, and the embedded controller104includes a determining processor104aand a stopping processor104b. These configurations may be implemented as a group of functional modules generated on a memory resulting from a predetermined control program executed by processors of the USB PD controller103and the embedded controller104, and may be implemented by dedicated hardware (circuitry).

When the electronic device100and the other electronic device200are connected to each other, the storage processor103aacquires first information representing whether the electronic device200supports the same function as that of the electronic device100, and then stores the acquired first information. The same function as that of the electronic device100indicates a switching function of switching, at any timing in accordance with operation(s) by a user, whether an electronic device itself serves as the source or serves as the sink.

In the embodiment, transmission and reception of the first information is performed, for example, after the electronic device100and the electronic device200are connected to each other and at the stage of negotiation before power is actually supplied and received between the electronic device100and the electronic device200. For example, a vender defined message (VDM) defined by the USB PD standard is used for the transmission and the reception of the first information.

The determining processor104adetermines whether the electronic device200of the connection destination supports the switching function based on the first information acquired by the storage processor103a. When the electronic device200is determined to support the switching function, the switching processor103bswitches whether the electronic device100serves as a source or serves as a sink in accordance with operational input by a user by use of a power roll swap control function implemented by the USB PD standard.

The operational input of a user is received by an operational input receiver106aimplemented as one function of the application106. The operational input receiver106areceives operational input via a touch panel (not illustrated), other physical operation switches, operation buttons, and the like.

Further, in the application106of the embodiment, a display processor106bis also implemented. The display processor106bcontrols output of a moving image to a display included in the electronic device100such as the display2illustrated inFIG. 1.

In the embodiment, when the electronic device200is determined not to support the switching function, the display processor106bdisplays, on the display, a screen for notifying a user that the electronic device200does not support the switching function. By contrast, when the electronic device200is determined to support the switching function, the display processor106bdisplays, on the display, a notification screen300for notifying a user whether the electronic device100serves as the source or serves as the sink in relation with the electronic device200.

For example, when the electronic device100serves as the source in relation with the electronic device200of the connection destination, the display processor106bdisplays the following notification screen300a.

FIG. 3is an exemplary diagram illustrating the notification screen300adisplayed on the electronic device100when the electronic device100serves as the source, according to the embodiment. As illustrated inFIG. 3, the notification screen300aincludes display301accompanied with a character string of “PC” representing the electronic device100, display302accompanied with a character string of “connected PC” representing the electronic device200of the connection destination, and display303arepresenting a flow of power between the electronic device100and the electronic device200.

As described above, the notification screen300aillustrated inFIG. 3is displayed when the electronic device100serves as the source. Therefore, in the example ofFIG. 3, the display303arepresenting the flow of power is displayed as an arrow directed from the display301representing the electronic device100toward the display302representing the electronic device200.

On the other hand, when the electronic device100serves as the sink in relation with the electronic device200of the connection destination, the display processor106bdisplays the following notification screen300b.

FIG. 4is an exemplary diagram illustrating the notification screen300bdisplayed on the electronic device100when the electronic device100serves as the sink, according to the embodiment. As illustrated inFIG. 4, the notification screen300bincludes the same configuration as that of the notification screen300aillustrated inFIG. 3. In other words, the notification screen300bincludes the display301representing the electronic device100, the display302representing the electronic device200of the connection destination, and display303brepresenting the flow of power between the electronic device100and the electronic device200.

Unlike the notification screen300aillustrated inFIG. 3, the notification screen300billustrated inFIG. 4is displayed when the electronic device100serves as the sink. Therefore, in the example ofFIG. 4, the display303brepresenting the flow of power is displayed as an arrow directed from the display302representing the electronic device200toward the display301representing the electronic device100.

Thus, according to the embodiment, a user can understand the flow of power between the electronic device100and the electronic device200and easily recognize whether the electronic device100serves as a source or serves as a sink by only looking at the notification screen300. In the embodiment, an operation button for switching the source/sink of the electronic device100may be implemented as a graphical user interface (GUI) provided to the notification screen300.

The electronic device100of the embodiment also has a function of monitoring a residual amount of the battery102aand constantly securing the residual amount of the battery102aby a certain value or more. For example, when the electronic device100serves as the source, it is not preferable that the residual amount of the battery102aexcessively decrease from a viewpoint of securing an operation time of the electronic device100. In addition, when the electronic device100serves as the sink, even if the residual amount of the battery102ais secured by the certain value or more, it may be preferable to stop the electronic device100receiving power for securing the operation time of the electronic device100of a supplier of power.

Therefore, in the embodiment, the stopping processor104bmonitors the residual amount of the battery102a, and stops supply of power via the USB PD port101to stop the electronic device100serving as the source when the residual amount is equal to or less than a first threshold in a case where the electronic device100serves as the source. Also, the stopping processor104bmonitors the residual amount of the battery102a, and stops reception of power via the USB PD port101to stop the electronic device100serving as the sink when the residual amount is equal to or more than a second threshold in a case where the electronic device100serves as the sink.

Meanwhile, in the embodiment, the electronic device100may preliminarily have setting information that defines whether the electronic device100serves as the source or serves as the sink by default when the other electronic device200is connected to the electronic device100. In this case, it is preferable that the setting information is stored as information that can be optionally changed by a user. With this configuration, supply and reception of power can be easily achieved along with intention of a user.

Under the configurations described above, in the embodiment, control operation described below is implemented.

The following describes a flow of processing executed when the other electronic device200is connected to the electronic device100.

FIG. 5is an exemplary flowchart illustrating processing executed by the electronic device100when the other electronic device200is connected to the electronic device100, according to the embodiment.

In the processing flow illustrated inFIG. 5, the storage processor103aacquires, from the electronic device200of a connection destination, the first information representing whether the electronic device200supports the same switching function as that of the electronic device100at S51.

At S52, the determining processor104adetermines whether the electronic device200of the connection destination supports the switching function based on the first information acquired at S51.

When the connection destination is determined to support the switching function at S52, the processing goes to S53. At S53, the display processor106bdisplays the notification screen300for notifying a user whether the electronic device100currently serves as the source or serves as the sink. And then, the processing ends.

By contrast, when the connection destination is determined not to support the switching function at S52, the processing goes to S54. At S54, the display processor106bdisplays a screen and the like for notifying that the other electronic device200connected to the electronic device100does not support the switching function. And then, the processing ends.

The following describes a flow of processing executed when a user performs switching operation for switching the source/sink of the electronic device100in a state where the notification screen300is displayed.

FIG. 6is an exemplary flowchart illustrating processing executed by the electronic device100when a user performs the switching operation, according to the embodiment.

In the processing flow illustrated inFIG. 6, the operational input receiver106areceives the switching operation performed by a user at S61. This switching operation can be input via a touch panel (not illustrated), other physical operation switches, operation buttons, and the like.

At S62, the determining processor104adetermines whether the switching operation performed by a user is input. When the switching operation is determined not to be input at S62, the processing goes back to S61. However, when the switching operation is determined to be input at S62, the processing goes to S63.

At S63, the switching processor103bswitches the source/sink of the electronic device100. For example, when the electronic device100currently serves as the source, the switching processor103breplaces a master-slave relationship of supplying/receiving power between the electronic device100and the other electronic device200to make the electronic device100serve as the sink. Similarly, when the electronic device100currently serves as the sink, the switching processor103breplaces the master-slave relationship of supplying/receiving power to make the electronic device100serve as the source. And then, the processing ends.

The following describes a flow of processing executed when the electronic device100of the embodiment serves as the source.

FIG. 7is an exemplary flowchart illustrating processing executed by the electronic device100when the electronic device100serves as the source, according to the embodiment.

In the processing flow illustrated inFIG. 7, the stopping processor104bmonitors a residual amount of the battery102aat S71. The stopping processor104bdetermines whether the residual amount of the battery102ais equal to or less than the first threshold at S72.

When the residual amount of the battery102ais determined to be more than the first threshold at S72, the processing goes back to S71. By contrast, when the residual amount of the battery102ais determined to be equal to or less than the first threshold at S72, the processing goes to S73.

In the embodiment, the residual amount of the battery102athat is equal to or less than the first threshold indicates that an operation time of the electronic device100cannot be sufficiently secured if the electronic device100keeps supplying power to the electronic device200. Therefore, in this case, the stopping processor104bstops the electronic device100serving as the source and stops supply of power to the electronic device200at S73. And then, the processing ends.

The following describes a flow of processing executed when the electronic device100of the embodiment serves as the sink.

FIG. 8is an exemplary flowchart illustrating processing executed by the electronic device100when the electronic device100serves as the sink, according to the embodiment.

In the processing flow illustrated inFIG. 8, the stopping processor104bmonitors a residual amount of the battery102aat S81. The stopping processor104bdetermines whether the residual amount of the battery102ais equal to or more than the second threshold at S82.

When the residual amount of the battery102ais determined to be less than the second threshold at S82, the processing goes back to S81. By contrast, when the residual amount of the battery102ais determined to be equal to or more than the second threshold at S82, the processing goes to S83.

In the embodiment, the residual amount of the battery102athat is equal to or more than the second threshold indicates that a certain operation time of the electronic device100can be secured even when the electronic device100stops reception of power from the electronic device200. Therefore, in this case, the stopping processor104bstops the electronic device100serving as the sink and stops reception of power from the electronic device200at S83. And then, the processing ends.

As described above, the electronic device100of the embodiment includes the USB PD port101as an interface capable of being connected with the outside and supplying/receiving power to/from a connection destination. Further, the electronic device100includes the determining processor104a, the operational input receiver106a, and the switching processor103b. The determining processor104ais configured to determine whether the electronic device200supports the same switching function as that of the electronic device100based on the first information acquired from the electronic device200when the other electronic device200is connected to the USB PD port101. The operational input receiver106ais configured to receive operational input from a user to the electronic device100. The switching processor103bis configured to switches whether the electronic device100serves as the source or serves as the sink in accordance with the operational input from a user when the electronic device200is determined to support the switching function. With this configuration, whether the electronic device100serves as the source or serves as the sink can be switched at any timing in accordance with operation(s) by a user.