Control method and electronic equipment

By configuring low-speed control channels at different stages of electronic device operation, the problem of MIPI devices not being able to be automatically detected after the operating system is running is solved, realizing plug-and-play functionality for MIPI devices and improving the flexibility of device identification and use as well as the quality of image acquisition and display.

CN121070831APending Publication Date: 2025-12-05LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511217820.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-28
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

In existing technologies, when MIPI devices are connected after the operating system is running, the system cannot automatically detect the physical connection, resulting in the inability to recognize and use them, and a lack of hot-plug support.

Method used

By generating target configuration instructions using the boot system or operating system at different operating stages of the electronic device, configuring the low-speed control channel between the device and the MIPI device, performing device enumeration, and putting the device driver into a ready-to-respond state, plug-and-play functionality of the MIPI device can be achieved.

Benefits of technology

It enables reliable identification and configuration of MIPI devices at different operating stages, supports hot-swapping, improves the flexibility of device use and user experience, avoids electrostatic damage, and enhances image acquisition and display quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121070831A_ABST
    Figure CN121070831A_ABST
Patent Text Reader

Abstract

The invention provides a control method, which comprises the following steps: in response to detecting that a mobile processor interface MIPI device establishes a physical connection with an electronic device, configuring a low-speed control channel with the MIPI device through a target configuration instruction; carrying out equipment enumeration on the MIPI equipment by utilizing a low-speed control channel; after the equipment enumeration is completed, controlling an equipment driver corresponding to the MIPI equipment to enter a to-be-responded state so as to respond to the target control instruction to control the MIPI equipment to provide a target function service; wherein when the electronic equipment is in different operation stages, the target configuration instruction comes from different parts of the electronic equipment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the field of computer peripheral interface, and more particularly, to a control method and an electronic device. BACKGROUND

[0002] Mobile Industry Processor Interface (MIPI) is a commonly used interface in electronic devices for connecting internal camera, display screen and other components. In the prior art, the MIPI device is usually designed as a fixed built-in component, and its initialization process relies on the boot system (such as BIOS) of the electronic device to complete the one-time detection and configuration in the boot stage, resulting in lack of hot plug support for the MIPI interface. When the MIPI device is connected after the operating system is running, the system cannot automatically detect the physical connection of the device, so it cannot trigger the subsequent control channel configuration and device enumeration process, and finally the device cannot be recognized and used. SUMMARY

[0003] Therefore, the present disclosure provides a control method and an electronic device.

[0004] One aspect of the present disclosure provides a control method, comprising: in response to detecting that a Mobile Industry Processor Interface (MIPI) device establishes a physical connection with an electronic device, configuring a low-speed control channel between the MIPI device and the electronic device by a target configuration instruction; performing device enumeration on the MIPI device by using the low-speed control channel; after completing the device enumeration, controlling a device driver corresponding to the MIPI device to enter a standby response state, so as to be able to respond to a target control instruction to control the MIPI device to provide a target function service; wherein the target configuration instruction comes from different components of the electronic device in different running stages of the electronic device.

[0005] According to the embodiments of the present disclosure, the low-speed control channel between the MIPI device and the electronic device is configured by the target configuration instruction, comprising: determining a running stage of the electronic device; in different running stages, detecting the access of the MIPI device by a boot system or an operating system of the electronic device, and generating a corresponding target configuration instruction to configure the low-speed control channel.

[0006] According to an embodiment of the present disclosure, the control method further comprises: detecting, by a boot system of the electronic device, an access state of the MIPI device when the electronic device is in a booting stage; generating, by the boot system, a first configuration instruction to configure a low-speed control channel between the electronic device and the MIPI device according to the first configuration instruction when it is detected that the MIPI device is accessed to the electronic device; or detecting, by an operating system of the electronic device, an access state of the MIPI interface when the electronic device is in an operating system stage; generating, by the operating system, a second configuration instruction to configure a low-speed control channel between the electronic device and the MIPI device according to the second configuration instruction when it is detected that the MIPI device is accessed to the electronic device.

[0007] According to an embodiment of the present disclosure, the control method further comprises: generating a first prompt information, or generating a pop-up instruction to control the MIPI device to pop up from the accommodation structure of the electronic device, or generating an initialization instruction to delay the initialization of the MIPI device when it is detected that the MIPI device is not accessed to the electronic device; wherein the first prompt information is used to prompt the position information of the MIPI device or prompt a user to access the MIPI device; the pop-up instruction is used to control the MIPI device to switch from the accommodation state to the pop-up state; and the initialization instruction is used to control the electronic device to perform an initialization operation on the accessed MIPI device when a target trigger event is met.

[0008] According to an embodiment of the present disclosure, after the device enumeration is completed, the control method further comprises at least one of the following: obtaining application configuration information of a target application of the electronic device, and configuring a working parameter of the MIPI device based on the application configuration information, the target application being an application that needs to call the MIPI device to perform a target task; obtaining usage information of the electronic device, and configuring a working parameter of the MIPI device based on the usage information, the working parameter of the MIPI device being different under different usage information.

[0009] According to an embodiment of the present disclosure, the MIPI device is controlled to provide a target function service in response to a target control instruction, comprising at least one of the following: in response to obtaining an image acquisition instruction, controlling a MIPI camera device to acquire original image data in a target view range through a camera driver of the electronic device, the original image data being used to be processed into display output data that can be output by a display unit by a processor in the electronic device; and in response to obtaining a display output instruction, controlling a MIPI display device to output display data transmitted by a processor of the electronic device through a display driver of the electronic device.

[0010] According to an embodiment of the present disclosure, in a case where the MIPI device is a MIPI camera and the electronic device is further provided with a USB camera, the control method further comprises: based on a change in an access state of the MIPI camera and / or usage information of the electronic device, controlling a camera drive of the electronic device and a communication link state between the MIPI camera and the USB camera.

[0011] Another aspect of the present disclosure provides a control apparatus, comprising: a first configuration module configured to, in response to detecting that a Mobile Industry Processor Interface (MIPI) device establishes a physical connection with an electronic device, configure a low-speed control channel between the MIPI device by using a target configuration instruction; a first enumeration module configured to perform device enumeration on the MIPI device by using the low-speed control channel; and a first control module configured to, after completing the device enumeration, control a device driver corresponding to the MIPI device to enter a standby response state, so as to be able to respond to a target control instruction to control the MIPI device to provide a target function service; wherein the target configuration instruction is from different components of the electronic device in different running stages of the electronic device.

[0012] Another aspect of the present disclosure provides an electronic device, comprising: a device body provided with at least one MIPI interface, which can be connected by a Mobile Industry Processor Interface (MIPI) device; and a processor configured to run a target code file to perform the following operations: in response to detecting that the MIPI device accesses the MIPI interface, configuring a low-speed control channel between the MIPI device by using a target configuration instruction; performing device enumeration on the MIPI device by using the low-speed control channel; and after completing the device enumeration, controlling a device driver corresponding to the MIPI device to enter a standby response state, so as to be able to respond to a target control instruction to control the MIPI device to provide a target function service; wherein the target configuration instruction is from different components of the electronic device in different running stages of the electronic device.

[0013] According to an embodiment of the present disclosure, the MIPI device is a MIPI camera or a MIPI display device; and in different running stages of the electronic device, a booting system or an operating system of the electronic device detects access of the MIPI device and generates a corresponding target configuration instruction to configure the low-speed control channel.

[0014] According to an embodiment of the present disclosure, the MIPI device is a MIPI camera, the device body comprises a first body and a second body connected in a rotating manner; the first body is provided with the MIPI interface, and the second body is provided with a receiving structure capable of receiving the MIPI camera; the receiving structure is capable of switching from a receiving state to a pop-up state in response to a pop-up instruction generated by the electronic device in a case where it is detected that there is no MIPI camera accessing.

[0015] Another aspect of the present disclosure provides a computer readable storage medium storing computer instructions, wherein the computer instructions are used to make a computer execute the control method according to any one of the preceding embodiments.

[0016] Another aspect of the present disclosure provides a computer program product comprising computer programs / instructions, characterized in that the computer programs / instructions, when executed by a processor, implement the operations of the control method according to any one of the preceding embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0017] The above and other objects, features and advantages of the present disclosure will become more apparent from the following description when taken in conjunction with the accompanying drawings, in which:

[0018] Figure 1 A flowchart of the control method according to an embodiment of the present disclosure is schematically shown;

[0019] Figure 2 A flowchart of configuring a low-speed control channel in the control method according to an embodiment of the present disclosure is schematically shown;

[0020] Figure 3 Another flowchart of the control method according to an embodiment of the present disclosure is schematically shown;

[0021] Figure 4 A block diagram of a control device according to an embodiment of the present disclosure is schematically shown;

[0022] Figure 5 A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown;

[0023] Figure 6 An association diagram of a device body and a MIPI device according to an embodiment of the present disclosure is schematically shown; and

[0024] Figure 7 Prompt information after a target trigger event according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0025] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood, however, that the description which follows is merely exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description of the embodiments of the present disclosure, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. However, it will be apparent to one skilled in the art that one or more embodiments of the present disclosure can be practiced without these specific details. In other instances, well-known structures and functions have not been described in detail in order to avoid obscuring aspects of the present disclosure.

[0026] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used herein, the terms "comprises", "comprising", "includes", "including" and the like are specifically intended to be open-ended and to mean that other features, steps, operations, and / or components can be added.

[0027] All terms used herein including technical and scientific terms have the meanings commonly understood by one of ordinary skill in the art unless otherwise specified. It should be noted that the terms used herein are defined as having meanings that are consistent with the context of the specification in which they are used, and should not be interpreted in an overly idealized or overly formal way.

[0028] In the case of using expressions similar to "at least one of A, B, and C, etc.", it should generally be interpreted to include any of them, to include, for example, a system having at least one of A, B, or C, a system having A alone, a system having B alone, a system having C alone, a system having both A and B, a system having both A and C, a system having both B and C, and / or a system having A, B, and C, etc.

[0029] In embodiments of the present disclosure, the collection, updating, analysis, processing, use, transmission, provision, disclosure, storage, etc. of data (for example, including but not limited to user personal information) involved are in compliance with relevant laws and regulations, are used for legal purposes, and do not violate public order and good customs. In particular, necessary measures are taken for user personal information to prevent illegal access to user personal information data, and to maintain user personal information security, network security and national security.

[0030] The following explains the terms appearing in the present solution.

[0031] MIPI, which is the abbreviation of Mobile Industry Processor Interface, generally refers to a series of interface specifications for connecting processors and mobile device peripheral components formulated by the alliance, physical layers (such as D-PHY, C-PHY) for high-speed data transmission and protocol layers (such as CSI-2, DSI) for specific applications (such as cameras, displays), aiming to achieve low-power, high-bandwidth communication; MIPI device refers to any hardware device or peripheral module that implements the MIPI interface specification and can communicate with the host processor through the specification.

[0032] I2C, which is the abbreviation of Inter-Integrated Circuit bus, is a multi-master, multi-slave, bidirectional two-wire serial communication bus that uses a serial data line (SDA) and a serial clock line (SCL) for short-distance communication between integrated circuits.

[0033] BIOS, which is an abbreviation for Basic Input / Output System, is a firmware that is solidified in a non-volatile memory on a mainboard of an electronic device. Its main function is to perform a power-on self-test (POST) after the electronic device is powered on, to initialize system hardware, and to provide boot services for operating system loading.

[0034] UEFI, which is an abbreviation for Unified Extensible Firmware Interface, is a technical specification that defines a software interface between an operating system and platform firmware, and is regarded as a modern alternative to the traditional BIOS. It provides a more abundant and flexible pre-boot environment.

[0035] GPIO, which is an abbreviation for General-Purpose Input / Output, refers to a pin on an integrated circuit or a processor that has a function and electrical characteristics that can be dynamically configured by software at runtime. The pin can be configured as an input mode to read the level state of an external digital signal, or as an output mode to drive a digital signal to an external circuit.

[0036] POGO PIN, also known as spring probe or spring needle connector, is a probe type electrical connector that contains one or more built-in spring mechanisms. Each probe can be independently extended and retracted, and a reliable electrical contact is formed between two circuit boards or contacts to be connected through the pressure of the spring.

[0037] Embodiments of the present disclosure provide a control method, comprising: in response to detecting that a mobile processor interface (MIPI) device establishes a physical connection with an electronic device, configuring a low-speed control channel between the MIPI device through a target configuration instruction; performing device enumeration on the MIPI device by using the low-speed control channel; after completing the device enumeration, controlling a device driver corresponding to the MIPI device to enter a waiting response state, so as to be able to respond to a target control instruction to control the MIPI device to provide a target function service; wherein the target configuration instruction comes from different components of the electronic device in different running stages of the electronic device.

[0038] Figure 1 A flowchart of the control method according to an embodiment of the present disclosure is schematically shown.

[0039] As shown in Figure 1 , the control method can at least include operations S110-S140.

[0040] In operation S110, in response to detecting that the mobile processor interface (MIPI) device establishes a physical connection with the electronic device, a low-speed control channel between the MIPI device and the electronic device is configured by a target configuration instruction.

[0041] The low-speed control channel can be a communication link for transmitting control signaling and state information, and has a data transmission rate lower than a high-speed data channel for transmitting main service data, such as an I2C bus, an SPI (Serial Peripheral Interface), an SMBus (System Management Bus), a UART / USART (Asynchronous Serial Interface, No Clock Line) bus, or a single bus (1-Wire), a differential bus (CAN_H / CAN_L), a LIN (Local Interconnect Network) bus, an I2S (Inter-IC Sound) bus, and the like. The physical connection refers to a mechanical and electrical connection between the MIPI device and the electronic device that forms an electrically conductive path, such as through a connector, a probe, or a contact. The specific plugging method can include but is not limited to: elastic probe plugging through a POGO pin interface; plugging through a structure similar to an expansion slot or a card slot; or electrical plugging through a patch terminal, a plug-in connector, and the like.

[0042] The detection method can include: the MIPI device contains a magnet, and a Hall sensor built-in in the electronic device outputs a level inversion signal when the magnet is close or far away, for identifying the mounting and dismounting of a magnetic camera; the MIPI device is connected to the electronic device through a pin, and a connection pin (such as a specific pin in a POGO PIN) at the interface is pulled high or low when the module is connected, for quickly judging the connection state.

[0043] For example, the electronic device is a notebook computer, the MIPI device is a MIPI camera, the notebook computer is configured with a Hall sensor, and the MIPI camera and the notebook computer are fixed by a magnetic attraction device. When the MIPI camera is fixed on the notebook computer, the Hall sensor detects that the magnet is close, detects a magnetic field change, and outputs a level inversion signal to inform the processor that the MIPI camera has been connected to the notebook computer.

[0044] Specifically, after detecting that the interface terminal of the MIPI device and the electronic device forms an electrical contact, a preset control component generates and sends a target configuration instruction to initialize the low-speed communication link between the two, and establishes a basic communication condition for subsequent device identification and control processes. The target configuration instruction can be generated by a boot system (such as BIOS or UEFI) of the electronic device in the boot stage, or generated by an operating system in the running stage.

[0045] For example, when an external MIPI camera module is coupled with the POGO PIN interface of an electronic device through its magnetic structure, the level state of a Hall sensor or a dedicated enable pin inside the module changes. The host processor or embedded controller of the electronic device detects the level change, and determines that the physical connection has been established. Then, the processor (or BIOS running on the processor) executes a predetermined instruction sequence, sends a configuration command to the I2C controller, sets the clock frequency, slave address, and other parameters of the I2C bus, and thus completes the configuration of the low-speed control channel, such as setting the timeout and retry mechanism of the I2C bus.

[0046] When no MIPI device is detected to be connected, the electronic device can control the circuit to keep the high-speed data channel and power supply line related to the MIPI interface in an open state, so as to avoid direct coupling of external static electricity to the host processor or system bus.

[0047] In operation S120, the MIPI device is enumerated by using the low-speed control channel. The enumeration of the device refers to the process in which the electronic device as a master device queries and obtains the identity, function attribute, configuration parameter, and other information of the MIPI device through the low-speed control channel. In other words, the enumeration process is essentially that the system end of the electronic device initiatively sends a query request to the MIPI device through the control interface (such as the I2C bus) to obtain the device ID, capability parameter, and other key information, and the MIPI device only passively responds to these query instructions as a slave device.

[0048] Specifically, after the low-speed control channel is configured, the host electronic device sends a read instruction to one or more predefined device addresses through the channel, and the MIPI device responds to these instructions as a slave device and returns the device description information stored in its internal register or non-volatile memory.

[0049] For example, the image signal processor in the electronic device sends a read command to the sensor chip of the MIPI camera module through the configured I2C bus to obtain the vendor ID, product ID, and version number. Based on the obtained ID information, the electronic device can match and load the corresponding camera driver from the locally stored driver library. Subsequently, the electronic device can further query the resolution list, frame rate range, pixel format, and other capability set information supported by the camera through the I2C bus. The enumeration and parameter acquisition process of the electronic device is realized through the camera driver (camera driver) or display driver (display driver) in the electronic device.

