summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSudhir Vyas <svyas@nvidia.com>2020-02-19 09:40:37 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2020-02-22 12:23:41 -0500
commitfc91da385da7b7bbb7a25f7ad8d3897eec6e1ff5 (patch)
treeb4acb2b9093dab3b0e26027acd919a266a6b6e2b /include
parent534e799439b0af8f436c69767b5699b317d45606 (diff)
drivers: media: gmsl sensor flexi connections
Enable splitter mode only if more than one devices said to be attached. Consider sensor device does not exist, if serializer fails to communicate on newly assigned proxy slave. Also skip sensor probe in this case, to avoid creating false dev node. Reset to active gmsl link if all source devices are not physically connected. This enables support for all combinations of sensor connections for streaming, i.e. dual or link-A only or link-B only. Use max_src instead of num_src during boot, since num_src only reflects the number of devices registered so far. Keep using num_src for streaming sequence. Some trivial fixes. Bug 2838597 Change-Id: Ia5624906191cca3b4d30405d0ffba899eba95da6 Signed-off-by: Sudhir Vyas <svyas@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2299611 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Frank Chen <frankc@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'include')
-rw-r--r--include/media/gmsl-link.h3
-rw-r--r--include/media/max9296.h4
2 files changed, 4 insertions, 3 deletions
diff --git a/include/media/gmsl-link.h b/include/media/gmsl-link.h
index 79cef63fe..94df6bf3f 100644
--- a/include/media/gmsl-link.h
+++ b/include/media/gmsl-link.h
@@ -1,5 +1,5 @@
1/** 1/**
2 * Copyright (c) 2018-2019, NVIDIA Corporation. All rights reserved. 2 * Copyright (c) 2018-2020, NVIDIA Corporation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -59,6 +59,7 @@ struct gmsl_link_ctx {
59 __u32 ser_reg; 59 __u32 ser_reg;
60 __u32 sdev_reg; 60 __u32 sdev_reg;
61 __u32 sdev_def; 61 __u32 sdev_def;
62 bool serdev_found;
62 struct gmsl_stream streams[GMSL_DEV_MAX_NUM_DATA_STREAMS]; 63 struct gmsl_stream streams[GMSL_DEV_MAX_NUM_DATA_STREAMS];
63 struct device *s_dev; 64 struct device *s_dev;
64}; 65};
diff --git a/include/media/max9296.h b/include/media/max9296.h
index ffc8eae0e..014af0af2 100644
--- a/include/media/max9296.h
+++ b/include/media/max9296.h
@@ -1,5 +1,5 @@
1/** 1/**
2 * Copyright (c) 2018-2019, NVIDIA Corporation. All rights reserved. 2 * Copyright (c) 2018-2020, NVIDIA Corporation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -21,7 +21,7 @@
21 21
22int max9296_setup_link(struct device *dev, struct device *s_dev); 22int max9296_setup_link(struct device *dev, struct device *s_dev);
23 23
24int max9296_setup_control(struct device *dev); 24int max9296_setup_control(struct device *dev, struct device *s_dev);
25 25
26int max9296_reset_control(struct device *dev, struct device *s_dev); 26int max9296_reset_control(struct device *dev, struct device *s_dev);
27 27