2023-01-31 18:33:50

by David Virag

[permalink] [raw]
Subject: [PATCH 0/2] Remove SEC S5M MFDs with no compatibles

The S5M8751 and S5M8763 MFD PMICs have no compatibles, and board file
support for them was removed, resulting in essentially no way for these
chips to be used anymore (unless they get dt compatibles).
They seemingly have never been in any board files upstream and I only
found references to the SM8751 being on the SMDK6450 board (which has
been unsupported for many years now) in a downstream Samsung Galaxy S2
kernel tree.

The patches should be applied in order.

David Virag (2):
mfd: sec: Remove PMICs without compatibles
rtc: s5m: Drop S5M8763 support

drivers/mfd/sec-core.c | 46 ---------------
drivers/mfd/sec-irq.c | 89 ----------------------------
drivers/rtc/rtc-s5m.c | 82 +-------------------------
include/linux/mfd/samsung/core.h | 2 -
include/linux/mfd/samsung/irq.h | 50 ----------------
include/linux/mfd/samsung/s5m8763.h | 90 -----------------------------
6 files changed, 3 insertions(+), 356 deletions(-)
delete mode 100644 include/linux/mfd/samsung/s5m8763.h

--
2.39.0



2023-01-31 18:33:56

by David Virag

[permalink] [raw]
Subject: [PATCH 2/2] rtc: s5m: Drop S5M8763 support

The S5M8763 MFD has no device tree compatible, and since board file
support for it was removed, there's no way to use this MFD. After
removing the remaining code for it from the MFD driver, also remove
support for it in the s5m RTC driver, and all remaining references to
it.

Signed-off-by: David Virag <[email protected]>
---
drivers/rtc/rtc-s5m.c | 82 ++------------------------------
include/linux/mfd/samsung/core.h | 1 -
include/linux/mfd/samsung/irq.h | 50 -------------------
3 files changed, 3 insertions(+), 130 deletions(-)

diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c
index 4243fe6d3842..dad294a0ce2a 100644
--- a/drivers/rtc/rtc-s5m.c
+++ b/drivers/rtc/rtc-s5m.c
@@ -85,7 +85,7 @@ struct s5m_rtc_reg_config {
unsigned int write_alarm_udr_mask;
};

