summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/exynos4-is/fimc-is-i2c.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-11 13:22:22 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-11 13:22:22 -0700
commitde34f4da7f62ff59ac6e1ef320b0fcfa3296fce3 (patch)
tree88b5db2fc7fbbb0353edd8447a832a5225a49d01 /drivers/media/platform/exynos4-is/fimc-is-i2c.c
parent56e520c7a0a490b63b042b047ec9659fc08762a4 (diff)
parent9fce0c226536fc36c7fb0a80000ca38a995be43e (diff)
downloadblackbird-op-linux-de34f4da7f62ff59ac6e1ef320b0fcfa3296fce3.tar.gz
blackbird-op-linux-de34f4da7f62ff59ac6e1ef320b0fcfa3296fce3.zip
Merge tag 'media/v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab: - Documentation improvements: conversion of all non-DocBook documents to Sphinx and lots of fixes to the uAPI media book - New PCI driver for Techwell TW5864 media grabber boards - New SoC driver for ATMEL Image Sensor Controller - Removal of some obsolete SoC drivers (s5p-tv driver and soc_camera drivers) - Addition of ST CEC driver - Lots of drivers fixes, improvements and additions * tag 'media/v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (464 commits) [media] ttusb_dec: avoid the risk of go past buffer [media] cx23885: Fix some smatch warnings [media] si2165: switch to regmap [media] si2165: use i2c_client->dev instead of i2c_adapter->dev for logging [media] si2165: Remove legacy attach [media] cx231xx: attach si2165 driver via i2c_client [media] cx231xx: Prepare for attaching new style i2c_client DVB demod drivers [media] cx23885: attach si2165 driver via i2c_client [media] si2165: support i2c_client attach [media] si2165: avoid division by zero [media] rcar-vin: add R-Car gen2 fallback compatibility string [media] lgdt3306a: remove 20*50 msec unnecessary timeout [media] cx25821: Remove deprecated create_singlethread_workqueue [media] cx25821: Drop Freeing of Workqueue [media] cxd2841er: force 8MHz bandwidth for DVB-C if specified bw not supported [media] redrat3: hardware-specific parameters [media] redrat3: remove hw_timeout member [media] cxd2841er: BER and SNR reading for ISDB-T [media] dvb-usb: avoid link error with dib3000m{b,c| [media] dvb-usb: split out common parts of dibusb ...
Diffstat (limited to 'drivers/media/platform/exynos4-is/fimc-is-i2c.c')
-rw-r--r--drivers/media/platform/exynos4-is/fimc-is-i2c.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/drivers/media/platform/exynos4-is/fimc-is-i2c.c b/drivers/media/platform/exynos4-is/fimc-is-i2c.c
index 7521aa59b064..6bba4ca022be 100644
--- a/drivers/media/platform/exynos4-is/fimc-is-i2c.c
+++ b/drivers/media/platform/exynos4-is/fimc-is-i2c.c
@@ -55,26 +55,33 @@ static int fimc_is_i2c_probe(struct platform_device *pdev)
i2c_adap->algo = &fimc_is_i2c_algorithm;
i2c_adap->class = I2C_CLASS_SPD;
- ret = i2c_add_adapter(i2c_adap);
- if (ret < 0) {
- dev_err(&pdev->dev, "failed to add I2C bus %s\n",
- node->full_name);
- return ret;
- }
-
platform_set_drvdata(pdev, isp_i2c);
-
pm_runtime_enable(&pdev->dev);
- pm_runtime_enable(&i2c_adap->dev);
+ ret = i2c_add_adapter(i2c_adap);
+ if (ret < 0)
+ goto err_pm_dis;
+ /*
+ * Client drivers of this adapter don't do any I2C transfers as that
+ * is handled by the ISP firmware. But we rely on the runtime PM
+ * state propagation from the clients up to the adapter driver so
+ * clear the ignore_children flags here. PM rutnime calls are not
+ * used in probe() handler of clients of this adapter so there is
+ * no issues with clearing the flag right after registering the I2C
+ * adapter.
+ */
+ pm_suspend_ignore_children(&i2c_adap->dev, false);
return 0;
+
+err_pm_dis:
+ pm_runtime_disable(&pdev->dev);
+ return ret;
}
static int fimc_is_i2c_remove(struct platform_device *pdev)
{
struct fimc_is_i2c *isp_i2c = platform_get_drvdata(pdev);
- pm_runtime_disable(&isp_i2c->adapter.dev);
pm_runtime_disable(&pdev->dev);
i2c_del_adapter(&isp_i2c->adapter);
OpenPOWER on IntegriCloud