diff mbox

[RESEND,RFT,2/2] mfd: max14577: Allow driver to be built as a module

Message ID 1464280340-13228-3-git-send-email-javier@osg.samsung.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Javier Martinez Canillas May 26, 2016, 4:32 p.m. UTC
The driver's Kconfig symbol is a boolean but nothing prevents the driver
to be built as a module instead of built-in. It is true that most system
integrators will choose the latter but the config should not restrict it.

Suggested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

 drivers/mfd/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Lee Jones June 16, 2016, 10:40 a.m. UTC | #1
On Thu, 26 May 2016, Javier Martinez Canillas wrote:

> The driver's Kconfig symbol is a boolean but nothing prevents the driver
> to be built as a module instead of built-in. It is true that most system
> integrators will choose the latter but the config should not restrict it.

Does the driver have all of the module related code?

> Suggested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> 
> ---
> 
>  drivers/mfd/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index a49565cc1a6b..33d112f390fe 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -514,8 +514,8 @@ config MFD_88PM860X
>  	  battery-charger under the corresponding menus.
>  
>  config MFD_MAX14577
> -	bool "Maxim Semiconductor MAX14577/77836 MUIC + Charger Support"
> -	depends on I2C=y
> +	tristate "Maxim Semiconductor MAX14577/77836 MUIC + Charger Support"
> +	depends on I2C
>  	select MFD_CORE
>  	select REGMAP_I2C
>  	select REGMAP_IRQ
Javier Martinez Canillas June 16, 2016, 1:48 p.m. UTC | #2
Hello Lee,

On 06/16/2016 06:40 AM, Lee Jones wrote:
> On Thu, 26 May 2016, Javier Martinez Canillas wrote:
> 
>> The driver's Kconfig symbol is a boolean but nothing prevents the driver
>> to be built as a module instead of built-in. It is true that most system
>> integrators will choose the latter but the config should not restrict it.
> 
> Does the driver have all of the module related code?
>

Yes, it always did (even has a MODULE_DEVICE_TABLE so autoload should work)
but is just that the Kconfig symbol was bool instead of tristate since most
system integrators will choose to have it built-in.
 
Best regards,
Lee Jones June 16, 2016, 2:22 p.m. UTC | #3
On Thu, 26 May 2016, Javier Martinez Canillas wrote:

> The driver's Kconfig symbol is a boolean but nothing prevents the driver
> to be built as a module instead of built-in. It is true that most system
> integrators will choose the latter but the config should not restrict it.
> 
> Suggested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> 
> ---
> 
>  drivers/mfd/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index a49565cc1a6b..33d112f390fe 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -514,8 +514,8 @@ config MFD_88PM860X
>  	  battery-charger under the corresponding menus.
>  
>  config MFD_MAX14577
> -	bool "Maxim Semiconductor MAX14577/77836 MUIC + Charger Support"
> -	depends on I2C=y
> +	tristate "Maxim Semiconductor MAX14577/77836 MUIC + Charger Support"
> +	depends on I2C
>  	select MFD_CORE
>  	select REGMAP_I2C
>  	select REGMAP_IRQ
diff mbox

Patch

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index a49565cc1a6b..33d112f390fe 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -514,8 +514,8 @@  config MFD_88PM860X
 	  battery-charger under the corresponding menus.
 
 config MFD_MAX14577
-	bool "Maxim Semiconductor MAX14577/77836 MUIC + Charger Support"
-	depends on I2C=y
+	tristate "Maxim Semiconductor MAX14577/77836 MUIC + Charger Support"
+	depends on I2C
 	select MFD_CORE
 	select REGMAP_I2C
 	select REGMAP_IRQ