-/* Register map for S5M8763 and S5M8767 */
+/* Register map for S5M8767 */
static const struct s5m_rtc_reg_config s5m_rtc_regs = {
.regs_count = 8,
.time = S5M_RTC_SEC,
@@ -236,7 +236,6 @@ static int s5m_check_peding_alarm_interrupt(struct s5m_rtc_info *info,

switch (info->device_type) {
case S5M8767X:
- case S5M8763X:
ret = regmap_read(info->regmap, S5M_RTC_STATUS, &val);
val &= S5M_ALARM0_STATUS;
break;
@@ -299,7 +298,6 @@ static int s5m8767_rtc_set_alarm_reg(struct s5m_rtc_info *info)

data |= info->regs->write_alarm_udr_mask;
switch (info->device_type) {
- case S5M8763X:
case S5M8767X:
data &= ~S5M_RTC_TIME_EN_MASK;
break;
@@ -329,38 +327,6 @@ static int s5m8767_rtc_set_alarm_reg(struct s5m_rtc_info *info)
return ret;
}

-static void s5m8763_data_to_tm(u8 *data, struct rtc_time *tm)
-{
- tm->tm_sec = bcd2bin(data[RTC_SEC]);
- tm->tm_min = bcd2bin(data[RTC_MIN]);
-
- if (data[RTC_HOUR] & HOUR_12) {
- tm->tm_hour = bcd2bin(data[RTC_HOUR] & 0x1f);
- if (data[RTC_HOUR] & HOUR_PM)
- tm->tm_hour += 12;
- } else {
- tm->tm_hour = bcd2bin(data[RTC_HOUR] & 0x3f);
- }
-
- tm->tm_wday = data[RTC_WEEKDAY] & 0x07;
- tm->tm_mday = bcd2bin(data[RTC_DATE]);
- tm->tm_mon = bcd2bin(data[RTC_MONTH]);
- tm->tm_year = bcd2bin(data[RTC_YEAR1]) + bcd2bin(data[RTC_YEAR2]) * 100;
- tm->tm_year -= 1900;
-}
-
-static void s5m8763_tm_to_data(struct rtc_time *tm, u8 *data)
-{
- data[RTC_SEC] = bin2bcd(tm->tm_sec);
- data[RTC_MIN] = bin2bcd(tm->tm_min);
- data[RTC_HOUR] = bin2bcd(tm->tm_hour);
- data[RTC_WEEKDAY] = tm->tm_wday;
- data[RTC_DATE] = bin2bcd(tm->tm_mday);
- data[RTC_MONTH] = bin2bcd(tm->tm_mon);
- data[RTC_YEAR1] = bin2bcd(tm->tm_year % 100);
- data[RTC_YEAR2] = bin2bcd((tm->tm_year + 1900) / 100);
-}
-
static int s5m_rtc_read_time(struct device *dev, struct rtc_time *tm)
{
struct s5m_rtc_info *info = dev_get_drvdata(dev);
@@ -385,10 +351,6 @@ static int s5m_rtc_read_time(struct device *dev, struct rtc_time *tm)
return ret;

switch (info->device_type) {
- case S5M8763X:
- s5m8763_data_to_tm(data, tm);
- break;
-
case S5M8767X:
case S2MPS15X:
case S2MPS14X:
@@ -412,9 +374,6 @@ static int s5m_rtc_set_time(struct device *dev, struct rtc_time *tm)
int ret = 0;

switch (info->device_type) {
- case S5M8763X:
- s5m8763_tm_to_data(tm, data);
- break;
case S5M8767X:
case S2MPS15X:
case S2MPS14X:
@@ -444,7 +403,6 @@ static int s5m_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{
struct s5m_rtc_info *info = dev_get_drvdata(dev);
u8 data[RTC_MAX_NUM_TIME_REGS];
- unsigned int val;
int ret, i;

ret = regmap_bulk_read(info->regmap, info->regs->alarm0, data,
@@ -453,15 +411,6 @@ static int s5m_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
return ret;

switch (info->device_type) {
- case S5M8763X:
- s5m8763_data_to_tm(data, &alrm->time);
- ret = regmap_read(info->regmap, S5M_ALARM0_CONF, &val);
- if (ret < 0)
- return ret;
-
- alrm->enabled = !!val;
- break;
-
case S5M8767X:
case S2MPS15X:
case S2MPS14X:
@@ -500,10 +449,6 @@ static int s5m_rtc_stop_alarm(struct s5m_rtc_info *info)
dev_dbg(info->dev, "%s: %ptR(%d)\n", __func__, &tm, tm.tm_wday);

switch (info->device_type) {
- case S5M8763X:
- ret = regmap_write(info->regmap, S5M_ALARM0_CONF, 0);
- break;
-
case S5M8767X:
case S2MPS15X:
case S2MPS14X:
@@ -531,7 +476,6 @@ static int s5m_rtc_start_alarm(struct s5m_rtc_info *info)
{
int ret;
u8 data[RTC_MAX_NUM_TIME_REGS];
- u8 alarm0_conf;
struct rtc_time tm;

ret = regmap_bulk_read(info->regmap, info->regs->alarm0, data,
@@ -543,11 +487,6 @@ static int s5m_rtc_start_alarm(struct s5m_rtc_info *info)
dev_dbg(info->dev, "%s: %ptR(%d)\n", __func__, &tm, tm.tm_wday);

switch (info->device_type) {
- case S5M8763X:
- alarm0_conf = 0x77;
- ret = regmap_write(info->regmap, S5M_ALARM0_CONF, alarm0_conf);
- break;
-
case S5M8767X:
case S2MPS15X:
case S2MPS14X:
@@ -585,10 +524,6 @@ static int s5m_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
int ret;

switch (info->device_type) {
- case S5M8763X:
- s5m8763_tm_to_data(&alrm->time, data);
- break;
-
case S5M8767X:
case S2MPS15X:
case S2MPS14X:
@@ -655,7 +590,6 @@ static int s5m8767_rtc_init_reg(struct s5m_rtc_info *info)
int ret;

switch (info->device_type) {
- case S5M8763X:
case S5M8767X:
/* UDR update time. Default of 7.32 ms is too long. */
ret = regmap_update_bits(info->regmap, S5M_RTC_UDR_CON,
@@ -729,11 +663,6 @@ static int s5m_rtc_probe(struct platform_device *pdev)
info->regs = &s2mps13_rtc_regs;
alarm_irq = S2MPS14_IRQ_RTCA0;
break;
- case S5M8763X:
- regmap_cfg = &s5m_rtc_regmap_config;
- info->regs = &s5m_rtc_regs;
- alarm_irq = S5M8763_IRQ_ALARM0;
- break;
case S5M8767X:
regmap_cfg = &s5m_rtc_regmap_config;
info->regs = &s5m_rtc_regs;
@@ -786,13 +715,8 @@ static int s5m_rtc_probe(struct platform_device *pdev)

info->rtc_dev->ops = &s5m_rtc_ops;

- if (info->device_type == S5M8763X) {
- info->rtc_dev->range_min = RTC_TIMESTAMP_BEGIN_0000;
- info->rtc_dev->range_max = RTC_TIMESTAMP_END_9999;
- } else {
- info->rtc_dev->range_min = RTC_TIMESTAMP_BEGIN_2000;
- info->rtc_dev->range_max = RTC_TIMESTAMP_END_2099;
- }
+ info->rtc_dev->range_min = RTC_TIMESTAMP_BEGIN_2000;
+ info->rtc_dev->range_max = RTC_TIMESTAMP_END_2099;

if (!info->irq) {
clear_bit(RTC_FEATURE_ALARM, info->rtc_dev->features);
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h
index 07aae649a86f..a212b9f72bc9 100644
--- a/include/linux/mfd/samsung/core.h
+++ b/include/linux/mfd/samsung/core.h
@@ -36,7 +36,6 @@
struct gpio_desc;

enum sec_device_type {
- S5M8763X,
S5M8767X,
S2MPA01,
S2MPS11X,
diff --git a/include/linux/mfd/samsung/irq.h b/include/linux/mfd/samsung/irq.h
index 6cfe4201a106..3fd2775eb9bb 100644
--- a/include/linux/mfd/samsung/irq.h
+++ b/include/linux/mfd/samsung/irq.h
@@ -194,54 +194,4 @@ enum s5m8767_irq {
#define S5M8767_IRQ_RTC1S_MASK (1 << 4)
#define S5M8767_IRQ_WTSR_MASK (1 << 5)

-enum s5m8763_irq {
- S5M8763_IRQ_DCINF,
- S5M8763_IRQ_DCINR,
- S5M8763_IRQ_JIGF,
- S5M8763_IRQ_JIGR,
- S5M8763_IRQ_PWRONF,
- S5M8763_IRQ_PWRONR,
-
- S5M8763_IRQ_WTSREVNT,
- S5M8763_IRQ_SMPLEVNT,
- S5M8763_IRQ_ALARM1,
- S5M8763_IRQ_ALARM0,
-
- S5M8763_IRQ_ONKEY1S,
- S5M8763_IRQ_TOPOFFR,
- S5M8763_IRQ_DCINOVPR,
- S5M8763_IRQ_CHGRSTF,
- S5M8763_IRQ_DONER,
- S5M8763_IRQ_CHGFAULT,
-
- S5M8763_IRQ_LOBAT1,
- S5M8763_IRQ_LOBAT2,
-
- S5M8763_IRQ_NR,
-};
-
-#define S5M8763_IRQ_DCINF_MASK (1 << 2)
-#define S5M8763_IRQ_DCINR_MASK (1 << 3)
-#define S5M8763_IRQ_JIGF_MASK (1 << 4)
-#define S5M8763_IRQ_JIGR_MASK (1 << 5)
-#define S5M8763_IRQ_PWRONF_MASK (1 << 6)
-#define S5M8763_IRQ_PWRONR_MASK (1 << 7)
-
-#define S5M8763_IRQ_WTSREVNT_MASK (1 << 0)
-#define S5M8763_IRQ_SMPLEVNT_MASK (1 << 1)
-#define S5M8763_IRQ_ALARM1_MASK (1 << 2)
-#define S5M8763_IRQ_ALARM0_MASK (1 << 3)
-
-#define S5M8763_IRQ_ONKEY1S_MASK (1 << 0)
-#define S5M8763_IRQ_TOPOFFR_MASK (1 << 2)
-#define S5M8763_IRQ_DCINOVPR_MASK (1 << 3)
-#define S5M8763_IRQ_CHGRSTF_MASK (1 << 4)
-#define S5M8763_IRQ_DONER_MASK (1 << 5)
-#define S5M8763_IRQ_CHGFAULT_MASK (1 << 7)
-
-#define S5M8763_IRQ_LOBAT1_MASK (1 << 0)
-#define S5M8763_IRQ_LOBAT2_MASK (1 << 1)
-
-#define S5M8763_ENRAMP (1 << 4)
-
#endif /* __LINUX_MFD_SEC_IRQ_H */
--
2.39.0


2023-01-31 18:33:58

by David Virag

[permalink] [raw]
Subject: [PATCH 1/2] mfd: sec: Remove PMICs without compatibles

The S5M8751 and S5M8763 PMIC chips have no corresponding compatible
values, so since board file support was removed for this driver, there
is no way to specify these PMICs as present in boards anymore.
Remove leftovers of these chips since it's dead code.

Signed-off-by: David Virag <[email protected]>
---
drivers/mfd/sec-core.c | 46 ---------------
drivers/mfd/sec-irq.c | 89 ----------------------------
include/linux/mfd/samsung/core.h | 1 -
include/linux/mfd/samsung/s5m8763.h | 90 -----------------------------
4 files changed, 226 deletions(-)
delete mode 100644 include/linux/mfd/samsung/s5m8763.h

diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
index b03edda56009..c2d0ed496959 100644
--- a/drivers/mfd/sec-core.c
+++ b/drivers/mfd/sec-core.c
@@ -24,22 +24,9 @@
#include <linux/mfd/samsung/s2mps14.h>
#include <linux/mfd/samsung/s2mps15.h>
#include <linux/mfd/samsung/s2mpu02.h>
-#include <linux/mfd/samsung/s5m8763.h>
#include <linux/mfd/samsung/s5m8767.h>
#include <linux/regmap.h>

-static const struct mfd_cell s5m8751_devs[] = {
- { .name = "s5m8751-pmic", },
- { .name = "s5m-charger", },
- { .name = "s5m8751-codec", },
-};
-
-static const struct mfd_cell s5m8763_devs[] = {
- { .name = "s5m8763-pmic", },
- { .name = "s5m-rtc", },
- { .name = "s5m-charger", },
-};
-
static const struct mfd_cell s5m8767_devs[] = {
{ .name = "s5m8767-pmic", },
{ .name = "s5m-rtc", },
@@ -158,19 +145,6 @@ static bool s2mpu02_volatile(struct device *dev, unsigned int reg)
}
}

-static bool s5m8763_volatile(struct device *dev, unsigned int reg)
-{
- switch (reg) {
- case S5M8763_REG_IRQM1:
- case S5M8763_REG_IRQM2:
- case S5M8763_REG_IRQM3:
- case S5M8763_REG_IRQM4:
- return false;
- default:
- return true;
- }
-}
-
static const struct regmap_config sec_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
@@ -230,15 +204,6 @@ static const struct regmap_config s2mpu02_regmap_config = {
.cache_type = REGCACHE_FLAT,
};

-static const struct regmap_config s5m8763_regmap_config = {
- .reg_bits = 8,
- .val_bits = 8,
-
- .max_register = S5M8763_REG_LBCNFG2,
- .volatile_reg = s5m8763_volatile,
- .cache_type = REGCACHE_FLAT,
-};
-
static const struct regmap_config s5m8767_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
@@ -348,9 +313,6 @@ static int sec_pmic_probe(struct i2c_client *i2c)
case S2MPS15X:
regmap = &s2mps15_regmap_config;
break;
- case S5M8763X:
- regmap = &s5m8763_regmap_config;
- break;
case S5M8767X:
regmap = &s5m8767_regmap_config;
break;
@@ -375,14 +337,6 @@ static int sec_pmic_probe(struct i2c_client *i2c)
pm_runtime_set_active(sec_pmic->dev);

switch (sec_pmic->device_type) {
- case S5M8751X:
- sec_devs = s5m8751_devs;
- num_sec_devs = ARRAY_SIZE(s5m8751_devs);
- break;
- case S5M8763X:
- sec_devs = s5m8763_devs;
- num_sec_devs = ARRAY_SIZE(s5m8763_devs);
- break;
case S5M8767X:
sec_devs = s5m8767_devs;
num_sec_devs = ARRAY_SIZE(s5m8767_devs);
diff --git a/drivers/mfd/sec-irq.c b/drivers/mfd/sec-irq.c
index f5f59fdc72fe..e191aeb0c07c 100644
--- a/drivers/mfd/sec-irq.c
+++ b/drivers/mfd/sec-irq.c
@@ -14,7 +14,6 @@
#include <linux/mfd/samsung/s2mps11.h>
#include <linux/mfd/samsung/s2mps14.h>
#include <linux/mfd/samsung/s2mpu02.h>
-#include <linux/mfd/samsung/s5m8763.h>
#include <linux/mfd/samsung/s5m8767.h>

static const struct regmap_irq s2mps11_irqs[] = {
@@ -297,81 +296,6 @@ static const struct regmap_irq s5m8767_irqs[] = {
},
};

-static const struct regmap_irq s5m8763_irqs[] = {
- [S5M8763_IRQ_DCINF] = {
- .reg_offset = 0,
- .mask = S5M8763_IRQ_DCINF_MASK,
- },
- [S5M8763_IRQ_DCINR] = {
- .reg_offset = 0,
- .mask = S5M8763_IRQ_DCINR_MASK,
- },
- [S5M8763_IRQ_JIGF] = {
- .reg_offset = 0,
- .mask = S5M8763_IRQ_JIGF_MASK,
- },
- [S5M8763_IRQ_JIGR] = {
- .reg_offset = 0,
- .mask = S5M8763_IRQ_JIGR_MASK,
- },
- [S5M8763_IRQ_PWRONF] = {
- .reg_offset = 0,
- .mask = S5M8763_IRQ_PWRONF_MASK,
- },
- [S5M8763_IRQ_PWRONR] = {
- .reg_offset = 0,
- .mask = S5M8763_IRQ_PWRONR_MASK,
- },
- [S5M8763_IRQ_WTSREVNT] = {
- .reg_offset = 1,
- .mask = S5M8763_IRQ_WTSREVNT_MASK,
- },
- [S5M8763_IRQ_SMPLEVNT] = {
- .reg_offset = 1,
- .mask = S5M8763_IRQ_SMPLEVNT_MASK,
- },
- [S5M8763_IRQ_ALARM1] = {
- .reg_offset = 1,
- .mask = S5M8763_IRQ_ALARM1_MASK,
- },
- [S5M8763_IRQ_ALARM0] = {
- .reg_offset = 1,
- .mask = S5M8763_IRQ_ALARM0_MASK,
- },
- [S5M8763_IRQ_ONKEY1S] = {
- .reg_offset = 2,
- .mask = S5M8763_IRQ_ONKEY1S_MASK,
- },
- [S5M8763_IRQ_TOPOFFR] = {
- .reg_offset = 2,
- .mask = S5M8763_IRQ_TOPOFFR_MASK,
- },
- [S5M8763_IRQ_DCINOVPR] = {
- .reg_offset = 2,
- .mask = S5M8763_IRQ_DCINOVPR_MASK,
- },
- [S5M8763_IRQ_CHGRSTF] = {
- .reg_offset = 2,
- .mask = S5M8763_IRQ_CHGRSTF_MASK,
- },
- [S5M8763_IRQ_DONER] = {
- .reg_offset = 2,
- .mask = S5M8763_IRQ_DONER_MASK,
- },
- [S5M8763_IRQ_CHGFAULT] = {
- .reg_offset = 2,
- .mask = S5M8763_IRQ_CHGFAULT_MASK,
- },
- [S5M8763_IRQ_LOBAT1] = {
- .reg_offset = 3,
- .mask = S5M8763_IRQ_LOBAT1_MASK,
- },
- [S5M8763_IRQ_LOBAT2] = {
- .reg_offset = 3,
- .mask = S5M8763_IRQ_LOBAT2_MASK,
- },
-};
-
static const struct regmap_irq_chip s2mps11_irq_chip = {
.name = "s2mps11",
.irqs = s2mps11_irqs,
@@ -425,16 +349,6 @@ static const struct regmap_irq_chip s5m8767_irq_chip = {
.ack_base = S5M8767_REG_INT1,
};

-static const struct regmap_irq_chip s5m8763_irq_chip = {
- .name = "s5m8763",
- .irqs = s5m8763_irqs,
- .num_irqs = ARRAY_SIZE(s5m8763_irqs),
- .num_regs = 4,
- .status_base = S5M8763_REG_IRQ1,
- .mask_base = S5M8763_REG_IRQM1,
- .ack_base = S5M8763_REG_IRQ1,
-};
-
int sec_irq_init(struct sec_pmic_dev *sec_pmic)
{
int ret = 0;
@@ -448,9 +362,6 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic)
}

switch (type) {
- case S5M8763X:
- sec_irq_chip = &s5m8763_irq_chip;
- break;
case S5M8767X:
sec_irq_chip = &s5m8767_irq_chip;
break;
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h
index f92fe090473d..07aae649a86f 100644
--- a/include/linux/mfd/samsung/core.h
+++ b/include/linux/mfd/samsung/core.h
@@ -36,7 +36,6 @@
struct gpio_desc;

enum sec_device_type {
- S5M8751X,
S5M8763X,
S5M8767X,
S2MPA01,
diff --git a/include/linux/mfd/samsung/s5m8763.h b/include/linux/mfd/samsung/s5m8763.h
deleted file mode 100644
index c534f086ca16..000000000000
--- a/include/linux/mfd/samsung/s5m8763.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd
- * http://www.samsung.com
- */
-
-#ifndef __LINUX_MFD_S5M8763_H
-#define __LINUX_MFD_S5M8763_H
-
-/* S5M8763 registers */
-enum s5m8763_reg {
- S5M8763_REG_IRQ1,
- S5M8763_REG_IRQ2,
- S5M8763_REG_IRQ3,
- S5M8763_REG_IRQ4,
- S5M8763_REG_IRQM1,
- S5M8763_REG_IRQM2,
- S5M8763_REG_IRQM3,
- S5M8763_REG_IRQM4,
- S5M8763_REG_STATUS1,
- S5M8763_REG_STATUS2,
- S5M8763_REG_STATUSM1,
- S5M8763_REG_STATUSM2,
- S5M8763_REG_CHGR1,
- S5M8763_REG_CHGR2,
- S5M8763_REG_LDO_ACTIVE_DISCHARGE1,
- S5M8763_REG_LDO_ACTIVE_DISCHARGE2,
- S5M8763_REG_BUCK_ACTIVE_DISCHARGE3,
- S5M8763_REG_ONOFF1,
- S5M8763_REG_ONOFF2,
- S5M8763_REG_ONOFF3,
- S5M8763_REG_ONOFF4,
- S5M8763_REG_BUCK1_VOLTAGE1,
- S5M8763_REG_BUCK1_VOLTAGE2,
- S5M8763_REG_BUCK1_VOLTAGE3,
- S5M8763_REG_BUCK1_VOLTAGE4,
- S5M8763_REG_BUCK2_VOLTAGE1,
- S5M8763_REG_BUCK2_VOLTAGE2,
- S5M8763_REG_BUCK3,
- S5M8763_REG_BUCK4,
- S5M8763_REG_LDO1_LDO2,
- S5M8763_REG_LDO3,
- S5M8763_REG_LDO4,
- S5M8763_REG_LDO5,
- S5M8763_REG_LDO6,
- S5M8763_REG_LDO7,
- S5M8763_REG_LDO7_LDO8,
- S5M8763_REG_LDO9_LDO10,
- S5M8763_REG_LDO11,
- S5M8763_REG_LDO12,
- S5M8763_REG_LDO13,
- S5M8763_REG_LDO14,
- S5M8763_REG_LDO15,
- S5M8763_REG_LDO16,
- S5M8763_REG_BKCHR,
- S5M8763_REG_LBCNFG1,
- S5M8763_REG_LBCNFG2,
-};
-
-/* S5M8763 regulator ids */
-enum s5m8763_regulators {
- S5M8763_LDO1,
- S5M8763_LDO2,
- S5M8763_LDO3,
- S5M8763_LDO4,
- S5M8763_LDO5,
- S5M8763_LDO6,
- S5M8763_LDO7,
- S5M8763_LDO8,
- S5M8763_LDO9,
- S5M8763_LDO10,
- S5M8763_LDO11,
- S5M8763_LDO12,
- S5M8763_LDO13,
- S5M8763_LDO14,
- S5M8763_LDO15,
- S5M8763_LDO16,
- S5M8763_BUCK1,
- S5M8763_BUCK2,
- S5M8763_BUCK3,
- S5M8763_BUCK4,
- S5M8763_AP_EN32KHZ,
- S5M8763_CP_EN32KHZ,
- S5M8763_ENCHGVI,
- S5M8763_ESAFEUSB1,
- S5M8763_ESAFEUSB2,
-};
-
-#define S5M8763_ENRAMP (1 << 4)
-#endif /* __LINUX_MFD_S5M8763_H */
--
2.39.0


2023-02-02 11:25:04

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/2] mfd: sec: Remove PMICs without compatibles

On 31/01/2023 19:30, David Virag wrote:
> The S5M8751 and S5M8763 PMIC chips have no corresponding compatible
> values, so since board file support was removed for this driver, there
> is no way to specify these PMICs as present in boards anymore.
> Remove leftovers of these chips since it's dead code.
>
> Signed-off-by: David Virag <[email protected]>
> ---

Thank you for your patch. There is something to discuss/improve.

> int sec_irq_init(struct sec_pmic_dev *sec_pmic)
> {
> int ret = 0;
> @@ -448,9 +362,6 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic)
> }
>
> switch (type) {
> - case S5M8763X:
> - sec_irq_chip = &s5m8763_irq_chip;
> - break;
> case S5M8767X:
> sec_irq_chip = &s5m8767_irq_chip;
> break;
> diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h
> index f92fe090473d..07aae649a86f 100644
> --- a/include/linux/mfd/samsung/core.h
> +++ b/include/linux/mfd/samsung/core.h
> @@ -36,7 +36,6 @@
> struct gpio_desc;
>
> enum sec_device_type {
> - S5M8751X,
> S5M8763X,

Drop also S5M8763X

> S5M8767X,
> S2MPA01,
> diff --git a/include/linux/mfd/samsung/s5m8763.h b/include/linux/mfd/samsung/s5m8763.h
> deleted file mode 100644


Best regards,
Krzysztof


2023-02-02 11:28:17

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/2] rtc: s5m: Drop S5M8763 support

On 31/01/2023 19:30, David Virag wrote:
> The S5M8763 MFD has no device tree compatible, and since board file
> support for it was removed, there's no way to use this MFD. After
> removing the remaining code for it from the MFD driver, also remove
> support for it in the s5m RTC driver, and all remaining references to
> it.
>
> Signed-off-by: David Virag <[email protected]>


Reviewed-by: Krzysztof Kozlowski <[email protected]>


Best regards,
Krzysztof


2023-02-02 11:28:30

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/2] mfd: sec: Remove PMICs without compatibles

On 31/01/2023 19:30, David Virag wrote:
> The S5M8751 and S5M8763 PMIC chips have no corresponding compatible
> values, so since board file support was removed for this driver, there
> is no way to specify these PMICs as present in boards anymore.
> Remove leftovers of these chips since it's dead code.
>
> Signed-off-by: David Virag <[email protected]>

I see removal of define in patch 2, so:


Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2023-02-02 12:11:35

by David Virag

[permalink] [raw]
Subject: Re: [PATCH 1/2] mfd: sec: Remove PMICs without compatibles

On Thu, 2023-02-02 at 12:24 +0100, Krzysztof Kozlowski wrote:
> On 31/01/2023 19:30, David Virag wrote:
> > The S5M8751 and S5M8763 PMIC chips have no corresponding compatible
> > values, so since board file support was removed for this driver,
> > there
> > is no way to specify these PMICs as present in boards anymore.
> > Remove leftovers of these chips since it's dead code.
> >
> > Signed-off-by: David Virag <[email protected]>
> > ---
>
> Thank you for your patch. There is something to discuss/improve.
>
> >  int sec_irq_init(struct sec_pmic_dev *sec_pmic)
> >  {
> >         int ret = 0;
> > @@ -448,9 +362,6 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic)
> >         }
> >  
> >         switch (type) {
> > -       case S5M8763X:
> > -               sec_irq_chip = &s5m8763_irq_chip;
> > -               break;
> >         case S5M8767X:
> >                 sec_irq_chip = &s5m8767_irq_chip;
> >                 break;
> > diff --git a/include/linux/mfd/samsung/core.h
> > b/include/linux/mfd/samsung/core.h
> > index f92fe090473d..07aae649a86f 100644
> > --- a/include/linux/mfd/samsung/core.h
> > +++ b/include/linux/mfd/samsung/core.h
> > @@ -36,7 +36,6 @@
> >  struct gpio_desc;
> >  
> >  enum sec_device_type {
> > -       S5M8751X,
> >         S5M8763X,
>
> Drop also S5M8763X

Dropping it in the first patch would lead to build errors in the RTC
driver, so I do it in the second patch, but I see that you already
realized this in the 2nd reply.

>
> >         S5M8767X,
> >         S2MPA01,
> > diff --git a/include/linux/mfd/samsung/s5m8763.h
> > b/include/linux/mfd/samsung/s5m8763.h
> > deleted file mode 100644
>
>
> Best regards,
> Krzysztof
>

Best regards,
David

2023-02-23 14:15:53

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 2/2] rtc: s5m: Drop S5M8763 support

On Tue, 31 Jan 2023, David Virag wrote:

> The S5M8763 MFD has no device tree compatible, and since board file
> support for it was removed, there's no way to use this MFD. After
> removing the remaining code for it from the MFD driver, also remove
> support for it in the s5m RTC driver, and all remaining references to
> it.
>
> Signed-off-by: David Virag <[email protected]>
> ---
> drivers/rtc/rtc-s5m.c | 82 ++------------------------------

> include/linux/mfd/samsung/core.h | 1 -
> include/linux/mfd/samsung/irq.h | 50 -------------------

Acked-by: Lee Jones <[email protected]>

> 3 files changed, 3 insertions(+), 130 deletions(-)

--
Lee Jones [李琼斯]

2023-02-23 14:18:55

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 2/2] rtc: s5m: Drop S5M8763 support

On Thu, 23 Feb 2023, Lee Jones wrote:

> On Tue, 31 Jan 2023, David Virag wrote:
>
> > The S5M8763 MFD has no device tree compatible, and since board file
> > support for it was removed, there's no way to use this MFD. After
> > removing the remaining code for it from the MFD driver, also remove
> > support for it in the s5m RTC driver, and all remaining references to
> > it.
> >
> > Signed-off-by: David Virag <[email protected]>
> > ---
> > drivers/rtc/rtc-s5m.c | 82 ++------------------------------
>
> > include/linux/mfd/samsung/core.h | 1 -
> > include/linux/mfd/samsung/irq.h | 50 -------------------
>
> Acked-by: Lee Jones <[email protected]>

Actually, looks like this should probably go in via MFD, so I need an
RTC Ack.

> > 3 files changed, 3 insertions(+), 130 deletions(-)

--
Lee Jones [李琼斯]

2023-02-23 15:03:37

by Alexandre Belloni

[permalink] [raw]
Subject: Re: [PATCH 2/2] rtc: s5m: Drop S5M8763 support

On 23/02/2023 14:18:10+0000, Lee Jones wrote:
> On Thu, 23 Feb 2023, Lee Jones wrote:
>
> > On Tue, 31 Jan 2023, David Virag wrote:
> >
> > > The S5M8763 MFD has no device tree compatible, and since board file
> > > support for it was removed, there's no way to use this MFD. After
> > > removing the remaining code for it from the MFD driver, also remove
> > > support for it in the s5m RTC driver, and all remaining references to
> > > it.
> > >
> > > Signed-off-by: David Virag <[email protected]>
> > > ---
> > > drivers/rtc/rtc-s5m.c | 82 ++------------------------------
> >
> > > include/linux/mfd/samsung/core.h | 1 -
> > > include/linux/mfd/samsung/irq.h | 50 -------------------
> >
> > Acked-by: Lee Jones <[email protected]>
>
> Actually, looks like this should probably go in via MFD, so I need an
> RTC Ack.

There were comments on 1/2 so I was expecting a v2.


--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

2023-02-23 15:11:46

by David Virag

[permalink] [raw]
Subject: Re: [PATCH 2/2] rtc: s5m: Drop S5M8763 support

On Thu, 2023-02-23 at 16:03 +0100, Alexandre Belloni wrote:
> On 23/02/2023 14:18:10+0000, Lee Jones wrote:
> > On Thu, 23 Feb 2023, Lee Jones wrote:
> >
> > > On Tue, 31 Jan 2023, David Virag wrote:
> > >
> > > > The S5M8763 MFD has no device tree compatible, and since board
> > > > file
> > > > support for it was removed, there's no way to use this MFD.
> > > > After
> > > > removing the remaining code for it from the MFD driver, also
> > > > remove
> > > > support for it in the s5m RTC driver, and all remaining
> > > > references to
> > > > it.
> > > >
> > > > Signed-off-by: David Virag <[email protected]>
> > > > ---
> > > >  drivers/rtc/rtc-s5m.c            | 82 ++----------------------
> > > > --------
> > >
> > > >  include/linux/mfd/samsung/core.h |  1 -
> > > >  include/linux/mfd/samsung/irq.h  | 50 -------------------
> > >
> > > Acked-by: Lee Jones <[email protected]>
> >
> > Actually, looks like this should probably go in via MFD, so I need
> > an
> > RTC Ack.
>
> There were comments on 1/2 so I was expecting a v2.
>
>

Krzysztof commented there about the removal of an enum value that's
actually removed in 2/2 since it would break the RTC driver if it was
removed in 1/2. He realised that and corrected himself. No need for v2
AFAIK, unless something else is found.

The patch should definitely go via one tree (or by waiting for it to be
merged upstream, I guess) since the order has to be kept.

Best regards,
David

2023-02-23 15:22:51

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/2] rtc: s5m: Drop S5M8763 support

On 23/02/2023 16:11, David Virag wrote:
> On Thu, 2023-02-23 at 16:03 +0100, Alexandre Belloni wrote:
>> On 23/02/2023 14:18:10+0000, Lee Jones wrote:
>>> On Thu, 23 Feb 2023, Lee Jones wrote:
>>>
>>>> On Tue, 31 Jan 2023, David Virag wrote:
>>>>
>>>>> The S5M8763 MFD has no device tree compatible, and since board
>>>>> file
>>>>> support for it was removed, there's no way to use this MFD.
>>>>> After
>>>>> removing the remaining code for it from the MFD driver, also
>>>>> remove
>>>>> support for it in the s5m RTC driver, and all remaining
>>>>> references to
>>>>> it.
>>>>>
>>>>> Signed-off-by: David Virag <[email protected]>
>>>>> ---
>>>>>  drivers/rtc/rtc-s5m.c            | 82 ++----------------------
>>>>> --------
>>>>
>>>>>  include/linux/mfd/samsung/core.h |  1 -
>>>>>  include/linux/mfd/samsung/irq.h  | 50 -------------------
>>>>
>>>> Acked-by: Lee Jones <[email protected]>
>>>
>>> Actually, looks like this should probably go in via MFD, so I need
>>> an
>>> RTC Ack.
>>
>> There were comments on 1/2 so I was expecting a v2.
>>
>>
>
> Krzysztof commented there about the removal of an enum value that's
> actually removed in 2/2 since it would break the RTC driver if it was
> removed in 1/2. He realised that and corrected himself. No need for v2
> AFAIK, unless something else is found.

Yep. I also gave review tags for both of these.

Best regards,
Krzysztof


2023-03-06 20:58:20

by Alexandre Belloni

[permalink] [raw]
Subject: Re: [PATCH 2/2] rtc: s5m: Drop S5M8763 support

On 31/01/2023 19:30:07+0100, David Virag wrote:
> The S5M8763 MFD has no device tree compatible, and since board file
> support for it was removed, there's no way to use this MFD. After
> removing the remaining code for it from the MFD driver, also remove
> support for it in the s5m RTC driver, and all remaining references to
> it.
>
> Signed-off-by: David Virag <[email protected]>
Acked-by: Alexandre Belloni <[email protected]>

> ---
> drivers/rtc/rtc-s5m.c | 82 ++------------------------------
> include/linux/mfd/samsung/core.h | 1 -
> include/linux/mfd/samsung/irq.h | 50 -------------------
> 3 files changed, 3 insertions(+), 130 deletions(-)
>
> diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c
> index 4243fe6d3842..dad294a0ce2a 100644
> --- a/drivers/rtc/rtc-s5m.c
> +++ b/drivers/rtc/rtc-s5m.c
> @@ -85,7 +85,7 @@ struct s5m_rtc_reg_config {
> unsigned int write_alarm_udr_mask;
> };
>
> -/* Register map for S5M8763 and S5M8767 */
> +/* Register map for S5M8767 */
> static const struct s5m_rtc_reg_config s5m_rtc_regs = {
> .regs_count = 8,
> .time = S5M_RTC_SEC,
> @@ -236,7 +236,6 @@ static int s5m_check_peding_alarm_interrupt(struct s5m_rtc_info *info,
>
> switch (info->device_type) {
> case S5M8767X:
> - case S5M8763X:
> ret = regmap_read(info->regmap, S5M_RTC_STATUS, &val);
> val &= S5M_ALARM0_STATUS;
> break;
> @@ -299,7 +298,6 @@ static int s5m8767_rtc_set_alarm_reg(struct s5m_rtc_info *info)
>
> data |= info->regs->write_alarm_udr_mask;
> switch (info->device_type) {
> - case S5M8763X:
> case S5M8767X:
> data &= ~S5M_RTC_TIME_EN_MASK;
> break;
> @@ -329,38 +327,6 @@ static int s5m8767_rtc_set_alarm_reg(struct s5m_rtc_info *info)
> return ret;
> }
>
> -static void s5m8763_data_to_tm(u8 *data, struct rtc_time *tm)
> -{
> - tm->tm_sec = bcd2bin(data[RTC_SEC]);
> - tm->tm_min = bcd2bin(data[RTC_MIN]);
> -
> - if (data[RTC_HOUR] & HOUR_12) {
> - tm->tm_hour = bcd2bin(data[RTC_HOUR] & 0x1f);
> - if (data[RTC_HOUR] & HOUR_PM)
> - tm->tm_hour += 12;
> - } else {
> - tm->tm_hour = bcd2bin(data[RTC_HOUR] & 0x3f);
> - }
> -
> - tm->tm_wday = data[RTC_WEEKDAY] & 0x07;
> - tm->tm_mday = bcd2bin(data[RTC_DATE]);
> - tm->tm_mon = bcd2bin(data[RTC_MONTH]);
> - tm->tm_year = bcd2bin(data[RTC_YEAR1]) + bcd2bin(data[RTC_YEAR2]) * 100;
> - tm->tm_year -= 1900;
> -}
> -
> -static void s5m8763_tm_to_data(struct rtc_time *tm, u8 *data)
> -{
> - data[RTC_SEC] = bin2bcd(tm->tm_sec);
> - data[RTC_MIN] = bin2bcd(tm->tm_min);
> - data[RTC_HOUR] = bin2bcd(tm->tm_hour);
> - data[RTC_WEEKDAY] = tm->tm_wday;
> - data[RTC_DATE] = bin2bcd(tm->tm_mday);
> - data[RTC_MONTH] = bin2bcd(tm->tm_mon);
> - data[RTC_YEAR1] = bin2bcd(tm->tm_year % 100);
> - data[RTC_YEAR2] = bin2bcd((tm->tm_year + 1900) / 100);
> -}
> -
> static int s5m_rtc_read_time(struct device *dev, struct rtc_time *tm)
> {
> struct s5m_rtc_info *info = dev_get_drvdata(dev);
> @@ -385,10 +351,6 @@ static int s5m_rtc_read_time(struct device *dev, struct rtc_time *tm)
> return ret;
>
> switch (info->device_type) {
> - case S5M8763X:
> - s5m8763_data_to_tm(data, tm);
> - break;
> -
> case S5M8767X:
> case S2MPS15X:
> case S2MPS14X:
> @@ -412,9 +374,6 @@ static int s5m_rtc_set_time(struct device *dev, struct rtc_time *tm)
> int ret = 0;
>
> switch (info->device_type) {
> - case S5M8763X:
> - s5m8763_tm_to_data(tm, data);
> - break;
> case S5M8767X:
> case S2MPS15X:
> case S2MPS14X:
> @@ -444,7 +403,6 @@ static int s5m_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
> {
> struct s5m_rtc_info *info = dev_get_drvdata(dev);
> u8 data[RTC_MAX_NUM_TIME_REGS];
> - unsigned int val;
> int ret, i;
>
> ret = regmap_bulk_read(info->regmap, info->regs->alarm0, data,
> @@ -453,15 +411,6 @@ static int s5m_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
> return ret;
>
> switch (info->device_type) {
> - case S5M8763X:
> - s5m8763_data_to_tm(data, &alrm->time);
> - ret = regmap_read(info->regmap, S5M_ALARM0_CONF, &val);
> - if (ret < 0)
> - return ret;
> -
> - alrm->enabled = !!val;
> - break;
> -
> case S5M8767X:
> case S2MPS15X:
> case S2MPS14X:
> @@ -500,10 +449,6 @@ static int s5m_rtc_stop_alarm(struct s5m_rtc_info *info)
> dev_dbg(info->dev, "%s: %ptR(%d)\n", __func__, &tm, tm.tm_wday);
>
> switch (info->device_type) {
> - case S5M8763X:
> - ret = regmap_write(info->regmap, S5M_ALARM0_CONF, 0);
> - break;
> -
> case S5M8767X:
> case S2MPS15X:
> case S2MPS14X:
> @@ -531,7 +476,6 @@ static int s5m_rtc_start_alarm(struct s5m_rtc_info *info)
> {
> int ret;
> u8 data[RTC_MAX_NUM_TIME_REGS];
> - u8 alarm0_conf;
> struct rtc_time tm;
>
> ret = regmap_bulk_read(info->regmap, info->regs->alarm0, data,
> @@ -543,11 +487,6 @@ static int s5m_rtc_start_alarm(struct s5m_rtc_info *info)
> dev_dbg(info->dev, "%s: %ptR(%d)\n", __func__, &tm, tm.tm_wday);
>
> switch (info->device_type) {
> - case S5M8763X:
> - alarm0_conf = 0x77;
> - ret = regmap_write(info->regmap, S5M_ALARM0_CONF, alarm0_conf);
> - break;
> -
> case S5M8767X:
> case S2MPS15X:
> case S2MPS14X:
> @@ -585,10 +524,6 @@ static int s5m_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
> int ret;
>
> switch (info->device_type) {
> - case S5M8763X:
> - s5m8763_tm_to_data(&alrm->time, data);
> - break;
> -
> case S5M8767X:
> case S2MPS15X:
> case S2MPS14X:
> @@ -655,7 +590,6 @@ static int s5m8767_rtc_init_reg(struct s5m_rtc_info *info)
> int ret;
>
> switch (info->device_type) {
> - case S5M8763X:
> case S5M8767X:
> /* UDR update time. Default of 7.32 ms is too long. */
> ret = regmap_update_bits(info->regmap, S5M_RTC_UDR_CON,
> @@ -729,11 +663,6 @@ static int s5m_rtc_probe(struct platform_device *pdev)
> info->regs = &s2mps13_rtc_regs;
> alarm_irq = S2MPS14_IRQ_RTCA0;
> break;
> - case S5M8763X:
> - regmap_cfg = &s5m_rtc_regmap_config;
> - info->regs = &s5m_rtc_regs;
> - alarm_irq = S5M8763_IRQ_ALARM0;
> - break;
> case S5M8767X:
> regmap_cfg = &s5m_rtc_regmap_config;
> info->regs = &s5m_rtc_regs;
> @@ -786,13 +715,8 @@ static int s5m_rtc_probe(struct platform_device *pdev)
>
> info->rtc_dev->ops = &s5m_rtc_ops;
>
> - if (info->device_type == S5M8763X) {
> - info->rtc_dev->range_min = RTC_TIMESTAMP_BEGIN_0000;
> - info->rtc_dev->range_max = RTC_TIMESTAMP_END_9999;
> - } else {
> - info->rtc_dev->range_min = RTC_TIMESTAMP_BEGIN_2000;
> - info->rtc_dev->range_max = RTC_TIMESTAMP_END_2099;
> - }
> + info->rtc_dev->range_min = RTC_TIMESTAMP_BEGIN_2000;
> + info->rtc_dev->range_max = RTC_TIMESTAMP_END_2099;
>
> if (!info->irq) {
> clear_bit(RTC_FEATURE_ALARM, info->rtc_dev->features);
> diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h
> index 07aae649a86f..a212b9f72bc9 100644
> --- a/include/linux/mfd/samsung/core.h
> +++ b/include/linux/mfd/samsung/core.h
> @@ -36,7 +36,6 @@
> struct gpio_desc;
>
> enum sec_device_type {
> - S5M8763X,
> S5M8767X,
> S2MPA01,
> S2MPS11X,
> diff --git a/include/linux/mfd/samsung/irq.h b/include/linux/mfd/samsung/irq.h
> index 6cfe4201a106..3fd2775eb9bb 100644
> --- a/include/linux/mfd/samsung/irq.h
> +++ b/include/linux/mfd/samsung/irq.h
> @@ -194,54 +194,4 @@ enum s5m8767_irq {
> #define S5M8767_IRQ_RTC1S_MASK (1 << 4)
> #define S5M8767_IRQ_WTSR_MASK (1 << 5)
>
> -enum s5m8763_irq {
> - S5M8763_IRQ_DCINF,
> - S5M8763_IRQ_DCINR,
> - S5M8763_IRQ_JIGF,
> - S5M8763_IRQ_JIGR,
> - S5M8763_IRQ_PWRONF,
> - S5M8763_IRQ_PWRONR,
> -
> - S5M8763_IRQ_WTSREVNT,
> - S5M8763_IRQ_SMPLEVNT,
> - S5M8763_IRQ_ALARM1,
> - S5M8763_IRQ_ALARM0,
> -
> - S5M8763_IRQ_ONKEY1S,
> - S5M8763_IRQ_TOPOFFR,
> - S5M8763_IRQ_DCINOVPR,
> - S5M8763_IRQ_CHGRSTF,
> - S5M8763_IRQ_DONER,
> - S5M8763_IRQ_CHGFAULT,
> -
> - S5M8763_IRQ_LOBAT1,
> - S5M8763_IRQ_LOBAT2,
> -
> - S5M8763_IRQ_NR,
> -};
> -
> -#define S5M8763_IRQ_DCINF_MASK (1 << 2)
> -#define S5M8763_IRQ_DCINR_MASK (1 << 3)
> -#define S5M8763_IRQ_JIGF_MASK (1 << 4)
> -#define S5M8763_IRQ_JIGR_MASK (1 << 5)
> -#define S5M8763_IRQ_PWRONF_MASK (1 << 6)
> -#define S5M8763_IRQ_PWRONR_MASK (1 << 7)
> -
> -#define S5M8763_IRQ_WTSREVNT_MASK (1 << 0)
> -#define S5M8763_IRQ_SMPLEVNT_MASK (1 << 1)
> -#define S5M8763_IRQ_ALARM1_MASK (1 << 2)
> -#define S5M8763_IRQ_ALARM0_MASK (1 << 3)
> -
> -#define S5M8763_IRQ_ONKEY1S_MASK (1 << 0)
> -#define S5M8763_IRQ_TOPOFFR_MASK (1 << 2)
> -#define S5M8763_IRQ_DCINOVPR_MASK (1 << 3)
> -#define S5M8763_IRQ_CHGRSTF_MASK (1 << 4)
> -#define S5M8763_IRQ_DONER_MASK (1 << 5)
> -#define S5M8763_IRQ_CHGFAULT_MASK (1 << 7)
> -
> -#define S5M8763_IRQ_LOBAT1_MASK (1 << 0)
> -#define S5M8763_IRQ_LOBAT2_MASK (1 << 1)
> -
> -#define S5M8763_ENRAMP (1 << 4)
> -
> #endif /* __LINUX_MFD_SEC_IRQ_H */
> --
> 2.39.0
>

--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

2023-03-16 15:12:17

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 1/2] mfd: sec: Remove PMICs without compatibles

On Tue, 31 Jan 2023, David Virag wrote:

> The S5M8751 and S5M8763 PMIC chips have no corresponding compatible
> values, so since board file support was removed for this driver, there
> is no way to specify these PMICs as present in boards anymore.
> Remove leftovers of these chips since it's dead code.
>
> Signed-off-by: David Virag <[email protected]>
> ---
> drivers/mfd/sec-core.c | 46 ---------------
> drivers/mfd/sec-irq.c | 89 ----------------------------
> include/linux/mfd/samsung/core.h | 1 -
> include/linux/mfd/samsung/s5m8763.h | 90 -----------------------------
> 4 files changed, 226 deletions(-)
> delete mode 100644 include/linux/mfd/samsung/s5m8763.h

Applied, thanks

--
Lee Jones [李琼斯]

2023-03-16 15:13:13

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 2/2] rtc: s5m: Drop S5M8763 support

On Tue, 31 Jan 2023, David Virag wrote:

> The S5M8763 MFD has no device tree compatible, and since board file
> support for it was removed, there's no way to use this MFD. After
> removing the remaining code for it from the MFD driver, also remove
> support for it in the s5m RTC driver, and all remaining references to
> it.
>
> Signed-off-by: David Virag <[email protected]>
> ---
> drivers/rtc/rtc-s5m.c | 82 ++------------------------------
> include/linux/mfd/samsung/core.h | 1 -
> include/linux/mfd/samsung/irq.h | 50 -------------------
> 3 files changed, 3 insertions(+), 130 deletions(-)

Applied, thanks

--
Lee Jones [李琼斯]

2023-03-16 15:13:42

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 0/2] Remove SEC S5M MFDs with no compatibles

On Tue, 31 Jan 2023, David Virag wrote:

> The S5M8751 and S5M8763 MFD PMICs have no compatibles, and board file
> support for them was removed, resulting in essentially no way for these
> chips to be used anymore (unless they get dt compatibles).
> They seemingly have never been in any board files upstream and I only
> found references to the SM8751 being on the SMDK6450 board (which has
> been unsupported for many years now) in a downstream Samsung Galaxy S2
> kernel tree.
>
> The patches should be applied in order.
>
> David Virag (2):
> mfd: sec: Remove PMICs without compatibles
> rtc: s5m: Drop S5M8763 support
>
> drivers/mfd/sec-core.c | 46 ---------------
> drivers/mfd/sec-irq.c | 89 ----------------------------
> drivers/rtc/rtc-s5m.c | 82 +-------------------------
> include/linux/mfd/samsung/core.h | 2 -
> include/linux/mfd/samsung/irq.h | 50 ----------------
> include/linux/mfd/samsung/s5m8763.h | 90 -----------------------------
> 6 files changed, 3 insertions(+), 356 deletions(-)
> delete mode 100644 include/linux/mfd/samsung/s5m8763.h

Pull-request to follow, once it passes build testing.

--
Lee Jones [李琼斯]

2023-03-17 08:08:32

by Lee Jones

[permalink] [raw]
Subject: Immutable branch between MFD and RTC due for the v6.4 merge window

Enjoy!

The following changes since commit fe15c26ee26efa11741a7b632e9f23b01aca4cc6:

Linux 6.3-rc1 (2023-03-05 14:52:03 -0800)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-rtc-v6.4

for you to fetch changes up to bb7929626c4f57f590b6028540a4bbd2a73809cb:

rtc: s5m: Drop S5M8763 support (2023-03-16 15:12:03 +0000)

----------------------------------------------------------------
Immutable branch between MFD and RTC due for the v6.4 merge window

----------------------------------------------------------------
David Virag (2):
mfd: sec: Remove PMICs without compatibles
rtc: s5m: Drop S5M8763 support

drivers/mfd/sec-core.c | 46 -------------------
drivers/mfd/sec-irq.c | 89 ------------------------------------
drivers/rtc/rtc-s5m.c | 82 ++-------------------------------
include/linux/mfd/samsung/core.h | 2 -
include/linux/mfd/samsung/irq.h | 50 ---------------------
include/linux/mfd/samsung/s5m8763.h | 90 -------------------------------------
6 files changed, 3 insertions(+), 356 deletions(-)
delete mode 100644 include/linux/mfd/samsung/s5m8763.h

--
Lee Jones [李琼斯]