]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - drivers/media/i2c/power_ctrl_logic.h
Revert "UBUNTU: SAUCE: change power control driver to acpi driver"
[mirror_ubuntu-jammy-kernel.git] / drivers / media / i2c / power_ctrl_logic.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (c) 2020-2021 Intel Corporation. */
3
4 #ifndef _POWER_CTRL_LOGIC_H_
5 #define _POWER_CTRL_LOGIC_H_
6
7 #include <linux/gpio/consumer.h>
8 #include <linux/mutex.h>
9 #include <linux/pci.h>
10
11 /* pci id for probe power control logic*/
12 #define PCL_PCI_BRG_VEN_ID 0x8086
13 #define PCL_PCI_BRG_PDT_ID 0x9a14
14
15 #define PCL_DRV_NAME "power_ctrl_logic"
16 #define PCL_PROBE_MAX_TRY 5
17 #define PCL_PROBE_TRY_GAP 500 /* in millseconds */
18
19 struct power_ctrl_logic {
20 /* gpio resource*/
21 struct gpio_desc *reset_gpio;
22 struct gpio_desc *powerdn_gpio;
23 struct gpio_desc *clocken_gpio;
24 struct gpio_desc *indled_gpio;
25 /* status */
26 struct mutex status_lock;
27 bool power_on;
28 bool gpio_ready;
29 };
30
31 /* exported function for extern module */
32 int power_ctrl_logic_set_power(int on);
33 #endif