* [PATCH] mfd: rk808: Abstracting childs from the interface being used
@ 2024-06-21 5:33 Alexander Shiyan
2024-07-01 12:46 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Shiyan @ 2024-06-21 5:33 UTC (permalink / raw)
To: barebox; +Cc: Alexander Shiyan
The patch is part of the preparation for adding the SPI interface support.
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
drivers/mfd/rk808.c | 2 +-
drivers/regulator/rk808-regulator.c | 5 ++---
include/linux/mfd/rk808.h | 3 +--
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c
index 77493a7b5b..adb9d8ca0a 100644
--- a/drivers/mfd/rk808.c
+++ b/drivers/mfd/rk808.c
@@ -330,7 +330,7 @@ static int rk808_probe(struct device *dev)
return -EINVAL;
}
- rk808->i2c = client;
+ rk808->dev = &client->dev;
i2c_set_clientdata(client, rk808);
rk808->regmap = regmap_init_i2c_smbus(client, rk808->regmap_cfg);
diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c
index adb0262314..b361dae8cf 100644
--- a/drivers/regulator/rk808-regulator.c
+++ b/drivers/regulator/rk808-regulator.c
@@ -12,7 +12,6 @@
#include <driver.h>
#include <gpio.h>
#include <init.h>
-#include <i2c/i2c.h>
#include <of_device.h>
#include <linux/regmap.h>
#include <linux/regulator/of_regulator.h>
@@ -770,7 +769,7 @@ static int rk808_regulator_register(struct rk808 *rk808, int id,
struct of_regulator_match *match,
struct rk_regulator_cfg *cfg)
{
- struct device *dev = &rk808->i2c->dev;
+ struct device *dev = rk808->dev;
int ret;
if (!match->of_node) {
@@ -935,7 +934,7 @@ static int rk808_regulator_probe(struct device *dev)
return -EINVAL;
}
- ret = rk808_regulator_dt_parse(&rk808->i2c->dev, matches, nregulators);
+ ret = rk808_regulator_dt_parse(rk808->dev, matches, nregulators);
if (ret < 0)
return ret;
diff --git a/include/linux/mfd/rk808.h b/include/linux/mfd/rk808.h
index d8e465f885..7804ea80f6 100644
--- a/include/linux/mfd/rk808.h
+++ b/include/linux/mfd/rk808.h
@@ -707,12 +707,11 @@ enum {
RK818_ID = 0x8180,
};
-struct i2c_client;
struct regmap;
struct regmap_config;
struct rk808 {
- struct i2c_client *i2c;
+ struct device *dev;
struct regmap *regmap;
long variant;
const struct regmap_config *regmap_cfg;
--
2.39.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mfd: rk808: Abstracting childs from the interface being used
2024-06-21 5:33 [PATCH] mfd: rk808: Abstracting childs from the interface being used Alexander Shiyan
@ 2024-07-01 12:46 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-07-01 12:46 UTC (permalink / raw)
To: barebox, Alexander Shiyan
On Fri, 21 Jun 2024 08:33:11 +0300, Alexander Shiyan wrote:
> The patch is part of the preparation for adding the SPI interface support.
>
>
Applied, thanks!
[1/1] mfd: rk808: Abstracting childs from the interface being used
https://git.pengutronix.de/cgit/barebox/commit/?id=ba02270e1fc6 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-01 12:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-21 5:33 [PATCH] mfd: rk808: Abstracting childs from the interface being used Alexander Shiyan
2024-07-01 12:46 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox