From patchwork Mon Apr 16 02:51:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10342067 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E841A601C2 for ; Mon, 16 Apr 2018 02:52:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9DE2223B2 for ; Mon, 16 Apr 2018 02:52:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEB2924B48; Mon, 16 Apr 2018 02:52:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5993C223B2 for ; Mon, 16 Apr 2018 02:52:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752796AbeDPCw3 (ORCPT ); Sun, 15 Apr 2018 22:52:29 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:44194 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752630AbeDPCw1 (ORCPT ); Sun, 15 Apr 2018 22:52:27 -0400 Received: by mail-pg0-f65.google.com with SMTP id l12so507241pgp.11; Sun, 15 Apr 2018 19:52:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=q0B2UU/zkHxc7aYqa6AFBZR13bK1qg/fWhJLRFUsBWM=; b=OvKwFTQGkXIYywN7VhzDEyXKhlorPiY+jbiZS77FemxHXEXEuKLf4x4sD2yAHnUXTR 30mdduyoFnSdd4DMH9heOp2e9lsJHEwgIut3oh+3RUP7t6P14jhJcp/gCbGVifTHBYsS Mzys8zoe8C+oYqMbZM24hQZ5W6tHX08vRy6u9lVtmPsaUBAebPmfURlHndptJ/kGYY4q 87LQ7B/l5I+bEL6Y4N2pudHjQHssLHWYQ/qyj4ILUA+fGSNu56KVjtjcn3WS6O2o5Jxj CanflO6Ku7+rCI7h3DkkvebxWjRQzkXCCCn5bp4B44VEzezQGrJgcyQoVf5LF77qVSMo WE4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=q0B2UU/zkHxc7aYqa6AFBZR13bK1qg/fWhJLRFUsBWM=; b=nA2M6uN2rNhyqSWYhK7oBjQdUvL6qJD6SPAm1EKlXCaK6DU43LNU0YWi0E8gbuXUdJ gqy9EdHpB3pxUSH/QXO662b4TKFcIeMf545Z96fwd7WoFU6abhQPMfI6SSzzpbYSWP9s M0eGjYZqcSIMR9w1cij/u2OxE5pX7I5XpD/ei1GMpol8WAivcq6ZIdlFD4kqx851V+FF M/uU6zKOFouBoYaXFreHcqgO6q7lK2GmoG/GmNAaekJRNH9EvdrtH//3OoVW1BxCrB3P QmInnlO35vLKPMs9a9sY//UkVFK0O0Loxh9bv/hjYesR+nhhR/1xLXJSdoG3tP61i3IH DzGw== X-Gm-Message-State: ALQs6tAX3iCByTxKFafpRJNeRHx8zzElA+kPqPLPBXJ+aKtrEP89Ofjq ekSqOke8t5ym28+TujwMWESPCQ== X-Google-Smtp-Source: AIpwx4+7IuWhvvgzjgMpdTms0Iw0KqonDbRFE+5Zmj9M1GLvdiaLurBLQAPwKq+10BGhSRCxoJzKfg== X-Received: by 10.99.95.78 with SMTP id t75mr11553403pgb.330.1523847147030; Sun, 15 Apr 2018 19:52:27 -0700 (PDT) Received: from localhost.localdomain ([240f:4:c2bc:1:3df1:9c88:51ad:c027]) by smtp.gmail.com with ESMTPSA id e1sm3694274pgt.49.2018.04.15.19.52.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 15 Apr 2018 19:52:26 -0700 (PDT) From: Akinobu Mita To: linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Akinobu Mita , Jacopo Mondi , Laurent Pinchart , Hans Verkuil , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH v2 05/10] media: ov772x: use generic names for reset and powerdown gpios Date: Mon, 16 Apr 2018 11:51:46 +0900 Message-Id: <1523847111-12986-6-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523847111-12986-1-git-send-email-akinobu.mita@gmail.com> References: <1523847111-12986-1-git-send-email-akinobu.mita@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The ov772x driver uses "rstb-gpios" and "pwdn-gpios" for reset and powerdown pins. However, using generic names for thse gpios is preferred. ("reset-gpios" and "powerdown-gpios" respectively) There is only one mainline user for these gpios, so rename to generic names. Cc: Jacopo Mondi Cc: Laurent Pinchart Cc: Hans Verkuil Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita Reviewed-by: Jacopo Mondi --- * v2 - New patch arch/sh/boards/mach-migor/setup.c | 5 +++-- drivers/media/i2c/ov772x.c | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c index 271dfc2..73b9ee4 100644 --- a/arch/sh/boards/mach-migor/setup.c +++ b/arch/sh/boards/mach-migor/setup.c @@ -351,8 +351,9 @@ static struct platform_device migor_ceu_device = { static struct gpiod_lookup_table ov7725_gpios = { .dev_id = "0-0021", .table = { - GPIO_LOOKUP("sh7722_pfc", GPIO_PTT0, "pwdn", GPIO_ACTIVE_HIGH), - GPIO_LOOKUP("sh7722_pfc", GPIO_PTT3, "rstb", GPIO_ACTIVE_LOW), + GPIO_LOOKUP("sh7722_pfc", GPIO_PTT0, "powerdown", + GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("sh7722_pfc", GPIO_PTT3, "reset", GPIO_ACTIVE_LOW), }, }; diff --git a/drivers/media/i2c/ov772x.c b/drivers/media/i2c/ov772x.c index 0ae2a4f..88d1418a 100644 --- a/drivers/media/i2c/ov772x.c +++ b/drivers/media/i2c/ov772x.c @@ -837,10 +837,10 @@ static int ov772x_power_on(struct ov772x_priv *priv) * available to handle this cleanly, request the GPIO temporarily * to avoid conflicts. */ - priv->rstb_gpio = gpiod_get_optional(&client->dev, "rstb", + priv->rstb_gpio = gpiod_get_optional(&client->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(priv->rstb_gpio)) { - dev_info(&client->dev, "Unable to get GPIO \"rstb\""); + dev_info(&client->dev, "Unable to get GPIO \"reset\""); return PTR_ERR(priv->rstb_gpio); } @@ -1309,10 +1309,10 @@ static int ov772x_probe(struct i2c_client *client, goto error_ctrl_free; } - priv->pwdn_gpio = gpiod_get_optional(&client->dev, "pwdn", + priv->pwdn_gpio = gpiod_get_optional(&client->dev, "powerdown", GPIOD_OUT_LOW); if (IS_ERR(priv->pwdn_gpio)) { - dev_info(&client->dev, "Unable to get GPIO \"pwdn\""); + dev_info(&client->dev, "Unable to get GPIO \"powerdown\""); ret = PTR_ERR(priv->pwdn_gpio); goto error_clk_put; }