From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754077AbbFRJFI (ORCPT ); Thu, 18 Jun 2015 05:05:08 -0400 Received: from demumfd001.nsn-inter.net ([93.183.12.32]:55406 "EHLO demumfd001.nsn-inter.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753810AbbFRJEh (ORCPT ); Thu, 18 Jun 2015 05:04:37 -0400 Subject: Re: [PATCH] driver/i2c/mux: Add register based mux i2c-mux-reg To: ext Paul Bolle References: <1434475692-4611-1-git-send-email-yorksun@freescale.com> <1434531244.2069.111.camel@x220> <55818BAB.5090605@nokia.com> <1434556990.2400.16.camel@x220> <558275F1.5020100@nokia.com> <1434614901.2385.27.camel@x220> Cc: York Sun , wsa@the-dreams.de, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Peter Korsgaard From: Alexander Sverdlin Message-ID: <5582899B.9030307@nokia.com> Date: Thu, 18 Jun 2015 11:04:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <1434614901.2385.27.camel@x220> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-size: 1530 X-purgate-ID: 151667::1434618268-000073D1-EBD70C22/0/0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! On 18/06/15 10:08, ext Paul Bolle wrote: >>>> You do not see the platform_device, because there are no users yet, put >>>>> > >> > this MODULE_ALIAS() is perfectly fine, it will allow automatic module loading >>>>> > >> > in non-DT case. >>> > > Do you mean that it will allow automatic module loading once the patch >>> > > that adds a struct platform_device with a "i2c-mux-reg" name lands? >> > >> > Any platform code which will register the platform_device will trigger uevent and >> > udevd will be able to find the module with this macro. This is a legacy alternative >> > to device-tree approach. > That means I've correctly figured out the purpose of this > MODULE_ALIAS("platform:" stuff. Because it might actually be documented > somewhere but I managed to not stumble on that documentation. > > With that out of the way: am I right in thinking there's currently no > platform code that triggers that uevent for > "MODALIAS=platform:i2c-mux-reg"? Because if there's no struct > platform_device taking care of that I think this MODULE_ALIAS() should > not be added, not yet. Maybe (and hopefully) there will never be a legacy user of this driver. But this macro is perfectly fine, adds no overhead (but modinfo) and make the module "complete" in a sense that it supports both types of binding. There is a legacy probe function in it, all the support for legacy binding with platform_data in it and this modalias is simply the last part of it. -- Best regards, Alexander Sverdlin.