summaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 17:29:55 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 17:29:55 -0700
commitf0c1bc95a108b36677dde6c9d96a5bb810a05b75 (patch)
tree335c33469407d0ebda5670dabb49c6ecad64263e /drivers/rtc
parent1dcf58d6e6e6eb7ec10e9abc56887b040205b06f (diff)
parente554a99ee8d09132e80dc467433c9a4df9054645 (diff)
downloadlinux-f0c1bc95a108b36677dde6c9d96a5bb810a05b75.tar.bz2
Merge tag 'mfd-for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
Pull MFD updates from Lee Jones: "Changes to existing drivers: - Rename child driver [axp288_battery => axp288_fuel_gauge]; axp20x - Rename child driver [max77693-flash => max77693-led]; max77693 - Error handling fixes; intel_soc_pmic - GPIO tweaking; intel_soc_pmic - Remove non-DT code; vexpress-sysreg, tc3589x - Remove unused/legacy code; ti_am335x_tscadc, rts5249, rtsx_gops, rtsx_pcr, rtc-s5m, sec-core, max77693, menelaus, wm5102-tables - Trivial fixups; rtsx_pci, da9150-core, sec-core, max7769, max77693, mc13xxx-core, dln2, hi6421-pmic-core, rk808, twl4030-power, lpc_ich, menelaus, twl6040 - Update register/address values; rts5227, rts5249 - DT and/or binding document fixups; arizona, da9150, mt6397, axp20x, qcom-rpm, qcom-spmi-pmic - Couple of trivial core Kconfig fixups - Remove use of seq_printf return value; ab8500-debugfs - Remove __exit markups; menelaus, tps65010 - Fix platform-device name collisions; mfd-core New drivers/supported devices: - Add support for wm8280/wm8281 into arizona - Add support for COMe-cBL6 into kempld-core - Add support for rts524a and rts525a into rts5249 - Add support for ipq8064 into qcom_rpm - Add support for extcon into axp20x - New MediaTek MT6397 PMIC driver - New Maxim MAX77843 PMIC dirver - New Intel Quark X1000 I2C-GPIO driver - New Skyworks SKY81452 driver" * tag 'mfd-for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (76 commits) mfd: sec: Fix RTC alarm interrupt number on S2MPS11 mfd: wm5102: Remove registers for output 3R from readable list mfd: tps65010: Remove incorrect __exit markups mfd: devicetree: bindings: Add Qualcomm RPM regulator subnodes mfd: axp20x: Add support for extcon cell mfd: lpc_ich: Sort IDs mfd: twl6040: Remove wrong and unneeded "platform:twl6040" modalias mfd: qcom-spmi-pmic: Add specific compatible strings for Qualcomm's SPMI PMIC's mfd: axp20x: Fix duplicate const for model names mfd: menelaus: Use macro for magic number mfd: menelaus: Drop support for SW controller VCORE mfd: menelaus: Delete omap_has_menelaus mfd: arizona: Correct type of gpio_defaults mfd: lpc_ich: Sort IDs mfd: Fix a typo in Kconfig mfd: qcom_rpm: Add support for IPQ8064 mfd: devicetree: qcom_rpm: Document IPQ8064 resources mfd: core: Fix platform-device name collisions mfd: intel_quark_i2c_gpio: Don't crash if !DMI dt-bindings: Add vendor-prefix for X-Powers ...
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-s5m.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c
index 89ac1d5083c6..4008b84246ca 100644
--- a/drivers/rtc/rtc-s5m.c
+++ b/drivers/rtc/rtc-s5m.c
@@ -48,8 +48,6 @@ struct s5m_rtc_reg_config {
unsigned int alarm0;
/* First register for alarm 1, seconds */
unsigned int alarm1;
- /* SMPL/WTSR register */
- unsigned int smpl_wtsr;
/*
* Register for update flag (UDR). Typically setting UDR field to 1
* will enable update of time or alarm register. Then it will be
@@ -67,7 +65,6 @@ static const struct s5m_rtc_reg_config s5m_rtc_regs = {
.ctrl = S5M_ALARM1_CONF,
.alarm0 = S5M_ALARM0_SEC,
.alarm1 = S5M_ALARM1_SEC,
- .smpl_wtsr = S5M_WTSR_SMPL_CNTL,
.rtc_udr_update = S5M_RTC_UDR_CON,
.rtc_udr_mask = S5M_RTC_UDR_MASK,
};
@@ -82,7 +79,6 @@ static const struct s5m_rtc_reg_config s2mps_rtc_regs = {
.ctrl = S2MPS_RTC_CTRL,
.alarm0 = S2MPS_ALARM0_SEC,
.alarm1 = S2MPS_ALARM1_SEC,
- .smpl_wtsr = S2MPS_WTSR_SMPL_CNTL,
.rtc_udr_update = S2MPS_RTC_UDR_CON,
.rtc_udr_mask = S2MPS_RTC_WUDR_MASK,
};
@@ -96,7 +92,6 @@ struct s5m_rtc_info {
int irq;
int device_type;
int rtc_24hr_mode;
- bool wtsr_smpl;
const struct s5m_rtc_reg_config *regs;
};
@@ -597,28 +592,6 @@ static const struct rtc_class_ops s5m_rtc_ops = {
.alarm_irq_enable = s5m_rtc_alarm_irq_enable,
};
-static void s5m_rtc_enable_wtsr(struct s5m_rtc_info *info, bool enable)
-{
- int ret;
- ret = regmap_update_bits(info->regmap, info->regs->smpl_wtsr,
- WTSR_ENABLE_MASK,
- enable ? WTSR_ENABLE_MASK : 0);
- if (ret < 0)
- dev_err(info->dev, "%s: fail to update WTSR reg(%d)\n",
- __func__, ret);
-}
-
-static void s5m_rtc_enable_smpl(struct s5m_rtc_info *info, bool enable)
-{
- int ret;
- ret = regmap_update_bits(info->regmap, info->regs->smpl_wtsr,
- SMPL_ENABLE_MASK,
- enable ? SMPL_ENABLE_MASK : 0);
- if (ret < 0)
- dev_err(info->dev, "%s: fail to update SMPL reg(%d)\n",
- __func__, ret);
-}
-
static int s5m8767_rtc_init_reg(struct s5m_rtc_info *info)
{
u8 data[2];
@@ -715,7 +688,6 @@ static int s5m_rtc_probe(struct platform_device *pdev)
info->dev = &pdev->dev;
info->s5m87xx = s5m87xx;
info->device_type = s5m87xx->device_type;
- info->wtsr_smpl = s5m87xx->wtsr_smpl;
if (s5m87xx->irq_data) {
info->irq = regmap_irq_get_virq(s5m87xx->irq_data, alarm_irq);
@@ -731,11 +703,6 @@ static int s5m_rtc_probe(struct platform_device *pdev)
ret = s5m8767_rtc_init_reg(info);
- if (info->wtsr_smpl) {
- s5m_rtc_enable_wtsr(info, true);
- s5m_rtc_enable_smpl(info, true);
- }
-
device_init_wakeup(&pdev->dev, 1);
info->rtc_dev = devm_rtc_device_register(&pdev->dev, "s5m-rtc",
@@ -768,36 +735,10 @@ err:
return ret;
}
-static void s5m_rtc_shutdown(struct platform_device *pdev)
-{
- struct s5m_rtc_info *info = platform_get_drvdata(pdev);
- int i;
- unsigned int val = 0;
- if (info->wtsr_smpl) {
- for (i = 0; i < 3; i++) {
- s5m_rtc_enable_wtsr(info, false);
- regmap_read(info->regmap, info->regs->smpl_wtsr, &val);
- pr_debug("%s: WTSR_SMPL reg(0x%02x)\n", __func__, val);
- if (val & WTSR_ENABLE_MASK)
- pr_emerg("%s: fail to disable WTSR\n",
- __func__);
- else {
- pr_info("%s: success to disable WTSR\n",
- __func__);
- break;
- }
- }
- }
- /* Disable SMPL when power off */
- s5m_rtc_enable_smpl(info, false);
-}
-
static int s5m_rtc_remove(struct platform_device *pdev)
{
struct s5m_rtc_info *info = platform_get_drvdata(pdev);
- /* Perform also all shutdown steps when removing */
- s5m_rtc_shutdown(pdev);
i2c_unregister_device(info->i2c);
return 0;
@@ -842,7 +783,6 @@ static struct platform_driver s5m_rtc_driver = {
},
.probe = s5m_rtc_probe,
.remove = s5m_rtc_remove,
- .shutdown = s5m_rtc_shutdown,
.id_table = s5m_rtc_id,
};