| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 5 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 6 | | - * published by the Free Software Foundation. |
|---|
| 7 | 4 | */ |
|---|
| 8 | 5 | |
|---|
| 9 | 6 | #ifndef FIMC_MDEVICE_H_ |
|---|
| .. | .. |
|---|
| 29 | 26 | #define FIMC_LITE_OF_NODE_NAME "fimc-lite" |
|---|
| 30 | 27 | #define FIMC_IS_OF_NODE_NAME "fimc-is" |
|---|
| 31 | 28 | #define CSIS_OF_NODE_NAME "csis" |
|---|
| 32 | | - |
|---|
| 33 | | -#define PINCTRL_STATE_IDLE "idle" |
|---|
| 34 | 29 | |
|---|
| 35 | 30 | #define FIMC_MAX_SENSORS 4 |
|---|
| 36 | 31 | #define FIMC_MAX_CAMCLKS 2 |
|---|
| .. | .. |
|---|
| 79 | 74 | |
|---|
| 80 | 75 | /** |
|---|
| 81 | 76 | * struct fimc_sensor_info - image data source subdev information |
|---|
| 82 | | - * @pdata: sensor's atrributes passed as media device's platform data |
|---|
| 77 | + * @pdata: sensor's attributes passed as media device's platform data |
|---|
| 83 | 78 | * @asd: asynchronous subdev registration data structure |
|---|
| 84 | 79 | * @subdev: image sensor v4l2 subdev |
|---|
| 85 | 80 | * @host: fimc device the sensor is currently linked to |
|---|
| .. | .. |
|---|
| 88 | 83 | */ |
|---|
| 89 | 84 | struct fimc_sensor_info { |
|---|
| 90 | 85 | struct fimc_source_info pdata; |
|---|
| 91 | | - struct v4l2_async_subdev asd; |
|---|
| 86 | + struct v4l2_async_subdev *asd; |
|---|
| 92 | 87 | struct v4l2_subdev *subdev; |
|---|
| 93 | 88 | struct fimc_dev *host; |
|---|
| 94 | 89 | }; |
|---|
| .. | .. |
|---|
| 112 | 107 | * @media_dev: top level media device |
|---|
| 113 | 108 | * @v4l2_dev: top level v4l2_device holding up the subdevs |
|---|
| 114 | 109 | * @pdev: platform device this media device is hooked up into |
|---|
| 115 | | - * @pinctrl: camera port pinctrl handle |
|---|
| 116 | | - * @state_default: pinctrl default state handle |
|---|
| 117 | | - * @state_idle: pinctrl idle state handle |
|---|
| 118 | 110 | * @cam_clk_provider: CAMCLK clock provider structure |
|---|
| 119 | 111 | * @user_subdev_api: true if subdevs are not configured by the host driver |
|---|
| 120 | 112 | * @slock: spinlock protecting @sensor array |
|---|
| .. | .. |
|---|
| 134 | 126 | struct v4l2_device v4l2_dev; |
|---|
| 135 | 127 | struct platform_device *pdev; |
|---|
| 136 | 128 | |
|---|
| 137 | | - struct fimc_pinctrl { |
|---|
| 138 | | - struct pinctrl *pinctrl; |
|---|
| 139 | | - struct pinctrl_state *state_default; |
|---|
| 140 | | - struct pinctrl_state *state_idle; |
|---|
| 141 | | - } pinctl; |
|---|
| 142 | | - |
|---|
| 143 | 129 | struct cam_clk_provider { |
|---|
| 144 | 130 | struct clk *clks[FIMC_MAX_CAMCLKS]; |
|---|
| 145 | 131 | struct clk_onecell_data clk_data; |
|---|
| .. | .. |
|---|
| 149 | 135 | } clk_provider; |
|---|
| 150 | 136 | |
|---|
| 151 | 137 | struct v4l2_async_notifier subdev_notifier; |
|---|
| 152 | | - struct v4l2_async_subdev *async_subdevs[FIMC_MAX_SENSORS]; |
|---|
| 153 | 138 | |
|---|
| 154 | 139 | bool user_subdev_api; |
|---|
| 155 | 140 | spinlock_t slock; |
|---|