未验证 提交 823543b7 编写于 作者: M Mark Brown

Merge series "mfd/rtc/regulator: Drop board file support for Samsung PMIC"...

Merge series "mfd/rtc/regulator: Drop board file support for Samsung PMIC" from Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>:

Hi,

The Samsung PMIC drivers since long time are used only on devicetree
platforms (Samsung Exynos) and there are no users with board files.

Drop the support for board files entirely and depend on OF for matching.

This makes the code smaller and simpler.

Dependencies
============
The MFD pieces are rebased on my previous sec-core dirver changes:
mfd: sec: Simplify getting of_device_id match data
https://lore.kernel.org/linux-samsung-soc/20210420113929.278082-1-krzysztof.kozlowski@canonical.com/T/#t

Applying - can be independent
=============================
The last RTC and regulator patches can be picked up independently via
regulator and rtc trees.  There are no board files currently, so the
code in these drivers is basically dead code and feature-bisection is
preserved.

Best regards,
Krzysztof

Krzysztof Kozlowski (9):
  mfd: sec: Drop support for board files and require devicetree
  mfd: sec: Remove unused cfg_pmic_irq in platform data
  mfd: sec: Remove unused device_type in platform data
  mfd: sec: Remove unused irq_base in platform data
  mfd: sec: Enable wakeup from suspend via devicetree property
  mfd: sec: Remove unused platform data members
  rtc: s5m: Remove reference to parent's device pdata
  regulator: s2mpa01: Drop initialization via platform data
  regulator: s2mps11: Drop initialization via platform data

 drivers/mfd/Kconfig              |  1 +
 drivers/mfd/sec-core.c           | 64 +++++---------------------------
 drivers/mfd/sec-irq.c            |  4 +-
 drivers/regulator/s2mpa01.c      |  4 --
 drivers/regulator/s2mps11.c      | 22 +----------
 drivers/rtc/rtc-s5m.c            |  6 ---
 include/linux/mfd/samsung/core.h | 33 ----------------
 7 files changed, 14 insertions(+), 120 deletions(-)

--
2.25.1
......@@ -340,7 +340,6 @@ static const struct regulator_desc regulators[] = {
static int s2mpa01_pmic_probe(struct platform_device *pdev)
{
struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
struct sec_platform_data *pdata = dev_get_platdata(iodev->dev);
struct regulator_config config = { };
struct s2mpa01_info *s2mpa01;
int i;
......@@ -356,9 +355,6 @@ static int s2mpa01_pmic_probe(struct platform_device *pdev)
for (i = 0; i < S2MPA01_REGULATOR_MAX; i++) {
struct regulator_dev *rdev;
if (pdata)
config.init_data = pdata->regulators[i].initdata;
rdev = devm_regulator_register(&pdev->dev,
&regulators[i], &config);
if (IS_ERR(rdev)) {
......
......@@ -1120,7 +1120,6 @@ static const struct regulator_desc s2mpu02_regulators[] = {
static int s2mps11_pmic_probe(struct platform_device *pdev)
{
struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
struct sec_platform_data *pdata = NULL;
struct of_regulator_match *rdata = NULL;
struct regulator_config config = { };
struct s2mps11_info *s2mps11;
......@@ -1171,17 +1170,6 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
if (!s2mps11->ext_control_gpiod)
return -ENOMEM;
if (!iodev->dev->of_node) {
if (iodev->pdata) {
pdata = iodev->pdata;
goto common_reg;
} else {
dev_err(pdev->dev.parent,
"Platform data or DT node not supplied\n");
return -ENODEV;
}
}
rdata = kcalloc(rdev_num, sizeof(*rdata), GFP_KERNEL);
if (!rdata)
return -ENOMEM;
......@@ -1193,7 +1181,6 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
if (ret)
goto out;
common_reg:
platform_set_drvdata(pdev, s2mps11);
config.dev = &pdev->dev;
......@@ -1202,13 +1189,8 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
for (i = 0; i < rdev_num; i++) {
struct regulator_dev *regulator;
if (pdata) {
config.init_data = pdata->regulators[i].initdata;
config.of_node = pdata->regulators[i].reg_node;
} else {
config.init_data = rdata[i].init_data;
config.of_node = rdata[i].of_node;
}
config.init_data = rdata[i].init_data;
config.of_node = rdata[i].of_node;
config.ena_gpiod = s2mps11->ext_control_gpiod[i];
/*
* Hand the GPIO descriptor management over to the regulator
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册