Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2014278rdh; Tue, 26 Sep 2023 09:43:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEOc4XIEZOzP9Fzb/diULjmwqmdI6PghHL+wmHsN/bz0und6V4C5JSRr1JiKCMyvGogjWJ2 X-Received: by 2002:a17:90b:512:b0:26d:416a:b027 with SMTP id r18-20020a17090b051200b0026d416ab027mr9749144pjz.31.1695746595952; Tue, 26 Sep 2023 09:43:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695746595; cv=none; d=google.com; s=arc-20160816; b=hfW64BlNYOcV1wMZ4CHLWFlr8GeKcwQwG1EAPwwTCsr1vyWBvK/pgyjpXrTzEMwh/c axeAD9Lxe03DMv7aPoM79drLhM6J2X3dea1ynApD36byilsxqnGYSY0J7kzmbuJrDknk zygVrTMPgEdF+8qf17MRmc+DDo9THYhKRmfPTRUh/PcPZd6iRiz1guXgHwWWz94MPN+L 1O8jh9z+3mf5SIQnJcYW446dexHp9lijaVeepmeLQdsG7s4IIwFXS4YaKdmwHfOAntIY CRETpvWZEsxdmFZKEk8YtyuDdncKJuaR6gVI3IDc5LERSRvtr0iOhOuEU5rUD77HXrdH MEQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=99Jdm+KGYi0Lo9tn50qBWf/DueniLpg/+Cki25uimXo=; fh=dlWaF0ouAk38l6ZadWZzGtL4PI4M8Q/efUW65rhq1u0=; b=eq6iMLxxxlYmLZd+Gb3PDGgdUxEg5tXfrR0smkVjCg6hFka6NfYFw1JAw1AiYjfkCu B2ElIKJdPREyYEeNxUsdsRb2DR/91hqadGw1NJyXZLK9BjaprXFO7hJX021NRFvgf/TI ZSnVRdFdwtiLKfxA8Y4Vmhh1vjwziw41q4vvOHnUT91VMNlsbojB8MpBbIFEdjPmxL+w 3ri+lmDq0X9raS61YjfxQ27I5nm+PIJdTirl2NiAUIQzMOfOa+MYPtd68SI8ykT4BUtH Um134OvwfD4+5B9u5hnSDG/m3NfBVE83DznNjQlSRa+e2mamxejmg7OsTb8sh1ykOiFc kgAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id bv22-20020a17090af19600b002741e78e66asi14801391pjb.153.2023.09.26.09.43.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 09:43:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 28C8882698DD; Tue, 26 Sep 2023 09:33:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235257AbjIZQc7 (ORCPT + 99 others); Tue, 26 Sep 2023 12:32:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229629AbjIZQc6 (ORCPT ); Tue, 26 Sep 2023 12:32:58 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C584B3; Tue, 26 Sep 2023 09:32:52 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6600,9927,10845"; a="384389707" X-IronPort-AV: E=Sophos;i="6.03,178,1694761200"; d="scan'208";a="384389707" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2023 09:32:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10845"; a="778188774" X-IronPort-AV: E=Sophos;i="6.03,178,1694761200"; d="scan'208";a="778188774" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga008.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2023 09:32:38 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC0) (envelope-from ) id 1qlAmR-00000000f0W-3RkJ; Tue, 26 Sep 2023 19:19:23 +0300 Date: Tue, 26 Sep 2023 19:19:23 +0300 From: Andy Shevchenko To: Duje =?utf-8?Q?Mihanovi=C4=87?= Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Alan Stern , Greg Kroah-Hartman , Linus Walleij , Bartosz Golaszewski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [PATCH RFC v2 5/6] ARM: pxa: Convert Spitz hsync to GPIO descriptors Message-ID: References: <20230926-pxa-gpio-v2-0-984464d165dd@skole.hr> <20230926-pxa-gpio-v2-5-984464d165dd@skole.hr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230926-pxa-gpio-v2-5-984464d165dd@skole.hr> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 26 Sep 2023 09:33:00 -0700 (PDT) On Tue, Sep 26, 2023 at 05:46:26PM +0200, Duje Mihanović wrote: > Sharp's Spitz still uses the legacy GPIO interface in its > wait_for_hsync() function. > > Convert it to use the GPIO descriptor interface. ... > +static struct gpio_desc *hsync = NULL; Assignment is redundant. ... > gpiod_add_lookup_table(&spitz_ads7846_gpio_table); > gpiod_add_lookup_table(&spitz_spi_gpio_table); > + hsync = gpiod_get(NULL, "hsync", GPIOD_IN); > + if (IS_ERR(hsync)) { > + pr_err("Failed to get hsync GPIO: %ld\n", PTR_ERR(hsync)); > + return; > + } > pxa2xx_set_spi_info(2, &spitz_spi_info); > spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices)); Yeah, but the question is, if GPIO request fails, can we instantiate at least one device and move on? -- With Best Regards, Andy Shevchenko