blob: ed9b8d221e3f58e4c78f646f41e4c4467758053a [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Laurent Pinchart121e9f12011-02-12 18:05:06 -03002/*
3 * ispcsiphy.h
4 *
5 * TI OMAP3 ISP - CSI PHY module
6 *
7 * Copyright (C) 2010 Nokia Corporation
8 * Copyright (C) 2009 Texas Instruments, Inc.
9 *
10 * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
11 * Sakari Ailus <sakari.ailus@iki.fi>
Laurent Pinchart121e9f12011-02-12 18:05:06 -030012 */
13
14#ifndef OMAP3_ISP_CSI_PHY_H
15#define OMAP3_ISP_CSI_PHY_H
16
Laurent Pinchart78c66fb2015-05-20 04:08:30 -030017#include "omap3isp.h"
Sakari Ailusfe6adc12011-10-10 14:13:26 -030018
Laurent Pinchart121e9f12011-02-12 18:05:06 -030019struct isp_csi2_device;
20struct regulator;
21
Laurent Pinchart121e9f12011-02-12 18:05:06 -030022struct isp_csiphy {
23 struct isp_device *isp;
24 struct mutex mutex; /* serialize csiphy configuration */
Laurent Pinchart121e9f12011-02-12 18:05:06 -030025 struct isp_csi2_device *csi2;
26 struct regulator *vdd;
Sakari Ailus7e1db592017-03-04 04:52:40 -050027 /* the entity that acquired the phy */
28 struct media_entity *entity;
Laurent Pinchart121e9f12011-02-12 18:05:06 -030029
30 /* mem resources - enums as defined in enum isp_mem_resources */
31 unsigned int cfg_regs;
32 unsigned int phy_regs;
33
34 u8 num_data_lanes; /* number of CSI2 Data Lanes supported */
Laurent Pinchart121e9f12011-02-12 18:05:06 -030035};
36
Sakari Ailus7e1db592017-03-04 04:52:40 -050037int omap3isp_csiphy_acquire(struct isp_csiphy *phy,
38 struct media_entity *entity);
Laurent Pinchart121e9f12011-02-12 18:05:06 -030039void omap3isp_csiphy_release(struct isp_csiphy *phy);
40int omap3isp_csiphy_init(struct isp_device *isp);
Sakari Ailus838a6c52017-03-04 10:07:08 -050041void omap3isp_csiphy_cleanup(struct isp_device *isp);
Laurent Pinchart121e9f12011-02-12 18:05:06 -030042
43#endif /* OMAP3_ISP_CSI_PHY_H */