max9286.c (287fe160834acdf9c44e5b73676180c6dbdedf76) max9286.c (805d4311a54a25d7347684fdf778c6239b190864)
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Maxim MAX9286 GMSL Deserializer Driver
4 *
5 * Copyright (C) 2017-2019 Jacopo Mondi
6 * Copyright (C) 2017-2019 Kieran Bingham
7 * Copyright (C) 2017-2019 Laurent Pinchart
8 * Copyright (C) 2017-2019 Niklas Söderlund

--- 860 unchanged lines hidden (view full) ---

869}
870
871static int max9286_get_frame_interval(struct v4l2_subdev *sd,
872 struct v4l2_subdev_state *sd_state,
873 struct v4l2_subdev_frame_interval *interval)
874{
875 struct max9286_priv *priv = sd_to_max9286(sd);
876
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Maxim MAX9286 GMSL Deserializer Driver
4 *
5 * Copyright (C) 2017-2019 Jacopo Mondi
6 * Copyright (C) 2017-2019 Kieran Bingham
7 * Copyright (C) 2017-2019 Laurent Pinchart
8 * Copyright (C) 2017-2019 Niklas Söderlund

--- 860 unchanged lines hidden (view full) ---

869}
870
871static int max9286_get_frame_interval(struct v4l2_subdev *sd,
872 struct v4l2_subdev_state *sd_state,
873 struct v4l2_subdev_frame_interval *interval)
874{
875 struct max9286_priv *priv = sd_to_max9286(sd);
876
877 /*
878 * FIXME: Implement support for V4L2_SUBDEV_FORMAT_TRY, using the V4L2
879 * subdev active state API.
880 */
881 if (interval->which != V4L2_SUBDEV_FORMAT_ACTIVE)
882 return -EINVAL;
883
877 if (interval->pad != MAX9286_SRC_PAD)
878 return -EINVAL;
879
880 interval->interval = priv->interval;
881
882 return 0;
883}
884
885static int max9286_set_frame_interval(struct v4l2_subdev *sd,
886 struct v4l2_subdev_state *sd_state,
887 struct v4l2_subdev_frame_interval *interval)
888{
889 struct max9286_priv *priv = sd_to_max9286(sd);
890
884 if (interval->pad != MAX9286_SRC_PAD)
885 return -EINVAL;
886
887 interval->interval = priv->interval;
888
889 return 0;
890}
891
892static int max9286_set_frame_interval(struct v4l2_subdev *sd,
893 struct v4l2_subdev_state *sd_state,
894 struct v4l2_subdev_frame_interval *interval)
895{
896 struct max9286_priv *priv = sd_to_max9286(sd);
897
898 /*
899 * FIXME: Implement support for V4L2_SUBDEV_FORMAT_TRY, using the V4L2
900 * subdev active state API.
901 */
902 if (interval->which != V4L2_SUBDEV_FORMAT_ACTIVE)
903 return -EINVAL;
904
891 if (interval->pad != MAX9286_SRC_PAD)
892 return -EINVAL;
893
894 priv->interval = interval->interval;
895
896 return 0;
897}
898

--- 817 unchanged lines hidden ---
905 if (interval->pad != MAX9286_SRC_PAD)
906 return -EINVAL;
907
908 priv->interval = interval->interval;
909
910 return 0;
911}
912

--- 817 unchanged lines hidden ---