[0050] By using the low-speed control channel to initialize and device enumeration when detecting the physical connection of the external MIPI camera, the timely identification and driver loading of the peripheral in the hot plug scene are realized, avoiding the limitation of one-time identification in the BIOS stage, thus solving the problem that the MIPI camera cannot be actively enumerated in the operating system running stage. At the same time, when no external MIPI camera is detected to be connected, the related circuit is kept in an open circuit state by control, avoiding the direct coupling of electrostatic discharge (ESD) to the main processor or bus, thereby improving the anti-static ability of the whole machine and avoiding the problem that the MIPI interface cannot provide effective ESD protection.

[0051] In operation S130, after completing device enumeration, the device driver corresponding to the MIPI device is controlled to enter a standby response state, so as to be able to respond to a target control instruction to control the MIPI device to provide a target function service. The standby response state means that the device driver program has completed initialization and makes the hardware device in a ready or low-power standby mode, which can receive and execute commands from upper-layer applications or system services, that is, the standby response state can be understood as an active state or a ready state, and the driver can respond to configuration requests or use requests from upper-layer applications at any time. The target function service refers to the core function designed and intended to be realized by the MIPI device, such as image acquisition or content display. The device driver is a driver located on the electronic device side and running in the host system (such as AP / ISP), which is used to call specific hardware devices to execute specific functions. For example, when the MIPI device is a MIPI camera, the device driver can be a camera driver or a display driver.

[0052] Specifically, after successfully identifying the MIPI device and obtaining its capability parameters, the device driver program will complete the initialization of its own data structure and register the device with the operating system kernel. Thereafter, the driver program will monitor the calling request from the upper-layer software. When the MIPI device is a MIPI camera, the calling request (target control instruction) can come from an image acquisition instruction initiated by a camera application (camapp) or other applications, or an image display instruction, or a control instruction for configuring camera acquisition parameters or display screen display parameters. Once a valid instruction is received, the hardware will be controlled to perform the corresponding operation through the cooperation of the low-speed control channel and the high-speed data channel.

[0053] For example, after enumeration is completed by the camera driver, the MIPI camera sensor is set to standby mode. When a user starts a video conference application, the application sends an image capture request to the camera driver through the operating system. After receiving the target control instruction, the camera driver sends an instruction to the sensor through the I2C bus to wake it up from standby mode to working mode and configure it to output a specified image resolution and frame rate. At the same time, the camera driver prepares to receive the image data stream transmitted through the high-speed data channel to provide the target function service of image capture.

[0054] In operation S140, the target configuration instruction comes from different components of the electronic device when the electronic device is in different running stages. Different running stages refer to different operating states of the electronic device, at least including an initialization stage (such as a BIOS / UEFI stage) and an operating system running stage of the electronic device. Different components refer to software or firmware entities responsible for device detection and control in different running stages. Specifically, the subject of the target configuration instruction for configuring the low-speed control channel changes with the current system state of the electronic device. In the system boot process, the instruction is generated by the underlying firmware such as BIOS; after the operating system is completely loaded, the instruction is generated by the operating system kernel or the driver loaded by the operating system.

[0055] For example, if the MIPI camera is connected before the electronic device is powered on, the BIOS or UEFI firmware of the electronic device will scan the presence of the device during the power-on self-test process, and the target configuration instruction is directly generated by the BIOS / UEFI code to initialize the I2C bus. Conversely, if the MIPI camera is connected after the electronic device has entered the system operating system desktop (i.e., hot plug), the operating system's plug-and-play manager or ACPI subsystem will capture the hardware event and notify the corresponding bus driver, and the target configuration instruction is generated by the bus driver to complete the initialization configuration of the I2C bus.

[0056] According to the embodiments of the present disclosure, by configuring the low-speed control channel before detecting the physical connection of the MIPI device, and then using the channel for device enumeration, the device driver is finally put into a standby response state, thereby providing a mechanism for reliably and systematically initializing the pluggable MIPI device. By distinguishing the control subject of the electronic device in different running stages, it is ensured that the MIPI device can be correctly identified and configured whether it is connected before the system is started or during the operation of the operating system, thereby realizing the support for hot plugging of the MIPI interface and improving the flexibility of device use and user experience.

[0057] On the other hand, when the electronic device is a notebook computer or the like, as the notebook computer increasingly pursues a thin and light design, especially in the case of an increasingly thin screen, the space left for the camera is increasingly small, in order to increase the quality of the image collected by the camera, a convex design needs to be made on the top to configure a large-sized camera, resulting in a decrease in screen ratio, and according to the embodiment of the present disclosure, the MIPI device, such as the MIPI camera, can be plugged in and used without being configured above the screen of the notebook computer, avoiding the decrease in screen ratio and not being afraid of the design of a large-sized camera, while the excellent image quality of the MIPI camera is also retained.

[0058] On the other hand, when the electronic device is a notebook computer or the like, as the notebook computer increasingly pursues a thin and light design, especially in the case of an increasingly thin screen, the space left for the camera is increasingly small, in order to increase the quality of the image collected by the camera, a convex design needs to be made on the top to configure a large-sized camera, resulting in a decrease in screen ratio, and according to the embodiment of the present disclosure, the MIPI device, such as the MIPI camera, can be plugged in and used without being configured above the screen of the notebook computer, avoiding the decrease in screen ratio and not being afraid of the design of a large-sized camera, while the excellent image quality of the MIPI camera is also retained.

[0059] In another example, the MIPI device is a MIPI display screen. After detecting the physical access of the MIPI display screen, the electronic device also completes the device enumeration of the display screen through the low-speed control channel, including obtaining the capability parameters of the display screen, such as resolution, refresh rate, color depth, and the like. After the device driver completes the initialization, it enters a waiting response state. When the operating system or the application program issues a display output instruction, the display driver writes the configuration command (such as resolution setting, backlight brightness adjustment, color mode switching, and the like) to the MIPI display screen through the low-speed control channel, and transmits the display data in the frame buffer through the high-speed data channel (based on MIPI DSI). After receiving and analyzing the data, the MIPI display screen drives the panel to output the target image.

[0060] For example, in a notebook computer, when a user connects an external MIPI secondary screen, the access of the display screen is detected, and the enumeration process is completed. Subsequently, the operating system identifies the secondary screen as an extended display, and allows the user to freely drag a window between the main screen and the secondary screen. The display driver transmits corresponding graphic data to the external MIPI display screen according to the user operation, thereby realizing the multi-screen display function.

[0061] Based on the similar description as the aforementioned MIPI camera, the use of the MIPI camera in the present solution can realize plug and play, avoiding the limitation that the traditional fixed built-in screen cannot be expanded, and due to the high bandwidth and low power consumption characteristics of the MIPI DSI link, the USB display screen solution has lower power consumption and higher display quality.

[0062] Figure 2 A flowchart of configuring a low-speed control channel in a control method according to an embodiment of the present disclosure is shown schematically.

[0063] As shown in the foregoing embodiments, operation S110 can include operations S210-S220. Figure 2

[0064] In operation S210, a running phase of the electronic device is determined. The running phase represents a system environment and a running state of the electronic device currently executed, for example, distinguishing between a system booting phase or an operating system running phase. For example, the running phase of the electronic device currently executed can be determined by querying an execution context of a central processing unit (CPU) or reading a value of a system state flag register.

[0065] For example, when the electronic device is powered on, a dedicated state register is initialized to a booting phase value. When a basic input output system (BIOS) or a unified extensible firmware interface (UEFI) firmware performs hardware initialization and loads an operating system, the device is in a system booting phase. When the firmware hands over the execution control to an operating system kernel, the state register is updated to an operating system phase value by the operating system kernel. Thereafter, the current running phase can be obtained by reading the register.

[0066] In operation S220, access of the MIPI device is detected by a booting system or an operating system of the electronic device in different running phases, and a corresponding target configuration instruction is generated to configure the low-speed control channel. The booting system can be a bottom code solidified in a non-volatile memory of the electronic device, responsible for initializing hardware and booting loading of the operating system after the device is powered on, for example, BIOS or UEFI. The operating system can be a system-level software managing hardware resources and software processes.

[0067] Specifically, according to the running phase determined in operation S210, a software entity in charge of the running phase is responsible for monitoring the connection state of the MIPI interface. For example, in the BIOS phase, the access detection is usually performed by polling the high or low level of the GPIO port by the BIOS firmware to determine whether a specific PIN of the MIPI interface is connected to the device; in the OS phase, in addition to the same ability to detect based on the GPIO level signal, the MIPI interface can also be confirmed by using sensor signals available after initialization. The main difference between the two is that the former directly processes the GPIO signal by the BIOS, and the latter processes the GPIO signal or sensor data by the operating system driver or ACPI subsystem.

[0068] ​Once the access event of the MIPI device is detected, the software entity generates configuration instructions for initializing the low-speed control channel between the two. For example, the target configuration instructions can be instructions for selecting or determining the I2C channel for actual communication. The way of configuring the low-speed control channel can include: if the MIPI device is detected to be inserted at the device initialization, enabling the I2C channel related to the MIPI interface directly; if the device is not detected at the initialization, re-establishing the channel connection at the subsequent insertion, or dynamically adjusting and configuring the transmission parameters (such as clock rate, timeout mechanism, etc.) of the channel.

[0069] For example, in one embodiment, a specific pin (such as the ID pin or the Enable Cam pin) of the MIPI interface is designed as an access detection pin.

[0070] At the system boot stage, the BIOS firmware program polls the general-purpose input-output (GPIO) port connected to the detection pin. When a MIPI camera module is accessed, the level of the detection pin will change as preset (for example, from high level to low level). After the BIOS firmware detects the level change, it is determined that the device has been accessed, and then an internal code is executed to generate a set of write operation instructions for the I2C controller register, which is the target configuration instruction, to configure the I2C bus.

[0071] At the operating system stage, the monitoring right of the GPIO port is transferred to the ACPI (Advanced Configuration and Power Interface) subsystem or the GPIO driver in the operating system kernel. When the user hot-plugs the MIPI camera module, the level change of the GPIO port will trigger a hardware interrupt. The operating system captures the interrupt and routes it to the corresponding driver. The driver generates the target configuration instruction in response to the interrupt, and configures the I2C controller by calling the services provided by the operating system, so as to establish the low-speed control channel for communication with the newly accessed device.

[0072] According to the embodiments of the present disclosure, by explicitly distinguishing different running stages of the electronic device, and respectively assigning the boot system and the operating system to detect and configure the access of the MIPI device, it is ensured that whether the MIPI device is connected before starting (cold plug) or connected during system running (hot plug), it can be timely and accurately identified and a communication channel is established for it.

[0073] Figure 3 Another flowchart of the control method according to the embodiments of the present disclosure is schematically shown.

[0074] As Figure 3 shown, on the basis of the foregoing embodiments, the control method can further include operations S310-S320, or operations S330-S340.

[0075] In operation S310, in a case where the electronic device is in a booting stage, a booting system of the electronic device detects an access state of the MIPI device. The booting stage refers to a process in which a firmware dominates hardware initialization from power-on of the electronic device to complete loading of an operating system, for example, the booting stage can be understood as a BIOS stage, and the firmware is responsible for hardware scanning and initialization when the system is powered on. The booting system can be BIOS or UEFI. Specifically, the booting system actively queries an electrical state of one or more specified physical pins associated with the MIPI interface when performing a preset hardware scanning and initialization sequence of the booting system, to determine whether the MIPI device is physically connected.

[0076] For example, after the electronic device is powered on, the BIOS firmware of the electronic device starts to execute. In the hardware self-checking program, a code for reading a state of a specific GPIO (general-purpose input / output) port is included, and the GPIO port is physically connected to the "Enable Cam" or "ID pin" pin of the MIPI interface. If the MIPI camera module is connected, the pin will be pulled to a preset level (for example, low level) by the circuit on the module. After the BIOS reads the preset level state of the GPIO port, it is determined that the MIPI device has been accessed.

[0077] In operation S320, in a case where it is detected that the MIPI device is accessed to the electronic device, a first configuration instruction is generated by the booting system to configure a low-speed control channel between the electronic device and the MIPI device through the first configuration instruction. The first configuration instruction is a set of underlying hardware operation commands generated by the booting system for setting the working parameters of the low-speed control channel. For example, if it is detected that the MIPI device has been accessed in the booting stage, the I2C channel can have been established, and at this time, the first configuration instruction can be used to verify the reliability of the I2C channel (such as whether the link is stably connected), or to select a specific I2C channel, or to set transmission parameters (such as clock frequency, timeout, retry strategy) of the channel, so as to prepare for subsequent device enumeration process.

[0078] Specifically, after the booting system determines that the MIPI device has established a physical connection, the booting system will execute a preset firmware instruction to initialize and enable the low-speed control channel between the electronic device and the MIPI device.

[0079] For example, after the BIOS confirms that a MIPI camera is plugged in, it immediately executes an initialization function. This function generates a series of register write instructions to the communication controller (e.g. an I2C controller) within the host processor chipset to activate the corresponding communication bus and set its clock frequency (e.g. 100 kHz). Thereafter, the BIOS can also send a simple read command to the camera's preset address to verify the link integrity of the low-speed control channel. This set of hardware write operations and verification operations constitutes the first configuration instructions

[0080] Or, operations S330~ S340.

[0081] In operation S330, in the case that the electronic device is in the operating system stage, the access state of the MIPI interface is detected by the operating system of the electronic device. The operating system stage refers to a period when the control right of the electronic device has been transferred from the boot system to the operating system kernel, and the system resources are managed and external events are responded by the operating system. Specifically, the operating system continuously or periodically monitors the change of the MIPI interface connection state through its driver program model and interrupt handling mechanism. In the operating system stage, in addition to being able to detect through the level signal change of a specific GPIO pin, the access of the MIPI device can also be determined by means of the state flip of an initialized sensor (such as a Hall sensor). Such monitoring can be based on level change interrupts, polling specific sensor states, or responding to system-level hardware event notifications.

[0082] For example, when the electronic device is normally running in the operating system, a user will attach an external MIPI camera module with a permanent magnet to the POGO PIN interface on the top of the device. The proximity of the module causes the state of the built-in Hall sensor in the device to flip, the output pin of the sensor is connected to a GPIO port, and the port is configured in interrupt mode. The state flip triggers a hardware interrupt, and the GPIO driver program in the operating system captures the interrupt and notifies the plug-and-play manager that a hardware connection event has occurred.

[0083] In operation S340, in the case that it is detected that a MIPI device is plugged into the electronic device, the second configuration instructions are generated by the operating system to configure the low-speed control channel between the electronic device and the MIPI device through the second configuration instructions. The second configuration instructions are a set of software calls and hardware operation commands generated by the device driver program in the operating system for dynamically establishing and initializing the low-speed control channel. Since the device is plugged in during the operation of the operating system at this time, the second configuration instructions usually need to re-establish the low-speed control channel (such as the I2C channel) and reset the MIPI device, so as to ensure that the communication link starts from a clean state and avoid initialization residual problems.

[0084] Specifically, after detecting the MIPI device access event at the operating system level, the operating system will schedule and load the device driver matching the device type. The driver then requests and obtains control of the corresponding communication bus resources from the operating system kernel, dynamically configures and activates the low-speed control channel between the electronic device and the newly accessed MIPI device.

[0085] For example, after the plug-and-play manager notifies the camera driver of a new device access, the driver first requests exclusive access to a specific I2C bus controller through the operating system API. After obtaining authorization, the driver generates and sends a series of I2C write commands that configure the bus rate and address.

[0086] According to the embodiments of the present disclosure, by defining different detection subjects and configuration instruction generation mechanisms for the boot stage and the operating system stage, the cold plug and hot plug application scenarios of the MIPI device can be comprehensively covered. In the boot stage, the boot system performs static configuration, ensuring that the device is available when the system starts; in the operating system stage, the operating system performs dynamic configuration, realizing the flexibility of plug-and-play. Therefore, it is guaranteed that no matter when the MIPI device is accessed, the system can reliably establish a communication link.

[0087] On the basis of the foregoing embodiments, the control method can further include a third generation operation.

[0088] The third generation operation generates first prompt information, or generates a pop-out instruction to control the MIPI device to pop out of the storage structure of the electronic device, or generates an initialization instruction to delay the initialization of the MIPI device, in a case where it is not detected that a MIPI device is accessed to the electronic device. Specifically, when the boot system or the operating system of the electronic device performs access state polling or event monitoring on the MIPI interface, if no valid signal that the MIPI device is connected is obtained, at least one of the following three different operations is selectively executed according to the system configuration or the current application context: interaction with the user, actively changing the physical state of the device, or entering a conditional waiting state.

[0089] For example, when a user starts a video conference application program, the operating system first detects the access state of the MIPI camera. If the detection result is not accessed, the operating system executes one of the following three operations according to the preset strategy: renders a dialog box on the display screen to prompt the user to connect the camera; sends an instruction to an electromechanical control unit to pop out the camera stored in the device body; or, the application interface displays a "waiting for camera connection..." state, and continuously monitors the interface state.

