Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2525340ybi; Thu, 18 Jul 2019 09:43:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHq7yYTmsEffUG1eT7uzHVTnIJpfNn4ZHebk8KCIlqXtwER9I+rUGyffVe4S3uVxd6Sc8X X-Received: by 2002:a65:6850:: with SMTP id q16mr11126932pgt.423.1563468225988; Thu, 18 Jul 2019 09:43:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563468225; cv=none; d=google.com; s=arc-20160816; b=jmlG4K+o++5KJvDR+0EEkTWH5w/54/XM9OUwUb1iUz7nrDMu33ZxDeWNafmvVFCyHg z0NNhxB0+uNQDYtZaGodDdIXQ8d4ASF0+K0o2m/1JDOBFitLU+iIZGxE78FMJ1ezDCt9 +lUFmQMMXYlzxpa117bYA2uSO3aon3O3o2XrTqQ/SX7Pj57O8mXxQMS8GCkeHN/r1M8I 5vZMgaP9zD29/09ExP+K+8XYTNBHNPpBLqKQcf2tYOtfHWeMh2RImAAyb0cxelh5LcAM TsjZlicdZ9YijLzDErHR9unKyl0mIQ4acaeWRaSDBgp3hpw8Urx4im9q4HIsNa+U9AyT FMUw== 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=UXfMOUI1MeI+NgXsmt+EToaLeHsjua6jc1r3BJx57ok=; b=B7xmYnx+C+f16GmHLSMphrR0JRj7OMUX4dboVU/BhXgwInk7Cb8dlZOSbe1IqoLztF t/ubJ80f+4fbimoO+haKXzlWaPXNSygAoauuX/ZXVNmnWpV32ATEcA9iqU+84n1CoCiY +/4JJ9Aj9sJZzi7bCX4r47eIfaq/RVWOV3QF7RRqgFyqujtKdV0+qkMoVGRGhULzMS+Q cfXlXtBofzxFfil7Mj1Y2U+w1UiS4ZNtMsiPt7pd8fUblEGdQ8aV5kxPAA7j+Q8qsszR cTI+73VGEd2sTks+XlYyZw4TjLIYdmTGh3siLsv7rQCIDzo+FSeZ+JgwK+fZ8POKI3pn 7Ymw== 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 32si25367860plb.86.2019.07.18.09.43.29; Thu, 18 Jul 2019 09:43:45 -0700 (PDT) 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 S2390695AbfGRQmK (ORCPT + 99 others); Thu, 18 Jul 2019 12:42:10 -0400 Received: from verein.lst.de ([213.95.11.211]:60829 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728014AbfGRQmK (ORCPT ); Thu, 18 Jul 2019 12:42:10 -0400 Received: by verein.lst.de (Postfix, from userid 2005) id 414D6227A81; Thu, 18 Jul 2019 18:42:07 +0200 (CEST) Date: Thu, 18 Jul 2019 18:42:07 +0200 From: Torsten Duwe To: Andrzej Hajda Cc: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Rutland , Thierry Reding , David Airlie , Daniel Vetter , Laurent Pinchart , Icenowy Zheng , Sean Paul , Vasily Khoruzhick , Harald Geyer , Greg Kroah-Hartman , Thomas Gleixner , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 5/7] drm/bridge: Add Analogix anx6345 support Message-ID: <20190718164207.GA29501@lst.de> References: <20190604122150.29D6468B05@newverein.lst.de> <20190604122302.006A168C7B@newverein.lst.de> <610ab353-7e05-81b6-2cc4-2dac09823d42@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <610ab353-7e05-81b6-2cc4-2dac09823d42@samsung.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 On Wed, Jun 12, 2019 at 11:13:10AM +0200, Andrzej Hajda wrote: > On 04.06.2019 14:23, Torsten Duwe wrote: > > + > > +static void anx6345_poweron(struct anx6345 *anx6345) > > +{ > > + int err; > > + > > + /* Ensure reset is asserted before starting power on sequence */ > > + gpiod_set_value_cansleep(anx6345->gpiod_reset, 1); > > With fixed devm_gpiod_get below this line can be removed. In any case, reset must be asserted for this procedure to succeed... > > +static enum drm_mode_status > > +anx6345_bridge_mode_valid(struct drm_bridge *bridge, > > + const struct drm_display_mode *mode) > > +{ > > + if (mode->flags & DRM_MODE_FLAG_INTERLACE) > > + return MODE_NO_INTERLACE; > > + > > + /* Max 1200p at 5.4 Ghz, one lane */ > > + if (mode->clock > 154000) > > + return MODE_CLOCK_HIGH; > > I wonder if you shouldn't take into account training results here, ie. > training perfrormed before validation. Sure, but this is verbatim from the anx78xx.c sibling, code provided by analogix. Lacking in-depth datasheets, this is probably the best effort. > > + > > + /* 2.5V digital core power regulator */ > > + anx6345->dvdd25 = devm_regulator_get(dev, "dvdd25-supply"); > > + if (IS_ERR(anx6345->dvdd25)) { > > + DRM_ERROR("dvdd25-supply not found\n"); > > + return PTR_ERR(anx6345->dvdd25); > > + } > > + > > + /* GPIO for chip reset */ > > + anx6345->gpiod_reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); > > Shouldn't be set to GPIOD_OUT_HIGH? It used to be in the original submission, and confused even more people ;-) Fact is, the reset for this chip _is_ low active; I'm following Documentation/devicetree/bindings/gpio/gpio.txt, "1.1) GPIO specifier best practices", which I find rather comprehensive. Any suggestions on how to phrase this even better are appreciated. > > +}; > > +module_i2c_driver(anx6345_driver); > > + > > +MODULE_DESCRIPTION("ANX6345 eDP Transmitter driver"); > > +MODULE_AUTHOR("Enric Balletbo i Serra "); > > Submitter, patch author, and module author are different, this can be > correct, but maybe somebody forgot to update some of these fields. As mentioned in the v2 cover letter, I had a closer look on which code got actually introduced and which lines were simply copied around, and made the copyright and authorship stick to where they belong. *I* believe this is correct now; specific improvements welcome. Torsten