Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753058AbbBXRIU (ORCPT ); Tue, 24 Feb 2015 12:08:20 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.221]:12996 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751436AbbBXRIS convert rfc822-to-8bit (ORCPT ); Tue, 24 Feb 2015 12:08:18 -0500 X-RZG-AUTH: :JGIXVUS7cutRB/49FwqZ7WcKdUCnXG6JabOfSXKWrat/m8zqzY0= X-RZG-CLASS-ID: mo00 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: [PATCH] OMAPDSS: restore "name" sysfs entry. From: "Dr. H. Nikolaus Schaller" In-Reply-To: <20150224203706.1eafa129@notabene.brown> Date: Tue, 24 Feb 2015 18:08:01 +0100 Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, LKML , GTA04 owners Content-Transfer-Encoding: 8BIT Message-Id: <54237011-FA81-4669-A182-797C4284680D@goldelico.com> References: <20150224203706.1eafa129@notabene.brown> To: NeilBrown , Tomi Valkeinen X-Mailer: Apple Mail (2.1878.6) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3434 Lines: 118 I have tested it with X.Org X Server 1.12.4 Release Date: 2012-08-27 X Protocol Version 11, Revision 0 Build Operating System: Linux 3.2.0-4-mx5 armv7l Debian (coming from Debian Wheezy) on: * gta04 (SPI panel) * openpandora (SPI panel) * BeagleBoard XM (with RGB panel) * PandaBoard ES (w/o panel) * omap5432-evm + Pyra prototype (MIPI panel) Without this patch, X Server simply fails with: Fatal server error: no screens found So please add Tested-by: Nikolaus Schaller Thanks, Nikolaus Am 24.02.2015 um 10:37 schrieb NeilBrown : > > > commit 303e4697e762dc92a40405f4e4b8aac02cd0d70b > OMAPDSS: rename display-sysfs 'name' entry > > broke the xorg X server on my device as it couldn't find the display > any more. It needs the 'name' file and now there isn't one. > > That commit claims that 'name' is not compatible with i2c or spi. > i2c does register it own 'name' file, but spi does not, hence my > problem - I have an spi display. > > So create a special case for i2c: add the name attribute for non-i2c > devices. > > Fixes: 303e4697e762dc92a40405f4e4b8aac02cd0d70b > Signed-off-by: NeilBrown > > -- > > Hi Tomi, > I wonder if you would consider this for the next merge window (or maybe even sooner as a bug-fix). > I haven't tested it with an i2c display, but it certainly allows xorg to work > on my spi-attached display. > > Thanks, > NeilBrown > > > diff --git a/drivers/video/fbdev/omap2/dss/display-sysfs.c b/drivers/video/fbdev/omap2/dss/display-sysfs.c > index 5a2095a98ed8..53897b743130 100644 > --- a/drivers/video/fbdev/omap2/dss/display-sysfs.c > +++ b/drivers/video/fbdev/omap2/dss/display-sysfs.c > @@ -25,6 +25,15 @@ > #include > #include > > +#if IS_ENABLED(CONFIG_I2C) > +#include > +#else > +static inline int i2c_verify_client(struct device *dev) > +{ > + return NULL; > +} > +#endif > + > #include