[0090] According to embodiments of the present disclosure, the first prompt information is used to prompt the position information of the MIPI device or prompt the user to access the MIPI device. The first prompt information is a kind of perceivable information generated by the electronic device and presented to the user, which is used to guide the user to complete the physical connection operation of the MIPI device. The information can contain the description of the storage position of the device, or directly issue an operation instruction. The position information can be the position information of the MIPI device stored in the internal part of the electronic device (such as the dark box or the storage bin), or the position information of the MIPI device placed outside the electronic device (such as the accessory storage bag, the docking station or the accessory container).

[0091] For example, in one embodiment, when the power-on self-test procedure does not detect the connection of the MIPI camera, a line of text will be output on the display interface of the boot process: "External camera not connected, please take it out from the recess on the side of the host and adsorb to the top end of the screen". In another embodiment, when the camera application in the operating system is started but no device is found, a graphical window will be popped up, which contains an animation demonstrating how the user connects an independent camera module to the designated interface of the notebook computer.

[0092] According to embodiments of the present disclosure, the pop-up instruction is used to control the MIPI device to switch from the storage state to the pop-up state. The storage state means that the MIPI device is contained in a specific cavity or structure of the electronic device body, and is in a non-working and protected form. The pop-up state means that the MIPI device is at least partially removed from the storage structure and enters a form that is easy for the user to use. For example, the pop-up instruction is an electrical signal generated by the main processor, which is sent to an electromechanical actuator. After receiving the instruction, the actuator drives a mechanical structure to act, thereby releasing the locking or constraint of the MIPI device, so that it moves to the pop-up position under the action of the preset mechanical force (such as the spring force).

[0093] Specifically, for example, the host part of the electronic device is provided with a built-in storage bin (i.e. dark box) for storing the detachable MIPI camera. When the camera needs to be used but the system detects that it is not connected, the operating system will send a high-level pulse signal to an electromagnet driving circuit through a GPIO pin. The electromagnet is energized to release the lock of the storage bin, and the spring mechanism in the bin immediately pushes the camera module out of the bin opening, which is convenient for the user to take.

[0094] According to the embodiments of the present disclosure, the initialization instruction is used to control the electronic device to perform an initialization operation on the accessed MIPI device when a target trigger event is met. The target trigger event is a predefined condition capable of activating the delayed initialization process, such as a device connection event, a retry command issued by a user, or a pre-designed timer timeout. The condition in which the target trigger event is met can include: the device access is not detected after a preset time period; the MIPI device access is detected at the moment of triggering; or the user invokes a certain application program or system service. When the initial detection does not find the MIPI device, the system does not immediately report an error or terminate the related process, but generates and keeps an initialization instruction in a to-be-executed state. The system enters a listening mode for the target trigger event. Once the target trigger event is listened, the system executes the delayed initialization instruction to start the configuration and enumeration process of the MIPI device.

[0095] For example, in the BIOS booting phase, if the MIPI camera is not detected, the BIOS does not abort the booting, but sets a specific flag bit in the Advanced Configuration and Power Interface table, which is the generation of the delayed initialization instruction. Subsequently, the operating system loads and parses the Advanced Configuration and Power Interface table, and when reading the flag bit, loads the camera driver, but makes it in a sleep state of "waiting for device", and registers a listener for the MIPI interface hot plug event. When the user subsequently inserts the MIPI camera, the hot plug event is captured, which is the target trigger event, so as to wake up the driver to perform the complete device initialization operation.

[0096] According to the embodiments of the present disclosure, by providing a prompt information, a pop-up instruction or a delayed initialization instruction in the case where the MIPI device is not detected, a potential error or failure scenario is converted into a user interaction process with guidance, automation or intelligence. The program interruption or user confusion caused by the device disconnection is avoided, the use process of the pluggable MIPI device is simplified through active guidance or physical assistance, and the user experience is improved.

[0097] On the basis of the foregoing embodiments, the control method can further include at least one of a first obtaining operation and a second obtaining operation.

[0098] The first obtaining operation obtains application configuration information of a target application of the electronic device, and configures working parameters of the MIPI device based on the application configuration information. The target application is an application that needs to call the MIPI device to perform a target task. The application configuration information refers to specific requirements of a software application to the MIPI device for implementing specific functions of the software application, such as data format, performance index, function service type, or operation mode. For example, a conference application needs to output video data of a certain specification, frame rate, resolution, size, and the like. In this way, the resolution, frame rate, pixel format, and the like of the MIPI device can be set (by writing to a device register through I2C); or the MIPI device can be configured to have an image enhancement function (such as HDR, noise reduction, by converting to a register instruction recognizable by the device). The working parameters refer to a set of variable parameters that can be set in the MIPI device through programming, and are used to determine the running characteristics of the MIPI device. Specifically, when a target application requests to access the MIPI device, the application calls an application program interface (API) to pass a set of expected working parameters to the device driver. The device driver parses the parameters and converts them into a series of write operation commands for the internal control registers of the MIPI device, and sends the commands to the MIPI device through a low-speed control channel, so that the working state of the device matches the requirements of the target application.

[0099] For example, when a user starts a high-definition video recording application, the application requests a video stream with a resolution of 1920x1080 pixels, a frame rate of 60 frames per second, and an H.264 compression format. The request is the application configuration information. The operating system passes this information to the MIPI camera driver. The driver then sends instructions to the camera sensor and image signal processor through the I2C bus, sets the output resolution to 1920x1080, configures the frame rate to 60 fps, and enables the built-in H.264 encoder.

[0100] The second obtaining operation obtains usage information of the electronic device, and configures working parameters of the MIPI device based on the usage information, the working parameters of the MIPI device being different under different usage information. The usage information refers to context data describing a current environment, a user state or an operation scenario of the electronic device, which can be derived from other sensors, system settings or user profiles of the electronic device. For example, the usage information can include: usage scenario information such as a conference scenario, an entertainment scenario, a live broadcast scenario and the like; usage object information such as multiple persons, a single person, A or B, for example, multiple persons can need a wide-angle, a single person needs a portrait mode; and usage environment information such as a low-light environment, a night scene or an outdoor scene, so as to adjust the working parameters of the camera to obtain better image quality. Specifically, when the MIPI device is activated or during its operation, a device driver obtains current usage information from one or more information sources. The driver internally maintains one or more mapping relationships, which map different usage information to a preset set of MIPI device working parameters. According to the obtained real-time usage information, the driver selects the corresponding parameter set and dynamically reconfigures the MIPI device.

[0101] For example, after a MIPI camera is activated, its driver will first query the reading of the ambient light sensor built-in the electronic device. If the reading is lower than a preset brightness threshold, it indicates that the current environment is low light, which is the usage information. The driver will automatically select the "night mode" parameter set according to this information, and send instructions to the camera sensor through the low-speed control channel to increase the exposure time, improve the sensitivity and turn on the image noise reduction function. When the user moves the electronic device to a bright place, the ambient light sensor reading rises, and the driver automatically switches back to the "day mode" parameter set and adjusts back to the normal exposure and sensitivity settings.

[0102] According to the embodiments of the present disclosure, by further fine-tuning the working parameters of the MIPI device according to the application configuration information or the usage information after device enumeration, the method realizes intelligent and adaptive control of the MIPI device. This makes the MIPI device no longer work in a fixed and universal state, but can be dynamically optimized according to the specific needs of the upper-layer application or the real-time changes of the external environment, thereby ensuring that the best performance and output quality can be provided in different application scenarios.

[0103] On the basis of the foregoing embodiments, the response target control instruction controls the MIPI device to provide a target function service, which can include at least one of a second control operation and a third control operation. The target control instruction can be an image acquisition instruction initiated by a camera application or other application, or an image display instruction; it can also be an instruction for configuring camera acquisition parameters, or an instruction for configuring display screen display parameters. The target function service can include an image acquisition function or a data display function.

[0104] The second control operation, in response to obtaining the image acquisition instruction, controls the MIPI camera device to capture the raw image data in the target framing range through the camera driver of the electronic device, and the raw image data is used for being processed by the processor in the electronic device into display output data that can be output by the display unit. For example, the processor can be a CPU, an ISP or other types of processors, and the processing process can include steps of performing demosaicing, white balance, gamma correction, color correction, etc. on the raw data, and finally converting it into a standard image format (such as RGB, YUV).

[0105] The image acquisition instruction is a command issued by an upper application software or an operating system service to start or control the image capture process. The raw image data refers to the digital signal directly output by the image sensor after photoelectric conversion, which is not completely processed by the image signal processor, and is usually in the Bayer format RAW data.

[0106] Specifically, after receiving the image acquisition instruction, the camera driver sends one or more control commands to the MIPI camera device through the low-speed control channel to activate the image sensor and set its working mode. Subsequently, the camera device starts to stream the continuously captured raw image data to the electronic device through the high-speed data channel. The designated processor in the electronic device receives the data stream and performs a series of image processing algorithms to convert it into standard format image data for subsequent use.

[0107] For example, the user starts the camera application program in the operating system, which sends an image acquisition instruction to start preview to the camera driver through the media framework API. The driver responds to the instruction and sends a command to the MIPI camera module through the I2C bus. The image sensor of the camera module is activated to start capturing scene images, and the RAW format raw image data collected is transmitted at high speed to the camera serial interface receiving end of the host processor through the physical layer. The data is then sent to the image signal processor pipeline, which is processed through black level correction, demosaicing, white balance, color correction, etc. Finally, it is converted into YUV format display output data and sent to the display controller for screen preview.

[0108] The third control operation, in response to obtaining the display output instruction, controls the MIPI display device to output the display data transmitted by the processor of the electronic device through the display driver of the electronic device. The display output instruction is a command issued by the graphics subsystem of the operating system to send a frame of image data to the display device. The display data refers to the final pixel data stored in the frame buffer after rendering or processing, which is ready to be presented by the physical display device.

[0109] Specifically, upon receiving the display output instruction, the display driver reads the to-be-displayed data from the specified memory address. The driver packs the data into data packets conforming to the MIPI display serial interface protocol, and serially transmits the data packets to the MIPI display device through the high-speed data channel. The MIPI display device receives and parses the data packets, and drives the pixel points on the display panel, thereby visualizing the to-be-displayed data.

[0110] For example, when an external MIPI display screen is connected to the electronic device through the POGO PIN interface and is successfully enumerated, the operating system identifies it as an extended display. When a user drags a window onto the extended display, the graphics processor renders the content of the window to the corresponding frame buffer area. The window manager of the operating system then issues a display output instruction. The MIPI display driver reads the pixel data in the frame buffer and sends it to the external display screen through the high-speed data channel. The DSI controller built in the display screen receives the data and converts it into the timing signals required to drive the liquid crystal panel, and finally presents the image of the window on the screen.

[0111] On the basis of the foregoing embodiments, in the case where the MIPI device is a MIPI camera and the electronic device is also equipped with a USB camera, the control method can further include a fourth control operation.

[0112] The fourth control operation controls the communication link state between the camera driver of the electronic device and the MIPI camera and the USB camera based on the access state change of the MIPI camera and / or the usage information of the electronic device.

[0113] The communication link state refers to the configurable states of the data and control paths between the camera device and the main processor, such as activation, standby, or disablement.

[0114] Specifically, a unified camera driver or an upper-layer camera management service continuously monitors the physical connection state of the MIPI camera and the usage information from the application program or the system. Based on a preset priority strategy or according to the dynamic evaluation of real-time requirements, the driver selectively changes the running state of the communication link to the MIPI camera and the USB camera. Such a change can include: completely enabling one link while placing the other link in a low-power standby or power-off state; or changing the assignment of the default camera device at the operating system level, thereby guiding the application program to preferentially use a certain specific camera.

[0115] In another embodiment, the driver can also activate the communication link of both the MIPI camera and the USB camera simultaneously, enabling them to capture image or video streams in different view ranges in parallel. The image processor or a dedicated fusion algorithm module in the electronic device performs spatial stitching, time synchronization and color correction on the data streams from the two cameras, to generate the target image or video data. For example, the MIPI camera is responsible for capturing high-resolution pictures of the long shot, and the USB camera is responsible for capturing pictures of the close-up face. The system stitches the two pictures into a unified video stream through image fusion technology, for use in video conferencing or content creation applications.

[0116] For example, an electronic device is equipped with a built-in 720p resolution USB camera for regular video calls, and a hot-pluggable 4K resolution MIPI camera for high-quality image creation. When the MIPI camera is not connected, only the communication link to the USB camera is activated. When the user connects the 4K MIPI camera to the device, the camera driver detects the change in connection status. According to a "high quality first" preset rule, the driver automatically activates the communication link with the MIPI camera, completes the enumeration of the device, and sets it as the default camera of the system. At the same time, the driver can put the USB camera into standby mode to reduce power consumption. If the user chooses to enable "dual capture mode", the USB and MIPI cameras can be enabled at the same time to capture data streams of different angles or different scenes, and then fused into the target video picture in the image processing unit.

[0117] Thereafter, if the user starts a professional video recording application that requests a 4K RAW format video stream (this is a usage information), the driver will confirm that the MIPI camera can meet this requirement and maintain it as the current working device. Conversely, if the user starts an application that only needs to identify the identity, the application (as another usage information) may be hard-coded to use the built-in USB camera (because it may be integrated with infrared function), at which time the driver will temporarily activate the communication link of the USB camera to serve the specific application, and the MIPI camera remains in standby. If the user removes the MIPI camera during a video call, the driver will immediately detect the change in connection status and seamlessly switch the communication link to the USB camera to ensure that the call is not interrupted.

[0118] According to the embodiments of the present disclosure, by implementing dynamic management and intelligent scheduling of multi-source heterogeneous camera resources, the flexibility and applicability of the electronic device are greatly improved, and the most suitable camera resource can be automatically selected and enabled according to the real-time availability of the device, the performance requirement of the application program and the specific use scenario. On the one hand, the optimal image quality can be provided when needed, and the system power consumption is saved in the conventional application; on the other hand, the continuity of user experience can be ensured through the seamless automatic fallback function.

[0119] Figure 4 A block diagram of a control apparatus according to an embodiment of the present disclosure is schematically shown.

[0120] As shown in Figure 4 , the control apparatus 400 can include a first configuration module 410, a first enumeration module 420 and a first control module 430.

[0121] The first configuration module 410 is configured to configure a low-speed control channel between the mobile processor interface (MIPI) device and the electronic device by a target configuration instruction in response to detecting that the MIPI device establishes a physical connection with the electronic device. In some embodiments, the first configuration module 410 can be configured to perform operation S110 in the control method described above, which will not be repeated here.

[0122] The first enumeration module 420 is configured to perform device enumeration on the MIPI device by using the low-speed control channel. In some embodiments, the first enumeration module 420 can be configured to perform operation S120 in the control method described above, which will not be repeated here.

[0123] The first control module 430 is configured to control a device driver corresponding to the MIPI device to enter a standby response state after completing the device enumeration, so as to be able to respond to a target control instruction to control the MIPI device to provide a target function service. In some embodiments, the first control module 430 can be configured to perform operation S130 in the control method described above, which will not be repeated here. Wherein, the target configuration instruction comes from different components of the electronic device in different running stages of the electronic device.

[0124] According to the embodiments of the present disclosure, the first configuration module can include a first determination module and a first detection module.

[0125] The first determination module is configured to determine a running stage of the electronic device. In some embodiments, the first determination module can be configured to perform operation S210 in the control method described above, which will not be repeated here.

[0126] The first detection module is configured to detect, by a boot system or an operating system of the electronic device, access of the MIPI device in different running stages, and generate a corresponding target configuration instruction to configure the low-speed control channel. In some embodiments, the first detection module can be configured to perform operation S220 in the control method described above, and details are not repeated here.

[0127] According to the embodiments of the present disclosure, the control device can further include a second detection module, a first generation module, or the control device can further include a third detection module and a second generation module.

[0128] The second detection module is configured to detect, by the boot system of the electronic device, an access state of the MIPI device when the electronic device is in a booting stage. In some embodiments, the second detection module can be configured to perform operation S310 in the control method described above, and details are not repeated here.

[0129] The first generation module is configured to generate, by the boot system, a first configuration instruction to configure a low-speed control channel between the electronic device and the MIPI device when it is detected that the MIPI device is accessed to the electronic device. In some embodiments, the first generation module can be configured to perform operation S320 in the control method described above, and details are not repeated here.

[0130] The third detection module is configured to detect, by the operating system of the electronic device, an access state of the MIPI interface when the electronic device is in an operating system stage. In some embodiments, the third detection module can be configured to perform operation S330 in the control method described above, and details are not repeated here.

[0131] The second generation module is configured to generate, by the operating system, a second configuration instruction to configure a low-speed control channel between the electronic device and the MIPI device when it is detected that the MIPI device is accessed to the electronic device. In some embodiments, the second generation module can be configured to perform operation S340 in the control method described above, and details are not repeated here.

[0132] According to the embodiments of the present disclosure, the control device can further include a third generation module.

