| Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| Laurent Pinchart | 121e9f1 | 2011-02-12 18:05:06 -0300 | [diff] [blame] | 2 | /* |
| 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 Pinchart | 121e9f1 | 2011-02-12 18:05:06 -0300 | [diff] [blame] | 12 | */ |
| 13 | |
| 14 | #ifndef OMAP3_ISP_CSI_PHY_H |
| 15 | #define OMAP3_ISP_CSI_PHY_H |
| 16 | |
| Laurent Pinchart | 78c66fb | 2015-05-20 04:08:30 -0300 | [diff] [blame] | 17 | #include "omap3isp.h" |
| Sakari Ailus | fe6adc1 | 2011-10-10 14:13:26 -0300 | [diff] [blame] | 18 | |
| Laurent Pinchart | 121e9f1 | 2011-02-12 18:05:06 -0300 | [diff] [blame] | 19 | struct isp_csi2_device; |
| 20 | struct regulator; |
| 21 | |
| Laurent Pinchart | 121e9f1 | 2011-02-12 18:05:06 -0300 | [diff] [blame] | 22 | struct isp_csiphy { |
| 23 | struct isp_device *isp; |
| 24 | struct mutex mutex; /* serialize csiphy configuration */ |
| Laurent Pinchart | 121e9f1 | 2011-02-12 18:05:06 -0300 | [diff] [blame] | 25 | struct isp_csi2_device *csi2; |
| 26 | struct regulator *vdd; |
| Sakari Ailus | 7e1db59 | 2017-03-04 04:52:40 -0500 | [diff] [blame] | 27 | /* the entity that acquired the phy */ |
| 28 | struct media_entity *entity; |
| Laurent Pinchart | 121e9f1 | 2011-02-12 18:05:06 -0300 | [diff] [blame] | 29 | |
| 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 Pinchart | 121e9f1 | 2011-02-12 18:05:06 -0300 | [diff] [blame] | 35 | }; |
| 36 | |
| Sakari Ailus | 7e1db59 | 2017-03-04 04:52:40 -0500 | [diff] [blame] | 37 | int omap3isp_csiphy_acquire(struct isp_csiphy *phy, |
| 38 | struct media_entity *entity); |
| Laurent Pinchart | 121e9f1 | 2011-02-12 18:05:06 -0300 | [diff] [blame] | 39 | void omap3isp_csiphy_release(struct isp_csiphy *phy); |
| 40 | int omap3isp_csiphy_init(struct isp_device *isp); |
| Sakari Ailus | 838a6c5 | 2017-03-04 10:07:08 -0500 | [diff] [blame] | 41 | void omap3isp_csiphy_cleanup(struct isp_device *isp); |
| Laurent Pinchart | 121e9f1 | 2011-02-12 18:05:06 -0300 | [diff] [blame] | 42 | |
| 43 | #endif /* OMAP3_ISP_CSI_PHY_H */ |