Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754183AbbGWU4a (ORCPT ); Thu, 23 Jul 2015 16:56:30 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:33996 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753070AbbGWU42 convert rfc822-to-8bit (ORCPT ); Thu, 23 Jul 2015 16:56:28 -0400 MIME-Version: 1.0 In-Reply-To: <201507232215.35603@pali> References: <1437601920-13045-1-git-send-email-afd@ti.com> <20150723161240.GF29125@pali> <55B11E4C.6000006@ti.com> <201507232215.35603@pali> Date: Thu, 23 Jul 2015 22:56:26 +0200 Message-ID: Subject: Re: [PATCH 5/8] power: bq27x00_battery: Renaming for consistency From: Belisko Marek To: =?UTF-8?Q?Pali_Roh=C3=A1r?= Cc: "Andrew F. Davis" , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Dan Murphy , Linux PM mailing list , LKML Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2165 Lines: 68 Hi Pali, On Thu, Jul 23, 2015 at 10:15 PM, Pali Rohár wrote: > On Thursday 23 July 2015 19:03:08 Andrew F. Davis wrote: >> >> -#ifdef CONFIG_BATTERY_BQ27X00_I2C >> >> -MODULE_ALIAS("i2c:bq27000-battery"); >> >> +#ifdef CONFIG_BATTERY_BQ27XXX_I2C >> >> +MODULE_ALIAS("i2c:bq27xxx-battery"); >> >> >> >> #endif >> > >> > Why is this MODULE_ALIAS needed? Some lines upper there is >> > >> > MODULE_DEVICE_TABLE(i2c, bq27xxx_id); >> > >> > which add proper i2c: module alias... >> >> Not sure, looks like it was added in commit >> 8ebb7e9c1a502cfc300618c19c3c6f06fc76d237 which claims that the >> "module won't get loaded automatically" without it, but I have not >> had this problem, so I'm not sure why it's there. >> > > git grep bq27000-battery show me that only one driver uses that name: > drivers/w1/slaves/w1_bq27000.c > > And more over, it is platform device, not i2c device. So that commit > 8ebb7e9c1a502cfc300618c19c3c6f06fc76d237 is wrong! CCing Marek. If you look to power/bq27x00 driver then there is I2C part and platform part only both selectable by config. In 8ebb7e9c1a502cfc300618c19c3c6f06fc76d237 was added MODULE_ALIAS to have this driver working as module for both buses. Even if I2C isn't used anywhere I add MODULE_ALIAS also for that. > > MODULE_ALIAS("platform:bq27000-battery") is really needed for > w1_bq27000.c but MODULE_ALIAS("i2c:bq27000-battery") should be removed. > It is not used by any board platform code or DT. Not sure if it's good idea to remove it. Somebody outside can use it. > > Marek, correct me if I'm wrong. > > -- > Pali Rohár > pali.rohar@gmail.com BR, marek -- as simple and primitive as possible ------------------------------------------------- Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/