[0133] The third generation module is configured to generate first prompt information, or generate a pop-up instruction for controlling the MIPI device to pop up from the accommodation structure of the electronic device, or generate an initialization instruction for delaying initialization of the MIPI device, in a case where it is detected that the MIPI device does not access the electronic device. In some embodiments, the third generation module can be configured to perform the third generation operation in the control method described above, and details are not described herein. The first prompt information is used to prompt position information of the MIPI device or prompt a user to access the MIPI device. The pop-up instruction is used to control the MIPI device to switch from the accommodation state to the pop-up state. The initialization instruction is used to control the electronic device to perform an initialization operation on the accessed MIPI device in a case where a target trigger event is met.

[0134] According to the embodiments of the present disclosure, the control device can further include one of a first obtaining module and a second obtaining module.

[0135] The first obtaining module is configured to obtain application configuration information of a target application of the electronic device, and configure a working parameter of the MIPI device based on the application configuration information. The target application is an application that needs to call the MIPI device to perform a target task. In some embodiments, the first obtaining module can be configured to perform the first obtaining operation in the control method described above, and details are not described herein.

[0136] The second obtaining module is configured to obtain usage information of the electronic device, and configure the working parameter of the MIPI device based on the usage information. The working parameter of the MIPI device is different under different usage information. In some embodiments, the second obtaining module can be configured to perform the second obtaining operation in the control method described above, and details are not described herein.

[0137] According to the embodiments of the present disclosure, the control device can further include at least one of a second control module and a third control module.

[0138] The second control module is configured to, in response to obtaining an image acquisition instruction, control a MIPI camera device to acquire original image data in a target view range through camera driving of the electronic device. The original image data is used to be processed into display output data that can be output by a display unit by a processor in the electronic device. In some embodiments, the second control module can be configured to perform the second control operation in the control method described above, and details are not described herein.

[0139] The third control module is configured to, in response to obtaining a display output instruction, control a MIPI display device to output display data transmitted by a processor of the electronic device through display driving of the electronic device. In some embodiments, the third control module can be configured to perform the third control operation in the control method described above, and details are not described herein.

[0140] According to the embodiments of the present disclosure, in the case that the MIPI device is a MIPI camera and the electronic device is further equipped with a USB camera, the control apparatus can further include a fourth control module.

[0141] The fourth control module is configured to control a camera driving of the electronic device and a communication link state between the MIPI camera and the USB camera based on a change in an access state of the MIPI camera and / or usage information of the electronic device. In some embodiments, the fourth control module can be configured to perform the fourth control operation in the control method described above, and details are not described herein.

[0142] Any one or more of the modules, sub-modules, units, sub-units according to the embodiments of the present disclosure, or at least part of functions of any one or more of the modules, sub-modules, units, sub-units can be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to the embodiments of the present disclosure can be split into multiple modules for implementation. Any one or more of the modules, sub-modules, units, sub-units according to the embodiments of the present disclosure can be implemented at least in part as a hardware circuit, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on board, a system in package, an application-specific integrated circuit (ASIC), or any other reasonable manner of hardware or firmware by integrating or packaging the circuit, or in any one of software, hardware and firmware or in a proper combination of any of the above. Alternatively, any one or more of the modules, sub-modules, units, sub-units according to the embodiments of the present disclosure can be implemented at least in part as a computer program module, which can perform corresponding functions when the computer program module is run.

[0143] For example, any of the first configuration module 410, the first enumeration module 420, and the first control module 430 can be combined in one module / unit / sub-unit, or any of the modules / units / sub-units can be split into multiple modules / units / sub-units. Alternatively, at least part of the function of one or more of the modules / units / sub-units can be combined with at least part of the function of other modules / units / sub-units, and implemented in one module / unit / sub-unit. According to an embodiment of the present disclosure, at least one of the first configuration module 410, the first enumeration module 420, and the first control module 430 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on board, a system on package, an application specific integrated circuit (ASIC), or any other reasonable manner of integrating or packaging a circuit, etc. in hardware or firmware, or implemented in any one of software, hardware, and firmware or in a proper combination of any of them. Alternatively, at least one of the first configuration module 410, the first enumeration module 420, and the first control module 430 can be at least partially implemented as a computer program module that can perform the corresponding function when the computer program module is run.

[0144] It should be noted that the data processing system part in the embodiments of the present disclosure corresponds to the data processing method part in the embodiments of the present disclosure, and the description of the data processing system part is specifically referred to the data processing method part, which will not be repeated here.

[0145] Figure 5 A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Figure 5 The electronic device shown is merely an example, and should not bring any limitation to the function and use range of the embodiments of the present disclosure.

[0146] As Figure 5 shown, the electronic device 500 according to an embodiment of the present disclosure includes a device body and a processor 501, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 502 or loaded from a storage part 508 to a random access memory (RAM) 503. The processor 501 can include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a special-purpose microprocessor (such as an application specific integrated circuit (ASIC)), etc. The processor 501 can also include an on-board memory for cache use. The processor 501 can include a single processing unit or multiple processing units for performing different actions of the method processes according to the embodiments of the present disclosure.

[0147] In the RAM 503, various programs and data required for the operation of the electronic device 500 are stored. The processor 501, the ROM 502, and the RAM 503 are connected to each other through the bus 504. According to an embodiment of the present disclosure, the processor 501 performs the following operations by executing the target code file in the ROM 502 and / or the RAM 503: configuring a low-speed control channel between the mobile processor interface (MIPI) device and the electronic device 500 in response to detecting that the MIPI device accesses the MIPI interface provided on the device body; performing device enumeration on the MIPI device by using the low-speed control channel; and after completing the device enumeration, controlling the device driver corresponding to the MIPI device to enter a standby response state, so as to be able to respond to a target control instruction to control the MIPI device to provide a target function service.

[0148] In one embodiment, the MIPI device is a MIPI camera or a MIPI display device, and the ROM 502 stores a boot system (for example, BIOS or UEFI) of the electronic device. When the electronic device is in a booting stage such as a starting stage, the processor 501 executes the boot system program stored in the ROM 502 to detect the access of the MIPI device and generate a corresponding first configuration instruction to configure the low-speed control channel.

[0149] In one embodiment, the storage part 508 stores an operating system and a device driver program corresponding to the MIPI device, which is loaded into the RAM 503 when running. When the electronic device is in an operating system stage, the processor 501 executes the operating system or the device driver program stored in the RAM 503 to detect the access of the MIPI device and generate a corresponding second configuration instruction to configure the low-speed control channel. Thus, in different running stages of the electronic device, the target configuration instruction comes from different components (for example, the boot system or the operating system) of the electronic device.

[0150] The processor 501 performs various operations of the method flow according to an embodiment of the present disclosure by executing the program in the ROM 502 and / or the RAM 503. It should be noted that the program can also be stored in one or more memories other than the ROM 502 and the RAM 503. The processor 501 can also perform various operations of the method flow according to an embodiment of the present disclosure by executing the program stored in the one or more memories.

[0151] According to an embodiment of the present disclosure, the electronic device 500 can further include an input / output (I / O) interface 505, which is also connected to the bus 504. At least one MIPI interface provided on the device body is connected to the bus 504 via the I / O interface 505 to access a MIPI device such as a MIPI camera or a MIPI display device. The electronic device 500 can further include one or more of the following components connected to the input / output (I / O) interface 505: an input part 506 including a keyboard, a mouse, and the like; an output part 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker, and the like; a storage part 508 including a hard disk, and the like; and a communication part 509 including a network interface card such as a LAN card, a modem, and the like. The communication part 509 performs a communication process via a network such as the Internet. A driver 510 is also connected to the input / output (I / O) interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is mounted on the driver 510 as necessary, so that a computer program read out therefrom is installed in the storage part 508 as necessary.

[0152] According to an embodiment of the present disclosure, when the MIPI device is a MIPI camera, the device body can include a first body and a second body rotatably connected (e.g., a screen part and a keyboard part of a notebook computer). The first body is provided with a MIPI interface, and the second body is provided with a receiving structure capable of receiving the MIPI camera, which is capable of switching from a receiving state to a pop-up state in response to a pop-up instruction generated by the electronic device in a case where no MIPI camera is detected to be connected. For example, the receiving structure is coupled to the I / O interface 505, which is capable of switching from the receiving state to the pop-up state in response to a pop-up instruction generated by the processor 501 in a case where no MIPI camera is detected to be connected, to facilitate a user to access and connect the MIPI camera.

[0153] Figure 6 An association diagram of a device body and a MIPI device according to an embodiment of the present disclosure is schematically shown.

