From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932403AbcAYMTw (ORCPT ); Mon, 25 Jan 2016 07:19:52 -0500 Received: from arrakis.dune.hu ([78.24.191.176]:57932 "EHLO arrakis.dune.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932251AbcAYMTu (ORCPT ); Mon, 25 Jan 2016 07:19:50 -0500 Subject: Re: [PATCH V2 2/2] regulator: mt6323: Add support for MT6323 regulator To: Javier Martinez Canillas References: <1453718405-40815-1-git-send-email-blogic@openwrt.org> <1453718405-40815-2-git-send-email-blogic@openwrt.org> Cc: Steven Liu , Linux Kernel , Henry Chen , Liam Girdwood , Mark Brown , linux-mediatek@lists.infradead.org, Matthias Brugger , Chen Zhong , "linux-arm-kernel@lists.infradead.org" From: John Crispin Message-ID: <56A612E2.1010509@openwrt.org> Date: Mon, 25 Jan 2016 13:19:46 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 25/01/2016 13:11, Javier Martinez Canillas wrote: > Hello, > > On Mon, Jan 25, 2016 at 7:40 AM, John Crispin wrote: >> From: Chen Zhong > > [snip] > >> +} >> + >> +static struct platform_driver mt6323_regulator_driver = { >> + .driver = { >> + .name = "mt6323-regulator", >> + }, >> + .probe = mt6323_regulator_probe, >> +}; >> + > > You don't have a .of_match table but according the DT bindings, the > compatible string "mediatek,mt6323-regulator" should be used so there > should be a OF match table or the vendor prefix of the compatible > string won't be used for matching (i.e: fallbacks to the driver .name > for match). the driver is probed via drivers/mfd/mt6397-core.c and does not require the OF match table. It loads fine just like the mt6397 driver. > >> +module_platform_driver(mt6323_regulator_driver); >> + >> +MODULE_AUTHOR("Chen Zhong "); >> +MODULE_DESCRIPTION("Regulator Driver for MediaTek MT6397 PMIC"); >> +MODULE_LICENSE("GPL"); >> +MODULE_ALIAS("platform:mt6323-regulator"); > > This alias should not be needed if you provide a OF match table and a > MODULE_DEVICE_TABLE(of, foo); see above. John From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Crispin Subject: Re: [PATCH V2 2/2] regulator: mt6323: Add support for MT6323 regulator Date: Mon, 25 Jan 2016 13:19:46 +0100 Message-ID: <56A612E2.1010509@openwrt.org> References: <1453718405-40815-1-git-send-email-blogic@openwrt.org> <1453718405-40815-2-git-send-email-blogic@openwrt.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Javier Martinez Canillas Cc: Steven Liu , Linux Kernel , Henry Chen , Liam Girdwood , Mark Brown , linux-mediatek@lists.infradead.org, Matthias Brugger , Chen Zhong , "linux-arm-kernel@lists.infradead.org" List-Id: linux-mediatek@lists.infradead.org Hi, On 25/01/2016 13:11, Javier Martinez Canillas wrote: > Hello, > > On Mon, Jan 25, 2016 at 7:40 AM, John Crispin wrote: >> From: Chen Zhong > > [snip] > >> +} >> + >> +static struct platform_driver mt6323_regulator_driver = { >> + .driver = { >> + .name = "mt6323-regulator", >> + }, >> + .probe = mt6323_regulator_probe, >> +}; >> + > > You don't have a .of_match table but according the DT bindings, the > compatible string "mediatek,mt6323-regulator" should be used so there > should be a OF match table or the vendor prefix of the compatible > string won't be used for matching (i.e: fallbacks to the driver .name > for match). the driver is probed via drivers/mfd/mt6397-core.c and does not require the OF match table. It loads fine just like the mt6397 driver. > >> +module_platform_driver(mt6323_regulator_driver); >> + >> +MODULE_AUTHOR("Chen Zhong "); >> +MODULE_DESCRIPTION("Regulator Driver for MediaTek MT6397 PMIC"); >> +MODULE_LICENSE("GPL"); >> +MODULE_ALIAS("platform:mt6323-regulator"); > > This alias should not be needed if you provide a OF match table and a > MODULE_DEVICE_TABLE(of, foo); see above. John From mboxrd@z Thu Jan 1 00:00:00 1970 From: blogic@openwrt.org (John Crispin) Date: Mon, 25 Jan 2016 13:19:46 +0100 Subject: [PATCH V2 2/2] regulator: mt6323: Add support for MT6323 regulator In-Reply-To: References: <1453718405-40815-1-git-send-email-blogic@openwrt.org> <1453718405-40815-2-git-send-email-blogic@openwrt.org> Message-ID: <56A612E2.1010509@openwrt.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, On 25/01/2016 13:11, Javier Martinez Canillas wrote: > Hello, > > On Mon, Jan 25, 2016 at 7:40 AM, John Crispin wrote: >> From: Chen Zhong > > [snip] > >> +} >> + >> +static struct platform_driver mt6323_regulator_driver = { >> + .driver = { >> + .name = "mt6323-regulator", >> + }, >> + .probe = mt6323_regulator_probe, >> +}; >> + > > You don't have a .of_match table but according the DT bindings, the > compatible string "mediatek,mt6323-regulator" should be used so there > should be a OF match table or the vendor prefix of the compatible > string won't be used for matching (i.e: fallbacks to the driver .name > for match). the driver is probed via drivers/mfd/mt6397-core.c and does not require the OF match table. It loads fine just like the mt6397 driver. > >> +module_platform_driver(mt6323_regulator_driver); >> + >> +MODULE_AUTHOR("Chen Zhong "); >> +MODULE_DESCRIPTION("Regulator Driver for MediaTek MT6397 PMIC"); >> +MODULE_LICENSE("GPL"); >> +MODULE_ALIAS("platform:mt6323-regulator"); > > This alias should not be needed if you provide a OF match table and a > MODULE_DEVICE_TABLE(of, foo); see above. John