From patchwork Fri Jun 12 07:47:28 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: 6595531 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DB061C0020 for ; Fri, 12 Jun 2015 07:47:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DE56720646 for ; Fri, 12 Jun 2015 07:47:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 00913205EF for ; Fri, 12 Jun 2015 07:47:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752092AbbFLHrj (ORCPT ); Fri, 12 Jun 2015 03:47:39 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:53362 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751163AbbFLHrj (ORCPT ); Fri, 12 Jun 2015 03:47:39 -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 1Z3Jgd-0001Si-Bf; Fri, 12 Jun 2015 09:47:35 +0200 Received: from ukl by dude.hi.pengutronix.de with local (Exim 4.85) (envelope-from ) id 1Z3Jga-00085c-G5; Fri, 12 Jun 2015 09:47:32 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Pavel Machek , Sakari Ailus , Mauro Carvalho Chehab Cc: kernel@pengutronix.de, Alexandre Courbot , Linus Walleij , linux-media@vger.kernel.org Subject: [PATCH] media: i2c/adp1653: set enable gpio to output Date: Fri, 12 Jun 2015 09:47:28 +0200 Message-Id: <1434095248-31057-1-git-send-email-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.1.4 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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 Without setting the direction of a gpio to output a call to gpiod_set_value doesn't have a defined outcome. Furthermore this is one caller less that stops us making the flags argument to gpiod_get*() mandatory. Signed-off-by: Uwe Kleine-König Acked-by: Sakari Ailus Acked-by: Pavel Machek --- Hello, this patch applies to next and is only necessary on top of 074c57a25fa2 ([media] media: i2c/adp1653: Devicetree support for adp1653). Note I plan to make the flags parameter mandatory for 4.3. So unless this change gets into 4.2, would it be ok to let it go in via the gpio tree? Best regards Uwe drivers/media/i2c/adp1653.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/adp1653.c b/drivers/media/i2c/adp1653.c index c70ababce954..5dd39775d6ca 100644 --- a/drivers/media/i2c/adp1653.c +++ b/drivers/media/i2c/adp1653.c @@ -465,7 +465,7 @@ static int adp1653_of_init(struct i2c_client *client, of_node_put(child); - pd->enable_gpio = devm_gpiod_get(&client->dev, "enable"); + pd->enable_gpio = devm_gpiod_get(&client->dev, "enable", GPIOD_OUT_LOW); if (!pd->enable_gpio) { dev_err(&client->dev, "Error getting GPIO\n"); return -EINVAL;