tegra: cam fsync driver with start time support

Camera fsync signal Driver provides following features.
 - Configures and runs TSC generator to provide fsync signal to the
   camera module
 - FSYNC signal is programmed as specified in DT for freq and offset
 - Start time of fsync signal can be specified or default
   value can be used
 - Default value used will be 10ms in future
 - If start time is provided, value must be provided in TSC ticks unit
 - Read DT, if tsc-gen-groups are specified, init &  expose node for
   each group
 - Each generator in group is configured
 - IOCTL interface is exposed to accept start time and start the generator
 - Sanity check is done to ensure, no generator is part of multiple groups
 - Backward compatibility is maintained

JIRA CAMERASW-11902
Bug 3799488

Change-Id: I4f278eb95b8f85edb2d5e7664c9f2dd694437263
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2898373
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Mohit Ingale
2023-05-04 06:21:00 +00:00
committed by mobile promotions
parent 57ec58a831
commit 8df7cfbf9f
6 changed files with 1176 additions and 518 deletions

View File

@@ -0,0 +1,23 @@
/* SPDX-License-Identifier: LicenseRef-NvidiaProprietary
* SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __CAM_FSYNC_H__
#define __CAM_FSYNC_H__
#define CAM_FSYNC_GRP_ABS_START_VAL \
_IOW('T', 1, uint64_t)
#endif