devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hugues Fruchet <hugues.fruchet-qxv4g6HH51o@public.gmane.org>
To: Steve Longerbeam
	<slongerbeam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Sakari Ailus <sakari.ailus-X3B1VOXEql0@public.gmane.org>,
	Hans Verkuil <hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>,
	Mauro Carvalho Chehab
	<mchehab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Hugues Fruchet <hugues.fruchet-qxv4g6HH51o@public.gmane.org>,
	Benjamin Gaignard
	<benjamin.gaignard-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: [PATCH v5 1/5] media: ov5640: switch to gpiod_set_value_cansleep()
Date: Wed, 3 Jan 2018 10:57:28 +0100	[thread overview]
Message-ID: <1514973452-10464-2-git-send-email-hugues.fruchet@st.com> (raw)
In-Reply-To: <1514973452-10464-1-git-send-email-hugues.fruchet-qxv4g6HH51o@public.gmane.org>

Switch gpiod_set_value to gpiod_set_value_cansleep to avoid
warnings when powering sensor.

Signed-off-by: Hugues Fruchet <hugues.fruchet-qxv4g6HH51o@public.gmane.org>
---
 drivers/media/i2c/ov5640.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index c89ed66..61071f5 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -1524,7 +1524,7 @@ static int ov5640_restore_mode(struct ov5640_dev *sensor)
 
 static void ov5640_power(struct ov5640_dev *sensor, bool enable)
 {
-	gpiod_set_value(sensor->pwdn_gpio, enable ? 0 : 1);
+	gpiod_set_value_cansleep(sensor->pwdn_gpio, enable ? 0 : 1);
 }
 
 static void ov5640_reset(struct ov5640_dev *sensor)
@@ -1532,7 +1532,7 @@ static void ov5640_reset(struct ov5640_dev *sensor)
 	if (!sensor->reset_gpio)
 		return;
 
-	gpiod_set_value(sensor->reset_gpio, 0);
+	gpiod_set_value_cansleep(sensor->reset_gpio, 0);
 
 	/* camera power cycle */
 	ov5640_power(sensor, false);
@@ -1540,10 +1540,10 @@ static void ov5640_reset(struct ov5640_dev *sensor)
 	ov5640_power(sensor, true);
 	usleep_range(5000, 10000);
 
-	gpiod_set_value(sensor->reset_gpio, 1);
+	gpiod_set_value_cansleep(sensor->reset_gpio, 1);
 	usleep_range(1000, 2000);
 
-	gpiod_set_value(sensor->reset_gpio, 0);
+	gpiod_set_value_cansleep(sensor->reset_gpio, 0);
 	usleep_range(5000, 10000);
 }
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2018-01-03  9:57 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-03  9:57 [PATCH v5 0/5] Add OV5640 parallel interface and RGB565/YUYV support Hugues Fruchet
     [not found] ` <1514973452-10464-1-git-send-email-hugues.fruchet-qxv4g6HH51o@public.gmane.org>
2018-01-03  9:57   ` Hugues Fruchet [this message]
2018-01-03  9:57   ` [PATCH v5 2/5] media: ov5640: check chip id Hugues Fruchet
2018-01-03  9:57   ` [PATCH v5 3/5] media: dt-bindings: ov5640: refine CSI-2 and add parallel interface Hugues Fruchet
2018-01-05 18:41     ` Rob Herring
2018-01-03  9:57   ` [PATCH v5 4/5] media: ov5640: add support of DVP " Hugues Fruchet
     [not found]     ` <1514973452-10464-5-git-send-email-hugues.fruchet-qxv4g6HH51o@public.gmane.org>
2018-02-01 17:53       ` Fabrizio Castro
2018-02-02 18:50         ` Maxime Ripard
2018-02-05 11:42           ` Fabrizio Castro
     [not found]             ` <TY1PR06MB08954787E362BF24C7FD41DBC0FE0-/PRLmSCtZ16EeHdvShrxA20DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-02-05 13:56               ` Maxime Ripard
2018-01-08 15:38   ` [PATCH v5 0/5] Add OV5640 parallel interface and RGB565/YUYV support Maxime Ripard
2018-01-08 17:13     ` Hugues FRUCHET
2018-01-09 18:49       ` Maxime Ripard
     [not found]       ` <3010811e-ed37-4489-6a9f-6cc835f41575-qxv4g6HH51o@public.gmane.org>
2018-01-10 15:37         ` Maxime Ripard
2018-01-10 15:51           ` Hugues FRUCHET
     [not found]             ` <2089de18-1f7f-6d6e-7aee-9dc424bca335-qxv4g6HH51o@public.gmane.org>
2018-01-10 22:25               ` Sakari Ailus
2018-01-11  8:12                 ` Hugues FRUCHET
     [not found]                   ` <6661b493-5f2a-b201-390d-e3452e6873a0-qxv4g6HH51o@public.gmane.org>
2018-01-11  8:19                     ` Sakari Ailus
     [not found]                       ` <20180111081912.curkvpguof6ul555-S+BSfZ9RZZmRSg0ZkenSGLdO1Tsj/99ntUK59QYPAWc@public.gmane.org>
2018-01-11  8:25                         ` Hugues FRUCHET
2018-01-11  9:18                           ` Sakari Ailus
2018-01-11 12:37             ` Maxime Ripard
2018-01-11  1:15           ` Yong
     [not found]             ` <20180111091508.a0c9f630c6b4ef80178694fb-+3dxTMOEIRNWk0Htik3J/w@public.gmane.org>
2018-01-11 12:40               ` Maxime Ripard
     [not found]                 ` <20180111124018.azdzjeitjsyenmra-ZC1Zs529Oq4@public.gmane.org>
2018-01-12  2:18                   ` Yong
     [not found]                     ` <20180112101839.cc13571a099d64eea2ac6e3a-+3dxTMOEIRNWk0Htik3J/w@public.gmane.org>
2018-01-12  9:04                       ` Maxime Ripard
2018-01-03  9:57 ` [PATCH v5 5/5] media: ov5640: add support of RGB565 and YUYV formats Hugues Fruchet
2018-01-08 20:54 ` [PATCH v5 0/5] Add OV5640 parallel interface and RGB565/YUYV support Fabrizio Castro
     [not found]   ` <TY1PR06MB0895C74B45AF75CEB9F7AA4BC0130-/PRLmSCtZ16EeHdvShrxA20DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-01-09  8:48     ` Hugues FRUCHET
     [not found]       ` <a02789f0-d41c-7dfb-406c-fe29ccc0dc9e-qxv4g6HH51o@public.gmane.org>
2018-01-09 11:50         ` Fabrizio Castro

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=1514973452-10464-2-git-send-email-hugues.fruchet@st.com \
    --to=hugues.fruchet-qxv4g6hh51o@public.gmane.org \
    --cc=benjamin.gaignard-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org \
    --cc=linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=mchehab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sakari.ailus-X3B1VOXEql0@public.gmane.org \
    --cc=slongerbeam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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;
as well as URLs for NNTP newsgroup(s).