Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751219AbeACQlY (ORCPT + 1 other); Wed, 3 Jan 2018 11:41:24 -0500 Received: from mail-oi0-f52.google.com ([209.85.218.52]:36037 "EHLO mail-oi0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751097AbeACQlV (ORCPT ); Wed, 3 Jan 2018 11:41:21 -0500 X-Google-Smtp-Source: ACJfBot9LBGsGNpFAYxw53NA+jaSHfgiQ/Dib5y8ubvNQbjfzjnKtnowNDIjcKnIWgIlagMVZxgXcGg3YtfTjmYEVGQ= MIME-Version: 1.0 In-Reply-To: <1514469681-15602-10-git-send-email-jacopo+renesas@jmondi.org> References: <1514469681-15602-1-git-send-email-jacopo+renesas@jmondi.org> <1514469681-15602-10-git-send-email-jacopo+renesas@jmondi.org> From: Fabio Estevam Date: Wed, 3 Jan 2018 14:41:20 -0200 Message-ID: Subject: Re: [PATCH v2 9/9] media: i2c: tw9910: Remove soc_camera dependencies To: Jacopo Mondi Cc: Laurent Pinchart , Magnus Damm , geert@glider.be, Mauro Carvalho Chehab , Hans Verkuil , Rob Herring , Mark Rutland , linux-renesas-soc@vger.kernel.org, linux-media , linux-sh@vger.kernel.org, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi Jacopo, On Thu, Dec 28, 2017 at 12:01 PM, Jacopo Mondi wrote: > + if (priv->rstb_gpio) { > + gpiod_set_value(priv->rstb_gpio, 0); > + usleep_range(500, 1000); > + gpiod_set_value(priv->rstb_gpio, 1); > + usleep_range(500, 1000); This seems to be inverted. Consider you have an active low GPIO reset. In order to reset it: Put the GPIO to logic level 0 Wait some time Put the GPIO to logic level 1 gpiod_set_value(priv->rstb_gpio, 1), means the GPIO in the active state (0 in this example). , so this should be: gpiod_set_value(priv->rstb_gpio, 1); usleep_range(500, 1000); gpiod_set_value(priv->rstb_gpio, 0);