lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20190205131902.GA7432@lst.de>
Date:   Tue, 5 Feb 2019 14:19:02 +0100
From:   Torsten Duwe <duwe@....de>
To:     Vasily Khoruzhick <anarsoul@...il.com>
Cc:     Icenowy Zheng <icenowy@...c.io>,
        devicetree <devicetree@...r.kernel.org>,
        Archit Taneja <architt@...eaurora.org>,
        Andrzej Hajda <a.hajda@...sung.com>,
        David Airlie <airlied@...ux.ie>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        Maxime Ripard <maxime.ripard@...tlin.com>,
        Chen-Yu Tsai <wens@...e.org>, Rob Herring <robh+dt@...nel.org>,
        Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
        Daniel Vetter <daniel@...ll.ch>,
        Mark Rutland <mark.rutland@....com>,
        Thierry Reding <thierry.reding@...il.com>,
        Sean Paul <seanpaul@...omium.org>,
        arm-linux <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH RESEND v2 05/12] drm/bridge: Add Analogix anx6345
 support

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