From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C1BF6D3D for ; Fri, 16 Apr 2021 14:21:04 +0000 (UTC) IronPort-SDR: 36VcjjV4BPOXoew4hx3T4/Vwc5jnSgMPupzvtSY7s6ywbhz6uSojFujeJxez7GcQzI+dKHHpLB za2sAc56thDg== X-IronPort-AV: E=McAfee;i="6200,9189,9956"; a="182170795" X-IronPort-AV: E=Sophos;i="5.82,226,1613462400"; d="scan'208";a="182170795" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2021 07:21:03 -0700 IronPort-SDR: zmdCb34RpMljdFJ+iFsV9Zoyu2JS5v7cl2KQLOEOFPzdsUfs7jvKZ8+gpfyVdcNURMi5bs2RCa iCh1XdmGXiBA== X-IronPort-AV: E=Sophos;i="5.82,226,1613462400"; d="scan'208";a="461979133" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2021 07:21:01 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lXPL8-004fR5-6x; Fri, 16 Apr 2021 17:20:58 +0300 Date: Fri, 16 Apr 2021 17:20:58 +0300 From: Andy Shevchenko To: Greg Kroah-Hartman Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Jan Sebastian =?iso-8859-1?Q?G=F6tte?= , Phil Reid , Nishad Kamdar Subject: Re: [PATCH v1 1/2] fbtft: Rectify GPIO handling Message-ID: References: <20210416123117.4993-1-andriy.shevchenko@linux.intel.com> X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Fri, Apr 16, 2021 at 02:51:59PM +0200, Greg Kroah-Hartman wrote: > On Fri, Apr 16, 2021 at 03:31:16PM +0300, Andy Shevchenko wrote: > > The infamous commit c440eee1a7a1 ("Staging: fbtft: Switch to > > the GPIO descriptor interface") broke GPIO handling completely. > > It has already four commits to rectify and it seems not enough. > > In order to fix the mess here we: > > > > 1) Set default to "inactive" for all requested pins > > > > 2) Fix CS, RD, and WR pins polarity since it's active low and > > GPIO descriptor interface takes it into consideration from > > the Device Tree or ACPI > > > > 3) Fix RESET pin polarity in the places missed by the commit > > b918d1c27066 ("Staging: fbtft: Fix reset assertion when using gpio descriptor") > > > > 4) Consolidate chip activation (CS assert) under default > > ->reset() callback > > > > To summarize the expectations about polarity for GPIOs: > > > > #RD Low > > #WR Low > > #CS Low > > #RESET Low > > DC or RS High > > RW High > > Data 0..15 High > > > > See also Adafruit learning course [1] for the example of the schematics. > > > > While at it, drop unneeded NULL checks, since GPIO API is tolerant to that. > > At the end, update TODO to mark this job eventually done. > > > > [1]: https://learn.adafruit.com/adafruit-2-8-and-3-2-color-tft-touchscreen-breakout-v2/downloads > > Shouldn't this be broken up into "one patch per thing" from your list > above? Feels like you did a lot of different things all in the same > patch :( Okay, I split a bit, now it's 4 patches. (See v2). -- With Best Regards, Andy Shevchenko