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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Javier Martinez Canillas-4
Hello,

This series is similar to [0] and allows the max14577 PMIC MFD driver to
be built as a module. Currently the Kconfig symbol for the driver is a
boolean but there isn't really a reason for this restriction.

Chanwoo Choi tried to test the original post but found a build issue [1].
The fix for that issue landed in v4.6 so I'm resending this series now
that there are no in-flight dependencies anymore.

The patches have been just built tested because I don't have any of the
boards using this driver, so testing will be highly appreciated.

[0]: https://lkml.org/lkml/2016/2/11/857
[1]: https://lkml.org/lkml/2016/3/17/546

Best regards,
Javier


Javier Martinez Canillas (2):
  mfd: max14577: Use module_init() instead of subsys_initcall()
  mfd: max14577: Allow driver to be built as a module

 drivers/mfd/Kconfig    | 4 ++--
 drivers/mfd/max14577.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

--
2.5.5

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[RESEND RFT PATCH 1/2] mfd: max14577: Use module_init() instead of subsys_initcall()

Javier Martinez Canillas-4
The driver's init function is called at subsys init call level but the
dependencies provided by the driver are looked up by drivers that have
probe deferral support, so manual ordering of init calls isn't needed.

Suggested-by: Krzysztof Kozlowski <[hidden email]>
Signed-off-by: Javier Martinez Canillas <[hidden email]>

---
Hello,

I checked an the only users in mainline for this driver are the Exynos3250
Monk and Rinato boards. In both, only two regulators are used (safeout_reg
and motor_reg) and these are looked up by the drivers phy-samsung-usb2 and
regulator-haptic respectively, and both support probe deferral.

Best regards,
Javier

 drivers/mfd/max14577.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/max14577.c b/drivers/mfd/max14577.c
index 2280b3fdcf68..6c245128ab2e 100644
--- a/drivers/mfd/max14577.c
+++ b/drivers/mfd/max14577.c
@@ -561,7 +561,7 @@ static int __init max14577_i2c_init(void)
 
  return i2c_add_driver(&max14577_i2c_driver);
 }
-subsys_initcall(max14577_i2c_init);
+module_init(max14577_i2c_init);
 
 static void __exit max14577_i2c_exit(void)
 {
--
2.5.5

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Javier Martinez Canillas-4
In reply to this post by Javier Martinez Canillas-4
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 <[hidden email]>
Signed-off-by: Javier Martinez Canillas <[hidden email]>

---

 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
--
2.5.5

Loading...