From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422883AbdEZMNn (ORCPT ); Fri, 26 May 2017 08:13:43 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:36414 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164135AbdEZMNe (ORCPT ); Fri, 26 May 2017 08:13:34 -0400 MIME-Version: 1.0 X-Originating-IP: [90.68.25.6] In-Reply-To: <20170526063518.21246-5-guodong.xu@linaro.org> References: <20170526063518.21246-1-guodong.xu@linaro.org> <20170526063518.21246-5-guodong.xu@linaro.org> From: Javier Martinez Canillas Date: Fri, 26 May 2017 14:13:33 +0200 Message-ID: Subject: Re: [PATCH 4/6] regulator: hi6421v530: add driver for hi6421v530 voltage regulator To: Guodong Xu Cc: Lee Jones , Rob Herring , Mark Rutland , xuwei5@hisilicon.com, Catalin Marinas , Will Deacon , Liam Girdwood , Mark Brown , Kevin Hilman , Arnd Bergmann , Gregory Clement , Olof Johansson , Thomas Petazzoni , Masahiro Yamada , riku.voipio@linaro.org, Thierry Reding , Krzysztof Kozlowski , eric@anholt.net, damm+renesas@opensource.se, ard.biesheuvel@linaro.org, Linus Walleij , Geert Uytterhoeven , "devicetree@vger.kernel.org" , Linux Kernel , "linux-arm-kernel@lists.infradead.org" , hw.wangxiaoyin@hisilicon.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Guodong, On Fri, May 26, 2017 at 8:35 AM, Guodong Xu wrote: > From: Wang Xiaoyin > [snip] > > +config REGULATOR_HI6421V530 > + tristate "HiSilicon Hi6421v530 PMIC voltage regulator support" The Kconfig symbol is tristate so the driver can be built as a module... > + > +static struct platform_driver hi6421v530_regulator_driver = { > + .driver = { > + .name = "hi6421v530-regulator", > + }, > + .probe = hi6421v530_regulator_probe, > +}; > +module_platform_driver(hi6421v530_regulator_driver); ... but the driver doesn't have a platform device ID table nor export it as a module alias using MODULE_DEVICE_TABLE(). That means that if built as a module, it won't be autoloaded when the "hi6421v530-regulator" device is registered by the MFD driver. > + > +MODULE_AUTHOR("Wang Xiaoyin "); > +MODULE_DESCRIPTION("Hi6421v530 regulator driver"); > +MODULE_LICENSE("GPL v2"); Alternative you can add a MODULE_ALIAS(). Best regards, Javier