Files
linux-nv-oot/drivers/media/platform/tegra/cdi/cdi-dev-priv.h
Junghyun Kim 9269dac3ec drivers: media: CDI: Add IO Expander support
Add IO Expander support in CDI Dev to control the FRSYNC multiplexer
with the speicific platform

Bug 3582660

Change-Id: I3ee376e7a0bccabcfa16efb228879d4df0d65748
Signed-off-by: Junghyun Kim <juskim@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2727256
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2824551
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-13 06:27:42 -08:00

49 lines
1.2 KiB
C

// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2015-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#ifndef __CDI_DEV_PRIV_H__
#define __CDI_DEV_PRIV_H__
#include <linux/cdev.h>
#include "cdi-tca-priv.h"
#define MAX_POWER_LINKS_PER_BLOCK (4U)
struct max20087_priv {
int bus;
u32 addr;
u32 reg_len;
u32 dat_len;
u8 links[MAX_POWER_LINKS_PER_BLOCK];
};
struct cdi_dev_info {
struct i2c_client *i2c_client;
struct device *dev;
struct cdev cdev;
struct cdi_dev_platform_data *pdata;
atomic_t in_use;
struct mutex mutex;
struct cdi_dev_package rw_pkg;
struct dentry *d_entry;
u32 reg_len;
u32 reg_off;
char devname[32];
u8 power_is_on;
u8 cam_pwr_method;
u8 cam_pwr_i2c_addr;
struct max20087_priv max20087;
struct tca9539_priv tca9539;
u8 cim_ver; /* 1 - P3714 A01, 2 - P3714 A02/A03 */
};
int cdi_dev_raw_rd(struct cdi_dev_info *info, unsigned int offset,
unsigned int offset_len, u8 *val, size_t size);
int cdi_dev_raw_wr(struct cdi_dev_info *info, unsigned int offset, u8 *val,
size_t size);
int cdi_dev_debugfs_init(struct cdi_dev_info *cdi_dev);
int cdi_dev_debugfs_remove(struct cdi_dev_info *cdi_dev);
#endif /* __CDI_DEV_PRIV_H__ */