Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp5047085ima; Tue, 5 Feb 2019 05:39:05 -0800 (PST) X-Google-Smtp-Source: AHgI3IZESypYx48i1LiY7nNKIz4bRpsH0hMAP8sdiKrj0SQ0PCpxIDHppgLcTuun/jkqeX0GRwAF X-Received: by 2002:a63:571f:: with SMTP id l31mr1835363pgb.91.1549373945539; Tue, 05 Feb 2019 05:39:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549373945; cv=none; d=google.com; s=arc-20160816; b=OyhsZkJ5y/Mm6BRP7d5ctvl7yPVBvephTBL64C8DxQsDP1XYrJ+CyOGkST4OWe36Aq j3h2Fi4Z77XCGg4MTfSfxZ6EqnYv9Fk3o0XGFoqYD2KhvxfuECeGpeW+sGiC9BxTGKp7 szeoAoArjJKu7+r5mzeSTmZnQhgzSrESz4yGaOZg77dhlG+tiA17o1AOBxu/3iTw9Bus ZK0KD4fQv+iorp73ezsCr3/xPVSo/RTWWbhdeDdkzW0rHmxCN6B0WCGLJoTiorM4NURt 5aSLYNG9xBq7LkfCSs2sA0B9uw7z1MuMzGyLbiSven1hhQD1YTvzb9dGlkNgXGjQM//u AwqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=8QCSrNhbeTBnXxb109O/95K9S6mQPqFTxdolO0R5EkM=; b=KYhyXyCLWBZfitm1CmOLFjLz4Kdo2vfz/q6nMIhNr6ip7ZOHEIk5t3Gp/n+dQNIp2i 0DaYfvXsF/bK1jC8kXS7ZNh6oYcbvvb46EHj2fubxWmyjeA+l9WfK4kfnuOU5pPzunKH rr7CsKtjtWUR3pBlcWI63UdcTX+ijWy1AJmnIIWqI9G07zFCs32RKmfk25qRNzLwGYiR nTva+Rdtn4n8wvhGqL3Pk4S1cC4mZSbOOPQSU4SFjd/1cGBba3wuMhqrOo/SUfy+gGnu maCIAvk64q1kDITRcURb+XiHJdL0e3JlECjZu0IWqBUd1FnLL/TNX+bcA3SYim7ENRzx lLzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i129si3455864pfb.32.2019.02.05.05.38.50; Tue, 05 Feb 2019 05:39:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729443AbfBENTF (ORCPT + 99 others); Tue, 5 Feb 2019 08:19:05 -0500 Received: from verein.lst.de ([213.95.11.211]:54212 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729424AbfBENTF (ORCPT ); Tue, 5 Feb 2019 08:19:05 -0500 Received: by newverein.lst.de (Postfix, from userid 2005) id CE54468D93; Tue, 5 Feb 2019 14:19:02 +0100 (CET) Date: Tue, 5 Feb 2019 14:19:02 +0100 From: Torsten Duwe To: Vasily Khoruzhick Cc: Icenowy Zheng , devicetree , Archit Taneja , Andrzej Hajda , David Airlie , linux-kernel , dri-devel , Maxime Ripard , Chen-Yu Tsai , Rob Herring , Laurent Pinchart , Daniel Vetter , Mark Rutland , Thierry Reding , Sean Paul , arm-linux Subject: Re: [PATCH RESEND v2 05/12] drm/bridge: Add Analogix anx6345 support Message-ID: <20190205131902.GA7432@lst.de> References: <20181018073327.64942-1-icenowy@aosc.io> <20190204122250.GB7660@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190203185501.8958-6-anarsoul@gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org First thing that struck me is that the chip's reset is actually low active reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */ ^^^^ (please correct this in patches 11 and 12) Consequently, you're using inverted values here in the driver: > +static void anx6345_poweron(struct anx6345 *anx6345) > +{ [...] > + gpiod_set_value_cansleep(pdata->gpiod_reset, 0); 0 = reset on, ok. > + usleep_range(1000, 2000); > + > + gpiod_set_value_cansleep(pdata->gpiod_reset, 1); 1 = reset off, also fine. > + > + /* Power on registers module */ > + anx6345_set_bits(anx6345->map[I2C_IDX_TXCOM], SP_POWERDOWN_CTRL_REG, > + SP_HDCP_PD | SP_AUDIO_PD | SP_VIDEO_PD | SP_LINK_PD); > + anx6345_clear_bits(anx6345->map[I2C_IDX_TXCOM], SP_POWERDOWN_CTRL_REG, > + SP_REGISTER_PD | SP_TOTAL_PD); > + > + anx6345->powered = true; > +} > + > +static void anx6345_poweroff(struct anx6345 *anx6345) > +{ > + struct anx6345_platform_data *pdata = &anx6345->pdata; > + int err; > + > + if (WARN_ON(!anx6345->powered)) > + return; > + > + gpiod_set_value_cansleep(pdata->gpiod_reset, 1); > + usleep_range(1000, 2000); This one got me a bit confused. Assert or deassert reset (again) before poweroff? Please stick to the logical value of the reset line. Torsten