From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pd0-x234.google.com ([2607:f8b0:400e:c02::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YvBex-0001m2-G0 for linux-mtd@lists.infradead.org; Wed, 20 May 2015 21:36:15 +0000 Received: by pdbqa5 with SMTP id qa5so82990510pdb.0 for ; Wed, 20 May 2015 14:35:54 -0700 (PDT) Date: Wed, 20 May 2015 14:35:46 -0700 From: Brian Norris To: =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= Subject: Re: [PATCH] Documentation: dt: mtd: replace "nor-jedec" binding with "jedec,spi-nor" Message-ID: <20150520213546.GN11598@ld-irv-0074> References: <1431624773-4165-1-git-send-email-computersforpeace@gmail.com> <20150515195541.GL11598@ld-irv-0074> <20150518104501.GD3551@leverpostej> <20150518183442.GR11598@ld-irv-0074> <20150519013415.GV11598@ld-irv-0074> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Cc: Mark Rutland , "devicetree@vger.kernel.org" , Marek Vasut , Pawel Moll , Ian Campbell , Stephen Warren , "linux-kernel@vger.kernel.org" , linux-spi , Rob Herring , Geert Uytterhoeven , Kumar Gala , "linux-mtd@lists.infradead.org" List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, May 19, 2015 at 09:27:50AM +0200, Rafał Miłecki wrote: > On 19 May 2015 at 03:34, Brian Norris wrote: > > So how about the following patch? It seems like we'll need to be able to > > ignore useless 'modalias' values in cases like this: > > > > // modalias = "shinynewdevice" > > compatible = "myvendor,shinynewdevice", "jedec,spi-nor"; > > > > and also if somebody leaves off the entire shinynewdevice string: > > > > // modalias = "spi-nor" > > compatible = "jedec,spi-nor"; > > > > So we rework the spi-nor library to not reject "bad" names, and just > > fall back to autodetection, and we add the .of_match_table to properly > > catch all "jedec,spi-nor". > > That's nice but what about platforms using platform data instead of > DT? I would like to use some kind of "spi-nor" (with some prefix > *maybe*) for them too. For platform devices, you might as well just use the name of the driver, which is 'm25p80'. Isn't that how most platform devices are matched with drivers? Or if you can propose other clean solutions, I'm all ears. I'm likely to merge this patch for 4.2 unless a better solution comes up, though. Brian From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brian Norris Subject: Re: [PATCH] Documentation: dt: mtd: replace "nor-jedec" binding with "jedec,spi-nor" Date: Wed, 20 May 2015 14:35:46 -0700 Message-ID: <20150520213546.GN11598@ld-irv-0074> References: <1431624773-4165-1-git-send-email-computersforpeace@gmail.com> <20150515195541.GL11598@ld-irv-0074> <20150518104501.GD3551@leverpostej> <20150518183442.GR11598@ld-irv-0074> <20150519013415.GV11598@ld-irv-0074> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Geert Uytterhoeven , Mark Rutland , Rob Herring , Pawel Moll , Ian Campbell , Kumar Gala , "linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Stephen Warren , Marek Vasut , linux-spi To: =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-spi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: On Tue, May 19, 2015 at 09:27:50AM +0200, Rafa=C5=82 Mi=C5=82ecki wrote= : > On 19 May 2015 at 03:34, Brian Norris w= rote: > > So how about the following patch? It seems like we'll need to be ab= le to > > ignore useless 'modalias' values in cases like this: > > > > // modalias =3D "shinynewdevice" > > compatible =3D "myvendor,shinynewdevice", "jedec,spi-nor"; > > > > and also if somebody leaves off the entire shinynewdevice string: > > > > // modalias =3D "spi-nor" > > compatible =3D "jedec,spi-nor"; > > > > So we rework the spi-nor library to not reject "bad" names, and jus= t > > fall back to autodetection, and we add the .of_match_table to prope= rly > > catch all "jedec,spi-nor". >=20 > That's nice but what about platforms using platform data instead of > DT? I would like to use some kind of "spi-nor" (with some prefix > *maybe*) for them too. =46or platform devices, you might as well just use the name of the driv= er, which is 'm25p80'. Isn't that how most platform devices are matched wit= h drivers? Or if you can propose other clean solutions, I'm all ears. I'm likely t= o merge this patch for 4.2 unless a better solution comes up, though. Brian -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932231AbbETVf6 (ORCPT ); Wed, 20 May 2015 17:35:58 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:35221 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752688AbbETVfy (ORCPT ); Wed, 20 May 2015 17:35:54 -0400 Date: Wed, 20 May 2015 14:35:46 -0700 From: Brian Norris To: =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= Cc: Geert Uytterhoeven , Mark Rutland , Rob Herring , Pawel Moll , Ian Campbell , Kumar Gala , "linux-mtd@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Stephen Warren , Marek Vasut , linux-spi Subject: Re: [PATCH] Documentation: dt: mtd: replace "nor-jedec" binding with "jedec,spi-nor" Message-ID: <20150520213546.GN11598@ld-irv-0074> References: <1431624773-4165-1-git-send-email-computersforpeace@gmail.com> <20150515195541.GL11598@ld-irv-0074> <20150518104501.GD3551@leverpostej> <20150518183442.GR11598@ld-irv-0074> <20150519013415.GV11598@ld-irv-0074> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 19, 2015 at 09:27:50AM +0200, Rafał Miłecki wrote: > On 19 May 2015 at 03:34, Brian Norris wrote: > > So how about the following patch? It seems like we'll need to be able to > > ignore useless 'modalias' values in cases like this: > > > > // modalias = "shinynewdevice" > > compatible = "myvendor,shinynewdevice", "jedec,spi-nor"; > > > > and also if somebody leaves off the entire shinynewdevice string: > > > > // modalias = "spi-nor" > > compatible = "jedec,spi-nor"; > > > > So we rework the spi-nor library to not reject "bad" names, and just > > fall back to autodetection, and we add the .of_match_table to properly > > catch all "jedec,spi-nor". > > That's nice but what about platforms using platform data instead of > DT? I would like to use some kind of "spi-nor" (with some prefix > *maybe*) for them too. For platform devices, you might as well just use the name of the driver, which is 'm25p80'. Isn't that how most platform devices are matched with drivers? Or if you can propose other clean solutions, I'm all ears. I'm likely to merge this patch for 4.2 unless a better solution comes up, though. Brian