Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2993629pxb; Fri, 5 Nov 2021 08:04:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJDE1kzgYgEHC/U/MwK44N4AO+piUTahAOVVMraW/aVLxNrehLqNQwrnHajWgZ2XTwDgU/ X-Received: by 2002:a6b:6f0d:: with SMTP id k13mr13125947ioc.49.1636124664264; Fri, 05 Nov 2021 08:04:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636124664; cv=none; d=google.com; s=arc-20160816; b=b2TBAePJ7iNLYRAxJpze8Tqfme6yG+9XTk8nF1OOj10VRsN8596RaHp84+Ent4TkTB xDlgXF6Y2BWMJAgi+X6Ey1Z8wQAalp+tev46hRh9cWUiu0vfoXhRUaUqyzSDWxTyKZFP 9CtuOCVk4rSvYs19+z1gRo05iFyKZJhp0dTKnmDVXyziPyMIC5srClCp0wGlp6X2f7KN sIWYDyYsWyf8lOAvUNEhtUsjhW+6x86B7ZS5T+yp4eysnFyDJaXo1UJLwvh1tlErOKbl D1TlJkH8ygh5oRKjnkOUvQW72/0Kuc+8GX2rwZ9dRvao0NjFLHfPjFS6prm7bs+apyyI 0ESA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=HEBvWRg9S4l41qj5CuJ9xd8WUMjF45Gsh7boop/TI/8=; b=gqci4I25YKbvLY1/3iiHt+/8Cc/V1Ovd/qbt2Fovs1KsjLN+3uWLlxvYEmlOEZXk0C n4sf/irn2AiUQJoqb0Uuto3i7n40+6Yjc+zD4cO97IKkq5o6+il+MibxCQ19L34MTgXa 1YXVz5JjOoWTvxas74++aOnS0lyvXJp/jmqkb8dYKuIF4w6rfpxdqbMH37DWGwzJKusJ fZKApC0G85hpPDYkafOcohkRf2IVYRIWenuNLXCQMpkZKkJVb7pMczikpBGrw1PbbPW6 W/msC/1L/KZxvvBmcJu4DJyCVCCOfdAu5qD50Tek8KAtyvHH+r8RyL4xK2KXB58Jqg7s 0O1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=exjT7KNv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z3si4847115jak.62.2021.11.05.08.04.00; Fri, 05 Nov 2021 08:04:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=exjT7KNv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233384AbhKEPEh (ORCPT + 99 others); Fri, 5 Nov 2021 11:04:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233378AbhKEPEg (ORCPT ); Fri, 5 Nov 2021 11:04:36 -0400 Received: from mail.andi.de1.cc (mail.andi.de1.cc [IPv6:2a01:238:4321:8900:456f:ecd6:43e:202c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E59ECC061714; Fri, 5 Nov 2021 08:01:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20180802; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=HEBvWRg9S4l41qj5CuJ9xd8WUMjF45Gsh7boop/TI/8=; b=exjT7KNvOAVNQofMTz4xN+rh/+ rghIpP6ikdGyFT05k2paeUz32XPxNsFZP5Um9+H1tYYr8q6EeyW+i9y/gHZuursjvbc9L5qFvwj/4 dCTgxw8CD9KnvLvp0IUf5mCj+sAcNNGFtzOjYZrRzK8QLagQCyrl7DwGKNAI272patCA=; Received: from p200300ccff0899001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff08:9900:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1mj0j2-0004v0-Kt; Fri, 05 Nov 2021 16:01:52 +0100 Date: Fri, 5 Nov 2021 16:01:51 +0100 From: Andreas Kemnade To: Alistair Francis Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, mylene.josserand@free-electrons.com, linus.walleij@linaro.org, rydberg@bitmath.org, dmitry.torokhov@gmail.com, robh+dt@kernel.org, alistair23@gmail.com, =?UTF-8?B?TXlsw6huZQ==?= Josserand , Maxime Ripard Subject: Re: [PATCH v2 1/4] Input: Add driver for Cypress Generation 5 touchscreen Message-ID: <20211105160151.4d97d587@aktux> In-Reply-To: <20211103114830.62711-2-alistair@alistair23.me> References: <20211103114830.62711-1-alistair@alistair23.me> <20211103114830.62711-2-alistair@alistair23.me> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 (-) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 3 Nov 2021 21:48:27 +1000 Alistair Francis 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