All of lore.kernel.org
 help / color / mirror / Atom feed
From: Torsten Duwe <duwe@lst.de>
To: Andrzej Hajda <a.hajda@samsung.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	David Airlie <airlied@linux.ie>, Chen-Yu Tsai <wens@csie.org>,
	Rob Herring <robh+dt@kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Daniel Vetter <daniel@ffwll.ch>, Harald Geyer <harald@ccbib.org>,
	Sean Paul <seanpaul@chromium.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	Icenowy Zheng <icenowy@aosc.io>
Subject: Re: [PATCH v2 5/7] drm/bridge: Add Analogix anx6345 support
Date: Thu, 18 Jul 2019 18:42:07 +0200	[thread overview]
Message-ID: <20190718164207.GA29501@lst.de> (raw)
In-Reply-To: <610ab353-7e05-81b6-2cc4-2dac09823d42@samsung.com>

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 <enric.balletbo@collabora.com>");
> 
> 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

WARNING: multiple messages have this Message-ID (diff)
From: Torsten Duwe <duwe@lst.de>
To: Andrzej Hajda <a.hajda@samsung.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>,
	Chen-Yu Tsai <wens@csie.org>, Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Icenowy Zheng <icenowy@aosc.io>,
	Sean Paul <seanpaul@chromium.org>,
	Vasily Khoruzhick <anarsoul@gmail.com>,
	Harald Geyer <harald@ccbib.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	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
