]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.44/media-cx23885-set-subdev-host-data-to-clk_freq-pointer.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.14.44 / media-cx23885-set-subdev-host-data-to-clk_freq-pointer.patch
CommitLineData
06e23a17
GKH
1From foo@baz Thu May 24 11:09:34 CEST 2018
2From: Brad Love <brad@nextdimension.cc>
3Date: Tue, 6 Mar 2018 14:15:36 -0500
4Subject: media: cx23885: Set subdev host data to clk_freq pointer
5
6From: Brad Love <brad@nextdimension.cc>
7
8[ Upstream commit 5ceade1d97fc6687e050c44c257382c192f56276 ]
9
10Currently clk_freq is ignored entirely, because the cx235840 driver
11configures the xtal at the chip defaults. This is an issue if a
12board is produced with a non-default frequency crystal. If clk_freq
13is not zero the cx25840 will attempt to use the setting provided,
14or fall back to defaults otherwise.
15
16Signed-off-by: Brad Love <brad@nextdimension.cc>
17Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
18Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20---
21 drivers/media/pci/cx23885/cx23885-cards.c | 4 ++++
22 1 file changed, 4 insertions(+)
23
24--- a/drivers/media/pci/cx23885/cx23885-cards.c
25+++ b/drivers/media/pci/cx23885/cx23885-cards.c
26@@ -2286,6 +2286,10 @@ void cx23885_card_setup(struct cx23885_d
27 &dev->i2c_bus[2].i2c_adap,
28 "cx25840", 0x88 >> 1, NULL);
29 if (dev->sd_cx25840) {
30+ /* set host data for clk_freq configuration */
31+ v4l2_set_subdev_hostdata(dev->sd_cx25840,
32+ &dev->clk_freq);
33+
34 dev->sd_cx25840->grp_id = CX23885_HW_AV_CORE;
35 v4l2_subdev_call(dev->sd_cx25840, core, load_fw);
36 }