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]
Date:   Fri, 5 Nov 2021 16:01:51 +0100
From:   Andreas Kemnade <andreas@...nade.info>
To:     Alistair Francis <alistair@...stair23.me>
Cc:     linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        mylene.josserand@...e-electrons.com, linus.walleij@...aro.org,
        rydberg@...math.org, dmitry.torokhov@...il.com, robh+dt@...nel.org,
        alistair23@...il.com,
        Mylène Josserand <mylene.josserand@...tlin.com>,
        Maxime Ripard <maxime.ripard@...tlin.com>
Subject: Re: [PATCH v2 1/4] Input: Add driver for Cypress Generation 5
 touchscreen

On Wed,  3 Nov 2021 21:48:27 +1000
Alistair Francis <alistair@...stair23.me> wrote:

[...]
> +static int cyttsp5_probe(struct device *dev, struct regmap *regmap, int irq,
> +			 const char *name)
> +{
> +	struct cyttsp5 *ts;
> +	struct cyttsp5_sysinfo *si;
> +	int rc = 0, i;
> +
> +	ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
> +	if (!ts)
> +		return -ENOMEM;
> +
> +	/* Initialize device info */
> +	ts->regmap = regmap;
> +	ts->dev = dev;
> +	si = &ts->sysinfo;
> +	dev_set_drvdata(dev, ts);
> +
> +	/* Initialize mutexes and spinlocks */
> +	mutex_init(&ts->system_lock);
> +
> +	/* Initialize wait queue */
> +	init_waitqueue_head(&ts->wait_q);
> +
> +	/* Power up the device */
> +	ts->vdd = regulator_get(dev, "vdd");
> +	if (IS_ERR(ts->vdd)) {
> +		rc = PTR_ERR(ts->vdd);
> +		dev_set_drvdata(dev, NULL);
> +		kfree(ts);
> +		return rc;
> +	}
> +
> +	rc = regulator_enable(ts->vdd);
> +	if (rc) {
> +		regulator_put(ts->vdd);
> +		dev_set_drvdata(dev, NULL);
> +		kfree(ts);
> +		return rc;
> +	}
> +
> +	/* Reset the gpio to be in a reset state */
> +	ts->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);

        so we deassert reset for

> +	if (IS_ERR(ts->reset_gpio)) {
> +		rc = PTR_ERR(ts->reset_gpio);	
> +		dev_err(dev, "Failed to request reset gpio, error %d\n", rc);
> +		return rc;
> +	}
	
	almost no time 
> +	gpiod_set_value(ts->reset_gpio, 1);

        and then assert it, keeping the chip in reset
> +
> +	/* Need a delay to have device up */
> +	msleep(20);
> +
	and why it should wake up?

	I reversed the logic here to test. I have 

        reset-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;

	in my tests.

> +	rc = devm_request_threaded_irq(dev, irq, NULL, cyttsp5_handle_irq,
> +				       IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
> +				       name, ts);
        falling or level low (according to the example in the
        dt schema)?	

Regards,
Andreas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