From patchwork Tue Aug 18 08:31:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 7029401 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8DB009F373 for ; Tue, 18 Aug 2015 08:32:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B5199205D1 for ; Tue, 18 Aug 2015 08:32:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D391D205DA for ; Tue, 18 Aug 2015 08:32:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752211AbbHRIbZ (ORCPT ); Tue, 18 Aug 2015 04:31:25 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:39573 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751936AbbHRIbW (ORCPT ); Tue, 18 Aug 2015 04:31:22 -0400 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1ZRcIe-0006AT-Qj; Tue, 18 Aug 2015 10:31:16 +0200 Received: from ukl by dude.hi.pengutronix.de with local (Exim 4.86) (envelope-from ) id 1ZRcIc-0003DT-G3; Tue, 18 Aug 2015 10:31:14 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Philipp Zabel Cc: Hans Verkuil , Mauro Carvalho Chehab , kernel@pengutronix.de, Mats Randgaard , linux-media@vger.kernel.org Subject: [PATCH 1/2] [media] tc358743: set direction of reset gpio using devm_gpiod_get Date: Tue, 18 Aug 2015 10:31:09 +0200 Message-Id: <1439886670-12322-1-git-send-email-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.4.6 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-media@vger.kernel.org Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 256148246852 ("[media] tc358743: support probe from device tree") failed to explicitly set the direction of the reset gpio. Use the optional flag of devm_gpiod_get to make up leeway. This is also necessary because the flag parameter will become mandatory soon. Signed-off-by: Uwe Kleine-König Reviewed-by: Linus Walleij Acked-by: Philipp Zabel --- drivers/media/i2c/tc358743.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c index 76d0aaa19493..6ca6c0817993 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c @@ -1648,7 +1648,6 @@ static const struct v4l2_ctrl_config tc358743_ctrl_audio_present = { #ifdef CONFIG_OF static void tc358743_gpio_reset(struct tc358743_state *state) { - gpiod_set_value(state->reset_gpio, 0); usleep_range(5000, 10000); gpiod_set_value(state->reset_gpio, 1); usleep_range(1000, 2000); @@ -1750,7 +1749,7 @@ static int tc358743_probe_of(struct tc358743_state *state) state->pdata.ths_trailcnt = 0x2; state->pdata.hstxvregcnt = 0; - state->reset_gpio = devm_gpiod_get(dev, "reset"); + state->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(state->reset_gpio)) { dev_err(dev, "failed to get reset gpio\n"); ret = PTR_ERR(state->reset_gpio);