From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 23D6AC77B7D for ; Fri, 5 May 2023 18:09:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sbwmpHAtkUng7e7AouZEsFtK/lTY5MNNS3yF5WA9NFo=; b=gfCPFP5br90Edf ux2IsWeIMEBvPQsKsJtYOpE+plhqW8oU4EEvddGDrLLLfRsGCFwNoc3haXZ/eYvUyjXCtpdpuwQYz 7V78EjbzZ+lywpjEASSU3mmC2UfOkTeNjIuI4j7rfW4mXLyY+R6Q/a9pn2umpFGSQ+pN/Lp4hGRg/ Qp4Apr7Xiotj19MbJ5YaKvAqjtLmGdEsVhYqs1+J8ElN5RyOK6QEOR8wjvyEmie2CE/QbQWjnEl3n QyrYVO5GntIbmP6LFjQNga2fLylf3QUGeEYubzlMurwUCMlJ6oaUL0Cidb1Cru8O0cghYYalEU511 B7j1ewcZGxlGHx8zVkIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1puzrc-00BUtF-1U; Fri, 05 May 2023 18:09:04 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1puzrZ-00BUrM-0P for linux-arm-kernel@lists.infradead.org; Fri, 05 May 2023 18:09:02 +0000 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-64115eef620so21468641b3a.1 for ; Fri, 05 May 2023 11:08:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683310135; x=1685902135; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=3jmjCmOGhJKcTExgQHxoFdrZdNhIimvrG1KlJ+O2CnA=; b=K0PiobN2K0CD1x/aK0LGxU/27Ndiiy3fP21rS2BmtRQcHEefRBzEKjTsRLJYEahi6T 0p6efnM3dGeXACImp1TH/0sv7ROoQguhATGB15wUfaJqt6NnRkN4yS4tvwXkq6JfGvKb d6QPkljAU+BM2MzUZJLhEOlAA23YvvJKD6IPmyzANrbKlv6Vcsq1o67/Z2h4ICSmHJU9 pZmZk0xCt3FMh5MDlyo49MrZFNEQ6eoBpv4J2oFk+YjFJpqrfuLYbhBguRIZm3bztujZ wSGZQkiG5PKBU9dUjNN//Zm+y0wc6Jj3mMr45r8z60uFXLcgftWIyJIku59qkOuRtlg/ 3Qbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683310135; x=1685902135; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=3jmjCmOGhJKcTExgQHxoFdrZdNhIimvrG1KlJ+O2CnA=; b=NjdesqM3fqtIeXFnjj8q/aFlv2+oajLt1f9hbXYJjJuK17Va14iapr70gdlS8PR9nV 6xOUROJm2R8oFnDDcbitJvDFaqNjvp+HCkLp1hvh9w/8pM2YSkerr2GB5/pYXcepooKj /DgwBSCcJrK9PgZPra4i1VcKN17MUBfpfaI/FtjqVSpo9gfqYrRD3WcwLlwGs7PYXJ/p W61hJeMvfIVpB/wLB3kPoB+/tvTkC9gO+cMKwDetF2W1kCj8qFH/m2KWaKFOdNpFfigO mNiccYgQee8SOIF7hswwsom42sREk06sDTfvEvAJ9DStHYP65hUWv94vQqLk3CxdQcAE VGbw== X-Gm-Message-State: AC+VfDxsnIlcfLeyU6U5BaoiokTrHWoGHEXdlSpS7M0Wv049ElPvxZuF oDNXRR8N1sF8fYd0jvOLnKQ= X-Google-Smtp-Source: ACHHUZ7Li5NhkqOE1+eiPls/+snjqcBfxl+Gcf+qRka4n1VUPtkhMwlUzgkzNuivRGulByJQdOt0tA== X-Received: by 2002:a17:90a:a595:b0:247:14ac:4d3a with SMTP id b21-20020a17090aa59500b0024714ac4d3amr2917795pjq.20.1683310135403; Fri, 05 May 2023 11:08:55 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:5658:95c:e1cf:a1b0]) by smtp.gmail.com with ESMTPSA id j6-20020a17090aeb0600b002500df72713sm3186230pjz.7.2023.05.05.11.08.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:08:54 -0700 (PDT) Date: Fri, 5 May 2023 11:08:50 -0700 From: Dmitry Torokhov To: Linus Walleij Cc: Aaro Koskinen , Janusz Krzysztofik , Tony Lindgren , Russell King , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Thomas Bogendoerfer , Mark Brown , Bartosz Golaszewski , Andreas Kemnade , Helge Deller , Ulf Hansson , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-input@vger.kernel.org, linux-spi@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mmc@vger.kernel.org Subject: Re: [PATCH v3 1/3] Input: ads7846 - Convert to use software nodes Message-ID: References: <20230430-nokia770-regression-v3-0-a6d0a89ffa8b@linaro.org> <20230430-nokia770-regression-v3-1-a6d0a89ffa8b@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230430-nokia770-regression-v3-1-a6d0a89ffa8b@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230505_110901_187580_3C5E3ECA X-CRM114-Status: GOOD ( 18.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Linus, On Fri, May 05, 2023 at 01:16:55PM +0200, Linus Walleij wrote: > > Populate the devices on the Nokia 770 CBUS I2C using software > nodes instead of platform data quirks. This includes the LCD > and the ADS7846 touchscreen so the conversion just brings the LCD > along with it as software nodes is an all-or-nothing design > pattern. Wow, so that worked , awesome! > +static const struct property_entry nokia770_ads7846_props[] = { > + PROPERTY_ENTRY_U32("touchscreen-size-x", 4096), > + PROPERTY_ENTRY_U32("touchscreen-size-y", 4096), > + PROPERTY_ENTRY_U32("touchscreen-max-pressure", 256), > + PROPERTY_ENTRY_U32("touchscreen-average-samples", 10), > + PROPERTY_ENTRY_U16("ti,x-plate-ohms", 180), > + PROPERTY_ENTRY_U16("ti,debounce-tol", 3), > + PROPERTY_ENTRY_U16("ti,debounce-rep", 1), > + PROPERTY_ENTRY_GPIO("pendown-gpios", &nokia770_gpiochip1_node, > + ADS7846_PENDOWN_GPIO, GPIO_ACTIVE_HIGH), Looking at the driver this actually needs to be GPIO_ACTIVE_LOW. > > +static struct gpiod_lookup_table spitz_ads7846_gpio_table = { > + .dev_id = "spi2.0", > + .table = { > + GPIO_LOOKUP("gpio-pxa", SPITZ_GPIO_TP_INT, > + "pendown", GPIO_ACTIVE_HIGH), GPIO_ACTIVE_LOW here too. > +static struct gpiod_lookup_table db1100_touch_gpio_table = { > + .dev_id = "spi0.0", > + .table = { > + GPIO_LOOKUP("alchemy-gpio2", 21, > + "pendown", GPIO_ACTIVE_HIGH), And here as well. > @@ -223,7 +220,7 @@ static int get_pendown_state(struct ads7846 *ts) > if (ts->get_pendown_state) > return ts->get_pendown_state(); > > - return !gpio_get_value(ts->gpio_pendown); > + return !gpiod_get_value(ts->gpio_pendown); This needs to be return !gpiod_get_value_raw(ts->gpio_pendown); I looked at various DTSes we have and they use a mix of active high and active low annotations, so we have to go with the "raw" variant for now, and then update to normal one once we update bad DTSes. Thanks! -- Dmitry _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel