]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - drivers/media/i2c/pmic_dsc1.h
UBUNTU: SAUCE: IPU driver release WW52
[mirror_ubuntu-jammy-kernel.git] / drivers / media / i2c / pmic_dsc1.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (c) 2020 Intel Corporation. */
3
4 #ifndef _PMIC_DSC1_H_
5 #define _PMIC_DSC1_H_
6
7 #include <linux/gpio/consumer.h>
8 #include <linux/mutex.h>
9 #include <linux/pci.h>
10
11 /* pmic dsc1 pci id */
12 #define PCI_BRG_VENDOR_ID 0x8086
13 #define PCI_BRG_PRODUCT_ID 0x9a14
14
15 #define PMIC_DRV_NAME "pmic_dsc1"
16 #define PMIC_DSC1_PROBE_MAX_TRY 5
17 #define PMIC_DSC1_PROBE_TRY_GAP 500 /* in millseconds */
18
19 struct pmic_dsc1 {
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 pmic_dsc1_set_power(int on);
33 #endif