[0154] As Figure 6As shown, the electronic device includes a first body 610 and a second body 620 rotatably connected thereto, the first body 610 is a display part, and the second body 620 is a keyboard and a main processor part. A MIPI interface 611 is arranged at an edge part (e.g., a top area as shown) of the first body 610, for establishing electrical connection with an external MIPI camera 630. The MIPI camera 630 can be mounted to the MIPI interface 611 by plugging or magnetic attraction, so as to establish a low-speed control channel and a high-speed data channel with the main processor, to realize image data transmission and control command interaction. A storage structure 621 is further arranged at a side of the second body (keyboard part), for storing the MIPI camera 630 when not in use. When the system detects that there is no MIPI camera access at present, and a target triggering event (e.g., a user starts a camera application or a video conference application, detects that the camera function needs to be called, or has not detected camera access for a preset time period) is met, the processor can send a pop-up instruction to the storage structure 621, so as to switch it from the storage state to the pop-up state, and push the camera 630 to a available position, so as to be taken out by the user and plugged into the MIPI interface 611 at the top of the display, to realize flexible physical access.

[0155] Figure 7 The prompt information after the target triggering event according to the embodiment of the disclosure is schematically shown.

[0156] As Figure 7 shown, when the user triggers a target event of calling the camera function, and it is detected that there is no MIPI camera access at present, the electronic device presents first prompt information on the display screen of the first body 610 (display part). The prompt information can be a text prompt, such as "please insert the camera", for reminding the user to take out the MIPI camera 630 from the storage structure 621 and plug it into the MIPI interface 611, to complete physical access and function activation. The prompt information can be in the form of text, or can be presented by graphical window, animation demonstration, etc., so as to provide intuitive operation guidance for the user.

[0157] According to an embodiment of the present disclosure, the method flow according to the embodiments of the present disclosure can be implemented as a computer software program. For example, the embodiments of the present disclosure include a computer program product comprising a computer program carrying out the program codes for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 509, and / or installed from the detachable medium 511. When the computer program is executed by the processor 501, the above-mentioned functions defined in the system, device, apparatus, module, unit, etc. of the embodiments of the present disclosure are executed. According to an embodiment of the present disclosure, the system, device, apparatus, module, unit, etc. described above can be implemented by computer program modules.

[0158] The present disclosure also provides a computer readable storage medium, which can be included in the device / apparatus / system described in the above embodiments, or exist separately without being assembled into the device / apparatus / system. The above computer readable storage medium carries one or more programs, which when executed, implement the method according to the embodiments of the present disclosure.

[0159] According to an embodiment of the present disclosure, the computer readable storage medium can be a non-volatile computer readable storage medium. For example, it can include but not limited to portable computer diskette, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any appropriate combination thereof. In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus or device.

[0160] For example, according to an embodiment of the present disclosure, the computer readable storage medium can include one or more memories of the ROM 502 and / or the RAM 503 described above and / or one or more memories other than the ROM 502 and the RAM 503.

[0161] The embodiments of the present disclosure also include a computer program product comprising a computer program containing program codes for executing the method provided by the embodiments of the present disclosure, which program codes are used to make the electronic device implement the control method provided by the embodiments of the present disclosure when the computer program product is running on the electronic device.

[0162] When the computer program is executed by the processor 501, the above-mentioned functions defined in the system / apparatus of the embodiments of the present disclosure are executed. According to an embodiment of the present disclosure, the system, device, apparatus, module, unit, etc. described above can be implemented by computer program modules.

[0163] In one embodiment, the computer program can be tangibly embodied in a non-transitory computer readable medium, such as the optical storage device, the magnetic storage device, etc. In another embodiment, the computer program can be tangibly embodied in a signal, such as a download singal, and be distributed over the networks, such as the Internet, and be downloaded into the computer system 500 through the communication interface 509, and / or the removable storage device 511. The computer program instructions can be implemented in any programming language, such as machine, assembly, C, C++, C#, Visual Basic, Java, or the like, and in any high-level, high- order, or low-level programming language. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). The computer program can be embodied in a computer program product, which can be distributed over the network(s) and can be downloaded into the computer system 500 over the network(s) from the computer program product.

[0164] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. Alternatively, computer program implemented process can be produced upon realization of or

[0165] The above describes embodiments of the present disclosure. However, these embodiments are merely for illustrative purposes, and are not intended to limit the scope of the present disclosure. Although each embodiment is described above separately, this does not mean that the measures in each embodiment cannot be used advantageously in combination. Those skilled in the art can make various substitutions and modifications without departing from the scope of the present disclosure, and these substitutions and modifications should all fall within the scope of the present disclosure.

Claims

1. A control method comprising: configuring a low-speed control channel between a mobile processor interface (MIPI) device and an electronic device by a target configuration instruction in response to detecting that the MIPI device establishes a physical connection with the electronic device; performing device enumeration on the MIPI device by using the low-speed control channel; controlling a device driver corresponding to the MIPI device to enter a standby response state after completing the device enumeration, so as to enable the MIPI device to provide a target function service in response to a target control instruction; wherein the target configuration instruction is from different components of the electronic device in different running stages of the electronic device.

2. The method of claim 1, wherein, The configuring of the low-speed control channel between the MIPI device and the electronic device by the target configuration instruction comprises: determining a running stage of the electronic device; detecting access of the MIPI device by a boot system or an operating system of the electronic device in different running stages, and generating a corresponding target configuration instruction to configure the low-speed control channel.

3. The method of claim 1 or 2, further comprising: detecting, by a boot system of the electronic device, an access state of the MIPI device in a case where the electronic device is in a booting stage; generating, by the boot system, a first configuration instruction to configure a low-speed control channel between the electronic device and the MIPI device by the first configuration instruction in a case where the MIPI device is detected to access the electronic device; or detecting, by an operating system of the electronic device, an access state of the MIPI interface in a case where the electronic device is in an operating system stage; generating, by the operating system, a second configuration instruction to configure a low-speed control channel between the electronic device and the MIPI device by the second configuration instruction in a case where the MIPI device is detected to access the electronic device.

4. The method of claim 3, further comprising: generating a first prompt information, or generating an eject instruction to control the MIPI device to eject from a storage structure of the electronic device, or generating an initialization instruction to delay initialization of the MIPI device in a case where no MIPI device is detected to access the electronic device; wherein the first prompt information is used to prompt location information of the MIPI device or prompt a user to access the MIPI device; the eject instruction is used to control the MIPI device to switch from a storage state to an eject state; the initialization instruction is used to control the electronic device to perform an initialization operation on the accessed MIPI device in a case where a target trigger event is met. After completing the device enumeration, at least one of the following is further included:

5. The method of claim 1, wherein, obtaining application configuration information of a target application of the electronic device, and configuring a working parameter of the MIPI device based on the application configuration information, the target application being an application that needs to call the MIPI device to perform a target task; obtaining usage information of the electronic device, and configuring a working parameter of the MIPI device based on the usage information, the working parameter of the MIPI device being different in different usage information. ​ 6. The method of claim 1, wherein, control the MIPI device to provide target function service in response to target control instruction, including at least one of: in response to obtaining image acquisition instruction, control the MIPI camera device to acquire raw image data in the target view range through the camera driver of the electronic device, the raw image data being used for being processed into display output data capable of being output by the display unit by the processor in the electronic device; in response to obtaining display output instruction, control the MIPI display device to output the to-be-displayed data transmitted by the processor of the electronic device through the display driver of the electronic device.

7. The method of claim 1, in the case where the MIPI device is a MIPI camera and the electronic device is further provided with a USB camera, the method further comprising: based on the access state change of the MIPI camera and / or the usage information of the electronic device, control the camera driver of the electronic device to control the communication link state between the MIPI camera and the USB camera.

8. An electronic device, comprising: a device body provided with at least one MIPI interface, capable of being connected with a mobile processor interface (MIPI) device; a processor capable of running a target code file to perform the following operations: in response to detecting that the MIPI device is accessed to the MIPI interface, configure a low-speed control channel between the MIPI device through target configuration instruction; perform device enumeration on the MIPI device by using the low-speed control channel; after completing the device enumeration, control the device driver corresponding to the MIPI device to enter a standby response state, so as to be capable of responding to target control instruction to control the MIPI device to provide target function service; wherein, in different running stages of the electronic device, the target configuration instruction comes from different components of the electronic device.

9. The electronic device of claim 8, wherein the MIPI device is a MIPI camera or a MIPI display device; in different running stages of the electronic device, the access of the MIPI device is detected by the boot system or the operating system of the electronic device, and the corresponding target configuration instruction is generated to configure the low-speed control channel.

10. The electronic device of claim 8, wherein the MIPI device is a MIPI camera, and the device body comprises a first body and a second body connected in rotation; the MIPI interface is arranged on the first body, and a receiving structure capable of receiving the MIPI camera is arranged on the second body; the receiving structure is capable of switching from a receiving state to a pop-up state in response to a pop-up instruction generated by the electronic device in the case where it is detected that there is no MIPI camera accessed.