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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fd332d80-b237-08be-e6d1-903364bd5ceb@postmarketos.org>
Date:   Sat, 8 Oct 2022 03:28:14 +0300
From:   Alexey Minnekhanov <alexeymin@...tmarketos.org>
To:     Nia Espera <a5b6@...eup.net>,
        Thierry Reding <thierry.reding@...il.com>,
        Sam Ravnborg <sam@...nborg.org>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>, linux-kernel@...r.kernel.org,
        dri-devel@...ts.freedesktop.org
Cc:     ~postmarketos/upstreaming@...ts.sr.ht,
        linux-arm-msm@...r.kernel.org, phone-devel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] drivers: gpu: drm: add driver for samsung
 s6e3fc2x01 cmd mode panel

Hi,

On 07.10.2022 14:14, Nia Espera wrote:

> +
> +#define dsi_dcs_write_seq(dsi, seq...) do {				\
> +		static const u8 d[] = { seq };				\
> +		int ret;						\
> +		ret = mipi_dsi_dcs_write_buffer(dsi, d, ARRAY_SIZE(d));	\
> +		if (ret < 0)						\
> +			return ret;					\
> +	} while (0)
> +

There is now a standard macro for this - mipi_dsi_dcs_write_seq() [1] , 
so you don't need to reinvent it.

> +static void samsung_s6e3fc2x01_reset(struct samsung_s6e3fc2x01 *ctx)
> +{
> +	gpiod_set_value_cansleep(ctx->reset_gpio, 0);
> +	usleep_range(5000, 6000);
> +	gpiod_set_value_cansleep(ctx->reset_gpio, 1);
> +	usleep_range(2000, 3000);
> +	gpiod_set_value_cansleep(ctx->reset_gpio, 0);
> +	usleep_range(10000, 11000);
> +}

There is a high chance that first gpiod_set_value() is not needed, only 
the last 2.

[1] https://elixir.bootlin.com/linux/latest/C/ident/mipi_dsi_dcs_write_seq

-- 
Regards
Alexey Minnekhanov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