From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 773E8C7618F for ; Thu, 18 Jul 2019 16:42:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5593421849 for ; Thu, 18 Jul 2019 16:42:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390758AbfGRQmL (ORCPT ); Thu, 18 Jul 2019 12:42:11 -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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 324D2C76195 for ; Thu, 18 Jul 2019 16:42:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0886621849 for ; Thu, 18 Jul 2019 16:42:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QU9mrRzk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0886621849 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WFiGesxpUTJiPDawk/BcEz+pI5Q8zvB5uQhWpHEZ+Mo=; b=QU9mrRzkvliuXL hCSJ16MkSrZwY2sdXjEUXP+u40rYX42MeNsKMj1sU9SUjCnfDK0GNOzGHM2LH08QlHb/kl4VsWHA+ d3/QGO92YLg636FUrakpKQOqrTD67mF98YFa5aVItWofPGcNqhLogoHg2dXkFRNLmgP6WxTBfaxub fUVEJksUPKv7eGq+EAMg3jyB5bUqbEuKMLk6XzGFWWfjVe26CY/6x9UGjfaRFdoa42hedAT1x9Kk8 3kvcj+2lHIRoVkP6StREy4FvaKfbXrJcg8FxCnSgtH/D4n/Fujpo2aNDZrF/iNNZ21qZZGWXYPQdW sQoz5V4FuaAFQuc8rwYQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1ho9U1-0006ds-RS; Thu, 18 Jul 2019 16:42:17 +0000 Received: from verein.lst.de ([213.95.11.211]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1ho9Ty-0006cL-1t for linux-arm-kernel@lists.infradead.org; Thu, 18 Jul 2019 16:42:15 +0000 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 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-Disposition: inline In-Reply-To: <610ab353-7e05-81b6-2cc4-2dac09823d42@samsung.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190718_094214_251883_4BE3E01A X-CRM114-Status: GOOD ( 15.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Maxime Ripard , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , Chen-Yu Tsai , Rob Herring , Thierry Reding , Laurent Pinchart , Daniel Vetter , Harald Geyer , Sean Paul , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Icenowy Zheng Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel