Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4486647rwr; Mon, 8 May 2023 08:19:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6VONyQ0AsmL/vfNPVPxoiGtXY6PIFOJPPqLONPto/Rqu7b57XGRs6Zz3aE+qycDZGwsoF5 X-Received: by 2002:a17:90a:db4d:b0:250:8258:1a5 with SMTP id u13-20020a17090adb4d00b00250825801a5mr4474418pjx.33.1683559164828; Mon, 08 May 2023 08:19:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683559164; cv=none; d=google.com; s=arc-20160816; b=trqcWOIwUpYLvD9O2JuRxW+nsdoxBgzG7tATEtY2pkOA2hl9J/TRGeXJRWyKQ7c9m+ IacuEb0st3x2YkTAL8mfEqzxlSOJ9fRYuMX7LGAIXn/LR+TcysRNy5POoQq3xhjB7FM3 50xdX+Mnv2J2ZyYNT/JYALpmfLPbmf7CX5lXnplyQOJhB4nLdsPGhA5DjOfWhmXPFPze 9rXO0Bm/KSylMZ5vzEO9yWUoKl0VbdBXeS4ASVoduwXKVnFgUDwBfcKUvpjZO1j4T2Mg b+PY7EFScbeYNAVKue5FUOnrM9VqyqTJp+dFs8mzMtVu21CYFYIytL/AYlIXLrFk/lym gfxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:date:from; bh=kSt2bJgfr96mdY2e9rymODjNp99HEUKIllJC8Bu+h9A=; b=fs8ZCUc+FSsVWFqy9EKUgFhbryHg3cWUlcunqljJlVAbrPfPOcZXW8FfQk+3XhC9S6 DsFmfXf8BkFz33KloeMcHamLUVqWw0fYLy6MZ8tRHGedYa0rbpMEBj/e1YT8PqewQlFg QsJjuVdlUCoyVoDliBrFuYPF9FQ/Vroqh4mcm/6YqGBTBqE1v69ieDVxj00SwCzw/+Cy h46K0zS+kPFVEZQ+s//LgqeK73b55i7NStFFWIe1YTHlQnindZgaZ/kY49bHY05H0rZ5 qsM83RwBDtJreivGPHe6Yth+2HLXjpdhX43BgHVuYigWe6bQjmWhQE+H8VtWa3k79f3+ rPzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv192-20020a632ec9000000b00524d6d12581si8637316pgb.691.2023.05.08.08.19.12; Mon, 08 May 2023 08:19:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234233AbjEHPQM (ORCPT + 99 others); Mon, 8 May 2023 11:16:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234114AbjEHPQJ (ORCPT ); Mon, 8 May 2023 11:16:09 -0400 Received: from fgw20-7.mail.saunalahti.fi (fgw20-7.mail.saunalahti.fi [62.142.5.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0096D1B6 for ; Mon, 8 May 2023 08:16:04 -0700 (PDT) Received: from localhost (88-113-26-95.elisa-laajakaista.fi [88.113.26.95]) by fgw20.mail.saunalahti.fi (Halon) with ESMTP id 3dcf1144-edb3-11ed-b3cf-005056bd6ce9; Mon, 08 May 2023 18:16:02 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Mon, 8 May 2023 18:16:00 +0300 To: Linus Walleij Cc: Aaro Koskinen , Janusz Krzysztofik , Tony Lindgren , Russell King , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Thomas Bogendoerfer , Dmitry Torokhov , 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230430-nokia770-regression-v3-1-a6d0a89ffa8b@linaro.org> X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fri, May 05, 2023 at 01:16:55PM +0200, Linus Walleij kirjoitti: > The Nokia 770 is using GPIOs from the global numberspace on the > CBUS node to pass down to the LCD controller. This regresses when we > let the OMAP GPIO driver use dynamic GPIO base. > > The Nokia 770 now has dynamic allocation of IRQ numbers, so this > needs to be fixed for it to work. > > As this is the only user of LCD MIPID we can easily augment the > driver to use a GPIO descriptor instead and resolve the issue. > > The platform data .shutdown() callback wasn't even used in the > code, but we encode a shutdown asserting RESET in the remove() > callback for completeness sake. > > The CBUS also has the ADS7846 touchscreen attached. > > 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. > > The ADS7846 has some limited support for using GPIO descriptors, > let's convert it over completely to using device properties and then > fix all remaining boardfile users to provide all platform data using > software nodes. > > Dump the of includes and of_match_ptr() in the ADS7846 driver as part > of the job. > > Since we have to move ADS7846 over to obtaining the GPIOs it is > using exclusively from descriptors, we provide descriptor tables > for the two remaining in-kernel boardfiles using ADS7846: > > - PXA Spitz > - MIPS Alchemy DB1000 development board > > It was too hard for me to include software node conversion of > these two remaining users at this time: the spitz is using a > hscync callback in the platform data that would require further > GPIO descriptor conversion of the Spitz, and moving the hsync > callback down into the driver: it will just become too big of > a job, but it can be done separately. > > The MIPS Alchemy DB1000 is simply something I cannot test, so take > the easier approach of just providing some GPIO descriptors in > this case as I don't want the patch to grow too intrusive. ... > #include Do we need it after this patch? > #include > +#include ... > +static const struct software_node *nokia770_gpiochip_nodes[] = { > + &nokia770_mpuio_gpiochip_node, > + &nokia770_gpiochip1_node, > + &nokia770_gpiochip2_node, > + NULL, Comma is redundant for the terminator entry. > +}; ... > +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), > + { }, Ditto. > + }, > +}; ... > +static struct gpiod_lookup_table db1100_touch_gpio_table = { > + .dev_id = "spi0.0", > + .table = { > + GPIO_LOOKUP("alchemy-gpio2", 21, > + "pendown", GPIO_ACTIVE_HIGH), > + { }, Ditto. > + }, > +}; -- With Best Regards, Andy Shevchenko