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] [thread-next>] [day] [month] [year] [list]
Message-ID: <2115487.irdbgypaU6@phil>
Date:   Wed, 14 Sep 2022 17:04:14 +0200
From:   Heiko Stuebner <heiko@...ech.de>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] Input: auo-pixcir-ts - switch to using gpiod API

Am Mittwoch, 14. September 2022, 16:14:25 CEST schrieb Dmitry Torokhov:
> This switches the driver to gpiod API and drops uses of of_get_gpio() API.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
> ---
>  drivers/input/touchscreen/auo-pixcir-ts.c | 47 ++++++++++-------------
>  1 file changed, 20 insertions(+), 27 deletions(-)

[...]

> @@ -578,23 +566,28 @@ static int auo_pixcir_probe(struct i2c_client *client,
>  
>  	input_set_drvdata(ts->input, ts);
>  
> -	error = devm_gpio_request_one(&client->dev, ts->gpio_int,
> -				      GPIOF_DIR_IN, "auo_pixcir_ts_int");
> +	ts->gpio_int = devm_gpiod_get_index(&client->dev, NULL, 0, GPIOD_IN);
> +	error = PTR_ERR_OR_ZERO(ts->gpio_int);
>  	if (error) {
> -		dev_err(&client->dev, "request of gpio %d failed, %d\n",
> -			ts->gpio_int, error);
> +		dev_err(&client->dev,
> +			"request of int gpio failed: %d\n", error);
>  		return error;
>  	}
>  
> -	error = devm_gpio_request_one(&client->dev, ts->gpio_rst,
> -				      GPIOF_DIR_OUT | GPIOF_INIT_HIGH,
> -				      "auo_pixcir_ts_rst");
> +	gpiod_set_consumer_name(ts->gpio_int, "auo_pixcir_ts_int");
> +
> +	/* Take the chip out of reset */
> +	ts->gpio_rst = devm_gpiod_get_index(&client->dev, NULL, 1,
> +					    GPIOD_OUT_LOW);

hmm, is this really equivalent? It looks like above we're startig
with GPIOF_INIT_HIGH, while here it is LOW?

Looking at the old datasheet, yes gpio-high is the setting to
put the device into the usable state.

Interestingly there is no regulator support in the driver, the datahsheet
specifies 0.5ms for rst-low to rst-high after vdd_tp is turned on.

Heiko

Heiko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