Patch "power: supply: rt5033_battery: Fix device tree enumeration" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    power: supply: rt5033_battery: Fix device tree enumeration

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     power-supply-rt5033_battery-fix-device-tree-enumerat.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b467f1b5546c84023b3627a585b72b60cca4eba3
Author: Stephan Gerhold <stephan@xxxxxxxxxxx>
Date:   Mon May 17 12:51:12 2021 +0200

    power: supply: rt5033_battery: Fix device tree enumeration
    
    [ Upstream commit f3076cd8d1d5fa64b5e1fa5affc045c2fc123baa ]
    
    The fuel gauge in the RT5033 PMIC has its own I2C bus and interrupt
    line. Therefore, it is not actually part of the RT5033 MFD and needs
    its own of_match_table to probe properly.
    
    Also, given that it's independent of the MFD, there is actually
    no need to make the Kconfig depend on MFD_RT5033. Although the driver
    uses the shared <linux/mfd/rt5033.h> header, there is no compile
    or runtime dependency on the RT5033 MFD driver.
    
    Cc: Beomho Seo <beomho.seo@xxxxxxxxxxx>
    Cc: Chanwoo Choi <cw00.choi@xxxxxxxxxxx>
    Fixes: b847dd96e659 ("power: rt5033_battery: Add RT5033 Fuel gauge device driver")
    Signed-off-by: Stephan Gerhold <stephan@xxxxxxxxxxx>
    Signed-off-by: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
index d6fdc10c29f0..ffdb15278c10 100644
--- a/drivers/power/supply/Kconfig
+++ b/drivers/power/supply/Kconfig
@@ -643,7 +643,8 @@ config BATTERY_GOLDFISH
 
 config BATTERY_RT5033
 	tristate "RT5033 fuel gauge support"
-	depends on MFD_RT5033
+	depends on I2C
+	select REGMAP_I2C
 	help
 	  This adds support for battery fuel gauge in Richtek RT5033 PMIC.
 	  The fuelgauge calculates and determines the battery state of charge
diff --git a/drivers/power/supply/rt5033_battery.c b/drivers/power/supply/rt5033_battery.c
index d8667a9fc49b..6609f8cb8ca0 100644
--- a/drivers/power/supply/rt5033_battery.c
+++ b/drivers/power/supply/rt5033_battery.c
@@ -164,9 +164,16 @@ static const struct i2c_device_id rt5033_battery_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, rt5033_battery_id);
 
+static const struct of_device_id rt5033_battery_of_match[] = {
+	{ .compatible = "richtek,rt5033-battery", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, rt5033_battery_of_match);
+
 static struct i2c_driver rt5033_battery_driver = {
 	.driver = {
 		.name = "rt5033-battery",
+		.of_match_table = rt5033_battery_of_match,
 	},
 	.probe = rt5033_battery_probe,
 	.remove = rt5033_battery_remove,



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux