| Laurent Pinchart | 121e9f1 | 2011-02-12 18:05:06 -0300 | [diff] [blame] | 1 | /* |
| 2 | * ispcsiphy.h |
| 3 | * |
| 4 | * TI OMAP3 ISP - CSI PHY module |
| 5 | * |
| 6 | * Copyright (C) 2010 Nokia Corporation |
| 7 | * Copyright (C) 2009 Texas Instruments, Inc. |
| 8 | * |
| 9 | * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
| 10 | * Sakari Ailus <sakari.ailus@iki.fi> |
| 11 | * |
| 12 | * This program is free software; you can redistribute it and/or modify |
| 13 | * it under the terms of the GNU General Public License version 2 as |
| 14 | * published by the Free Software Foundation. |
| Laurent Pinchart | 121e9f1 | 2011-02-12 18:05:06 -0300 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | #ifndef OMAP3_ISP_CSI_PHY_H |
| 18 | #define OMAP3_ISP_CSI_PHY_H |
| 19 | |
| Laurent Pinchart | 78c66fb | 2015-05-20 04:08:30 -0300 | [diff] [blame] | 20 | #include "omap3isp.h" |
| Sakari Ailus | fe6adc1 | 2011-10-10 14:13:26 -0300 | [diff] [blame] | 21 | |
| Laurent Pinchart | 121e9f1 | 2011-02-12 18:05:06 -0300 | [diff] [blame] | 22 | struct isp_csi2_device; |
| 23 | struct regulator; |
| 24 | |
| Laurent Pinchart | 121e9f1 | 2011-02-12 18:05:06 -0300 | [diff] [blame] | 25 | struct isp_csiphy { |
| 26 | struct isp_device *isp; |
| 27 | struct mutex mutex; /* serialize csiphy configuration */ |
| Laurent Pinchart | 121e9f1 | 2011-02-12 18:05:06 -0300 | [diff] [blame] | 28 | struct isp_csi2_device *csi2; |
| 29 | struct regulator *vdd; |
| Sakari Ailus | 7e1db59 | 2017-03-04 04:52:40 -0500 | [diff] [blame] | 30 | /* the entity that acquired the phy */ |
| 31 | struct media_entity *entity; |
| Laurent Pinchart | 121e9f1 | 2011-02-12 18:05:06 -0300 | [diff] [blame] | 32 | |
| 33 | /* mem resources - enums as defined in enum isp_mem_resources */ |
| 34 | unsigned int cfg_regs; |
| 35 | unsigned int phy_regs; |
| 36 | |
| 37 | u8 num_data_lanes; /* number of CSI2 Data Lanes supported */ |
| Laurent Pinchart | 121e9f1 | 2011-02-12 18:05:06 -0300 | [diff] [blame] | 38 | }; |
| 39 | |
| Sakari Ailus | 7e1db59 | 2017-03-04 04:52:40 -0500 | [diff] [blame] | 40 | int omap3isp_csiphy_acquire(struct isp_csiphy *phy, |
| 41 | struct media_entity *entity); |
| Laurent Pinchart | 121e9f1 | 2011-02-12 18:05:06 -0300 | [diff] [blame] | 42 | void omap3isp_csiphy_release(struct isp_csiphy *phy); |
| 43 | int omap3isp_csiphy_init(struct isp_device *isp); |
| Sakari Ailus | 838a6c5 | 2017-03-04 10:07:08 -0500 | [diff] [blame] | 44 | void omap3isp_csiphy_cleanup(struct isp_device *isp); |
| Laurent Pinchart | 121e9f1 | 2011-02-12 18:05:06 -0300 | [diff] [blame] | 45 | |
| 46 | #endif /* OMAP3_ISP_CSI_PHY_H */ |