Date: Thu, 18 Jul 2019 18:42:07 +0200	[thread overview]
Message-ID: <20190718164207.GA29501@lst.de> (raw)
In-Reply-To: <610ab353-7e05-81b6-2cc4-2dac09823d42@samsung.com>

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 <enric.balletbo@collabora.com>");
> 
> 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

  reply	other threads:[~2019-07-18 16:42 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 12:21 [PATCH v2 0/7] Add anx6345 DP/eDP bridge for Olimex Teres-I Torsten Duwe
2019-06-04 12:21 ` Torsten Duwe
2019-06-04 12:22 ` [PATCH v2 1/7] drm/bridge: move ANA78xx driver to analogix subdirectory Torsten Duwe
2019-06-04 12:22   ` Torsten Duwe
2019-06-12 10:16   ` Andrzej Hajda
2019-06-12 10:16     ` Andrzej Hajda
2019-06-04 12:22 ` [PATCH v2 2/7] drm/bridge: split some definitions of ANX78xx to dedicated headers Torsten Duwe
2019-06-04 12:22   ` Torsten Duwe
2019-06-12  7:40   ` Andrzej Hajda
2019-06-12  7:40     ` Andrzej Hajda
2019-06-12  7:40     ` Andrzej Hajda
2019-06-04 12:22 ` [PATCH v2 3/7] drm/bridge: extract some Analogix I2C DP common code Torsten Duwe
2019-06-04 12:22   ` Torsten Duwe
2019-06-12  7:41   ` Andrzej Hajda
2019-06-12  7:41     ` Andrzej Hajda
2019-06-04 12:22 ` [PATCH v2 4/7] drm/bridge: Prepare Analogix anx6345 support Torsten Duwe
2019-06-04 12:22   ` Torsten Duwe
2019-06-12  7:43   ` Andrzej Hajda
2019-06-12  7:43     ` Andrzej Hajda
2019-06-04 12:23 ` [PATCH v2 5/7] drm/bridge: Add " Torsten Duwe
2019-06-04 12:23   ` Torsten Duwe
2019-06-12  9:13   ` Andrzej Hajda
2019-06-12  9:13     ` Andrzej Hajda
2019-07-18 16:42     ` Torsten Duwe [this message]
2019-07-18 16:42       ` Torsten Duwe
2019-06-04 12:23 ` [PATCH v2 6/7] dt-bindings: Add ANX6345 DP/eDP transmitter binding Torsten Duwe
2019-06-04 12:23   ` Torsten Duwe
2019-06-12  8:16   ` Andrzej Hajda
2019-06-12  8:16     ` Andrzej Hajda
2019-06-12 14:59     ` Torsten Duwe
2019-06-12 14:59       ` Torsten Duwe
2019-06-04 12:23 ` [PATCH v2 7/7] arm64: dts: allwinner: a64: enable ANX6345 bridge on Teres-I Torsten Duwe
2019-06-04 12:23   ` Torsten Duwe
2019-06-04 15:08   ` Vasily Khoruzhick
2019-06-04 15:08     ` Vasily Khoruzhick
2019-06-04 15:08     ` Vasily Khoruzhick
2019-06-05 10:13     ` Torsten Duwe
2019-06-05 10:13       ` Torsten Duwe
2019-06-05 12:02       ` Maxime Ripard
2019-06-05 12:02         ` Maxime Ripard
2019-06-06 13:59         ` Harald Geyer
2019-06-06 13:59           ` Harald Geyer
2019-06-06 13:59           ` Harald Geyer
2019-06-07  6:28           ` Maxime Ripard
2019-06-07  6:28             ` Maxime Ripard
2019-06-07  6:28             ` Maxime Ripard
2019-06-07  9:40             ` Torsten Duwe
2019-06-07  9:40               ` Torsten Duwe
2019-06-12 10:00               ` Andrzej Hajda
2019-06-12 10:00                 ` Andrzej Hajda
2019-06-12 10:00                 ` Andrzej Hajda
2019-06-12 15:20                 ` Maxime Ripard
2019-06-12 15:20                   ` Maxime Ripard
2019-06-12 15:20                   ` Maxime Ripard
2019-06-28 10:39                   ` Andrzej Hajda
2019-06-28 10:39                     ` Andrzej Hajda
2019-07-01  9:58                     ` Maxime Ripard
2019-07-01  9:58                       ` Maxime Ripard
2019-07-01 12:27                       ` Andrzej Hajda
2019-07-01 12:27                         ` Andrzej Hajda
2019-07-02  8:13                         ` Maxime Ripard
2019-07-02  8:13                           ` Maxime Ripard
2019-07-09  0:49                       ` Vasily Khoruzhick
2019-07-09  0:49                         ` Vasily Khoruzhick
2019-07-09  0:49                         ` Vasily Khoruzhick
2019-07-09  8:55                         ` Maxime Ripard
2019-07-09  8:55                           ` Maxime Ripard
2019-07-09  8:55                           ` Maxime Ripard
2019-07-09  8:58                           ` Icenowy Zheng
2019-07-09  8:58                             ` Icenowy Zheng
2019-07-09  8:58                             ` Icenowy Zheng
2019-07-09 14:21                             ` Maxime Ripard
2019-07-09 14:21                               ` Maxime Ripard
2019-07-09 20:30                           ` Vasily Khoruzhick
2019-07-09 20:30                             ` Vasily Khoruzhick
2019-07-09 20:30                             ` Vasily Khoruzhick
2019-07-10 11:40                             ` Maxime Ripard
2019-07-10 11:40                               ` Maxime Ripard
2019-07-10 22:11                               ` Vasily Khoruzhick
2019-07-10 22:11                                 ` Vasily Khoruzhick
2019-07-12 20:15                                 ` Maxime Ripard
2019-07-12 20:15                                   ` Maxime Ripard
2019-07-16  0:28                                   ` Vasily Khoruzhick
2019-07-16  0:28                                     ` Vasily Khoruzhick
2019-07-16  0:28                                     ` Vasily Khoruzhick
2019-07-24 13:58                                     ` Maxime Ripard
2019-07-24 13:58                                       ` Maxime Ripard
2019-06-12 15:34               ` Maxime Ripard
2019-06-12 15:34                 ` Maxime Ripard
2019-06-12 15:34                 ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190718164207.GA29501@lst.de \
    --to=duwe@lst.de \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=harald@ccbib.org \
    --cc=icenowy@aosc.io \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=robh+dt@kernel.org \
    --cc=seanpaul@chromium.org \
    --cc=tglx@linutronix.de \
    --cc=thierry.reding@gmail.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.