public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Subject: [PATCH 4/4] smiapp: Make clock control optional
Date: Mon, 13 Feb 2017 18:16:26 +0200	[thread overview]
Message-ID: <1487002586-1480-5-git-send-email-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <1487002586-1480-1-git-send-email-sakari.ailus@linux.intel.com>

The clock control is not explicitly controlled by the driver in two cases:
ACPI based systems and when the clock is part of the power sequence of the
camera module.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/media/i2c/smiapp/smiapp-core.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index caf376c..9ed1b86 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -2883,7 +2883,10 @@ static int smiapp_probe(struct i2c_client *client,
 	}
 
 	sensor->ext_clk = devm_clk_get(&client->dev, NULL);
-	if (IS_ERR(sensor->ext_clk)) {
+	if (PTR_ERR(sensor->ext_clk) == -ENOENT) {
+		dev_info(&client->dev, "no clock defined, continuing...\n");
+		sensor->ext_clk = NULL;
+	} else if (IS_ERR(sensor->ext_clk)) {
 		dev_err(&client->dev, "could not get clock (%ld)\n",
 			PTR_ERR(sensor->ext_clk));
 		return -EPROBE_DEFER;
-- 
2.1.4

  parent reply	other threads:[~2017-02-13 16:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-13 16:16 [PATCH 0/4] smiapp cleanups, clock control changes Sakari Ailus
2017-02-13 16:16 ` [PATCH 1/4] smiapp: Remove smiapp.h header under include Sakari Ailus
2017-02-13 16:16 ` [PATCH 2/4] smiapp: Verify clock frequency after setting it, prevent changing it Sakari Ailus
2017-02-13 16:16 ` [PATCH 3/4] smiapp: Get clock rate if it's not available through DT Sakari Ailus
2017-02-13 18:27   ` kbuild test robot
2017-02-14  7:37   ` [PATCH v1.1 " Sakari Ailus
2017-02-15 23:05   ` [PATCH " kbuild test robot
2017-02-13 16:16 ` Sakari Ailus [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-08-29 12:41 [PATCH 0/4] Better support for ACPI in smiapp Sakari Ailus
2017-08-29 12:41 ` [PATCH 4/4] smiapp: Make clock control optional Sakari Ailus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487002586-1480-5-git-send-email-sakari.ailus@linux.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox