From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752420AbbGWMPA (ORCPT ); Thu, 23 Jul 2015 08:15:00 -0400 Received: from smtp.domeneshop.no ([194.63.252.55]:55480 "EHLO smtp.domeneshop.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752088AbbGWMOz (ORCPT ); Thu, 23 Jul 2015 08:14:55 -0400 Message-ID: <55B0DAB2.6060203@tronnes.org> Date: Thu, 23 Jul 2015 14:14:42 +0200 From: =?UTF-8?B?Tm9yYWxmIFRyw7hubmVz?= User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Paul Bolle , Henri Chain CC: thomas.petazzoni@free-electrons.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, sudipm.mukherjee@gmail.com Subject: Re: [PATCH v2] Staging: fbtft: Add support for the Ultrachip UC1611 LCD controller References: <1436878779-12400-1-git-send-email-henri.chain@eleves.ec-nantes.fr> <1436952990.2679.84.camel@tiscali.nl> In-Reply-To: <1436952990.2679.84.camel@tiscali.nl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Den 15.07.2015 11:36, skrev Paul Bolle: > On di, 2015-07-14 at 14:59 +0200, Henri Chain wrote: >> --- /dev/null >> +++ b/drivers/staging/fbtft/fb_uc1611.c >> +#define DRVNAME "fb_uc1611" >> +MODULE_ALIAS("spi:" DRVNAME); >> +MODULE_ALIAS("platform:" DRVNAME); >> +MODULE_ALIAS("spi:uc1611"); >> +MODULE_ALIAS("platform:uc1611"); > Many of the drivers under drivers/staging/fbtft use a comparable set of > aliases. But I wonder if they are all needed (here, and in the other > drivers). > > In this case I think I understand how the "fb_uc1611" .modalias (see > below) will eventually trigger a "MODALIAS=spi:fb_uc1611" uevent. And > that uevent will make userspace load the fb_uc1611.ko module, right? > > But is there a similar way that "spi:uc1611" fits into the system? > Because I couldn't spot anything similar for "uc1611". If I remember correctly, this is used for autoloading the module when using Device Tree. > Likewise, "platform:fb_uc1611" and "platform:uc1611" require struct > platform_device's with "fb_uc1611" and "uc1611" .name's. But I couldn't > spot where platform_device's with those .name's are created. How do > these two aliases fit into the system? Most of these display controllers support both SPI and 8080 parallel interface. So the FBTFT_REGISTER_DRIVER macro sets up both a SPI and a platform driver. I can't remember the reason why I couldn't put the MODULE_ALIAS'es inside FBTFT_REGISTER_DRIVER. If the chip only has a SPI interface, then the platform aliases are not needed. Noralf.