diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-14 20:29:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-14 20:29:55 -0400 |
commit | f0c1bc95a108b36677dde6c9d96a5bb810a05b75 (patch) | |
tree | 335c33469407d0ebda5670dabb49c6ecad64263e /drivers/rtc | |
parent | 1dcf58d6e6e6eb7ec10e9abc56887b040205b06f (diff) | |
parent | e554a99ee8d09132e80dc467433c9a4df9054645 (diff) |
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.c | 60 |
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 { | |||
48 | unsigned int alarm0; | 48 | unsigned int alarm0; |
49 | /* First register for alarm 1, seconds */ | 49 | /* First register for alarm 1, seconds */ |
50 | unsigned int alarm1; | 50 | unsigned int alarm1; |
51 | /* SMPL/WTSR register */ | ||
52 | unsigned int smpl_wtsr; | ||
53 | /* | 51 | /* |
54 | * Register for update flag (UDR). Typically setting UDR field to 1 | 52 | * Register for update flag (UDR). Typically setting UDR field to 1 |
55 | * will enable update of time or alarm register. Then it will be | 53 | * 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 = { | |||
67 | .ctrl = S5M_ALARM1_CONF, | 65 | .ctrl = S5M_ALARM1_CONF, |
68 | .alarm0 = S5M_ALARM0_SEC, | 66 | .alarm0 = S5M_ALARM0_SEC, |
69 | .alarm1 = S5M_ALARM1_SEC, | 67 | .alarm1 = S5M_ALARM1_SEC, |
70 | .smpl_wtsr = S5M_WTSR_SMPL_CNTL, | ||
71 | .rtc_udr_update = S5M_RTC_UDR_CON, | 68 | .rtc_udr_update = S5M_RTC_UDR_CON, |
72 | .rtc_udr_mask = S5M_RTC_UDR_MASK, | 69 | .rtc_udr_mask = S5M_RTC_UDR_MASK, |
73 | }; | 70 | }; |
@@ -82,7 +79,6 @@ static const struct s5m_rtc_reg_config s2mps_rtc_regs = { | |||
82 | .ctrl = S2MPS_RTC_CTRL, | 79 | .ctrl = S2MPS_RTC_CTRL, |
83 | .alarm0 = S2MPS_ALARM0_SEC, | 80 | .alarm0 = S2MPS_ALARM0_SEC, |
84 | .alarm1 = S2MPS_ALARM1_SEC, | 81 | .alarm1 = S2MPS_ALARM1_SEC, |
85 | .smpl_wtsr = S2MPS_WTSR_SMPL_CNTL, | ||
86 | .rtc_udr_update = S2MPS_RTC_UDR_CON, | 82 | .rtc_udr_update = S2MPS_RTC_UDR_CON, |
87 | .rtc_udr_mask = S2MPS_RTC_WUDR_MASK, | 83 | .rtc_udr_mask = S2MPS_RTC_WUDR_MASK, |
88 | }; | 84 | }; |
@@ -96,7 +92,6 @@ struct s5m_rtc_info { | |||
96 | int irq; | 92 | int irq; |
97 | int device_type; | 93 | int device_type; |
98 | int rtc_24hr_mode; | 94 | int rtc_24hr_mode; |
99 | bool wtsr_smpl; | ||
100 | const struct s5m_rtc_reg_config *regs; | 95 | const struct s5m_rtc_reg_config *regs; |
101 | }; | 96 | }; |
102 | 97 | ||
@@ -597,28 +592,6 @@ static const struct rtc_class_ops s5m_rtc_ops = { | |||
597 | .alarm_irq_enable = s5m_rtc_alarm_irq_enable, | 592 | .alarm_irq_enable = s5m_rtc_alarm_irq_enable, |
598 | }; | 593 | }; |
599 | 594 | ||
600 | static void s5m_rtc_enable_wtsr(struct s5m_rtc_info *info, bool enable) | ||
601 | { | ||
602 | int ret; | ||
603 | ret = regmap_update_bits(info->regmap, info->regs->smpl_wtsr, | ||
604 | WTSR_ENABLE_MASK, | ||
605 | enable ? WTSR_ENABLE_MASK : 0); | ||
606 | if (ret < 0) | ||
607 | dev_err(info->dev, "%s: fail to update WTSR reg(%d)\n", | ||
608 | __func__, ret); | ||
609 | } | ||
610 | |||
611 | static void s5m_rtc_enable_smpl(struct s5m_rtc_info *info, bool enable) | ||
612 | { | ||
613 | int ret; | ||
614 | ret = regmap_update_bits(info->regmap, info->regs->smpl_wtsr, | ||
615 | SMPL_ENABLE_MASK, | ||
616 | enable ? SMPL_ENABLE_MASK : 0); | ||
617 | if (ret < 0) | ||
618 | dev_err(info->dev, "%s: fail to update SMPL reg(%d)\n", | ||
619 | __func__, ret); | ||
620 | } | ||
621 | |||
622 | static int s5m8767_rtc_init_reg(struct s5m_rtc_info *info) | 595 | static int s5m8767_rtc_init_reg(struct s5m_rtc_info *info) |
623 | { | 596 | { |
624 | u8 data[2]; | 597 | u8 data[2]; |
@@ -715,7 +688,6 @@ static int s5m_rtc_probe(struct platform_device *pdev) | |||
715 | info->dev = &pdev->dev; | 688 | info->dev = &pdev->dev; |
716 | info->s5m87xx = s5m87xx; | 689 | info->s5m87xx = s5m87xx; |
717 | info->device_type = s5m87xx->device_type; | 690 | info->device_type = s5m87xx->device_type; |
718 | info->wtsr_smpl = s5m87xx->wtsr_smpl; | ||
719 | 691 | ||
720 | if (s5m87xx->irq_data) { | 692 | if (s5m87xx->irq_data) { |
721 | info->irq = regmap_irq_get_virq(s5m87xx->irq_data, alarm_irq); | 693 | info->irq = regmap_irq_get_virq(s5m87xx->irq_data, alarm_irq); |
@@ -731,11 +703,6 @@ static int s5m_rtc_probe(struct platform_device *pdev) | |||
731 | 703 | ||
732 | ret = s5m8767_rtc_init_reg(info); | 704 | ret = s5m8767_rtc_init_reg(info); |
733 | 705 | ||
734 | if (info->wtsr_smpl) { | ||
735 | s5m_rtc_enable_wtsr(info, true); | ||
736 | s5m_rtc_enable_smpl(info, true); | ||
737 | } | ||
738 | |||
739 | device_init_wakeup(&pdev->dev, 1); | 706 | device_init_wakeup(&pdev->dev, 1); |
740 | 707 | ||
741 | info->rtc_dev = devm_rtc_device_register(&pdev->dev, "s5m-rtc", | 708 | info->rtc_dev = devm_rtc_device_register(&pdev->dev, "s5m-rtc", |
@@ -768,36 +735,10 @@ err: | |||
768 | return ret; | 735 | return ret; |
769 | } | 736 | } |
770 | 737 | ||
771 | static void s5m_rtc_shutdown(struct platform_device *pdev) | ||
772 | { | ||
773 | struct s5m_rtc_info *info = platform_get_drvdata(pdev); | ||
774 | int i; | ||
775 | unsigned int val = 0; | ||
776 | if (info->wtsr_smpl) { | ||
777 | for (i = 0; i < 3; i++) { | ||
778 | s5m_rtc_enable_wtsr(info, false); | ||
779 | regmap_read(info->regmap, info->regs->smpl_wtsr, &val); | ||
780 | pr_debug("%s: WTSR_SMPL reg(0x%02x)\n", __func__, val); | ||
781 | if (val & WTSR_ENABLE_MASK) | ||
782 | pr_emerg("%s: fail to disable WTSR\n", | ||
783 | __func__); | ||
784 | else { | ||
785 | pr_info("%s: success to disable WTSR\n", | ||
786 | __func__); | ||
787 | break; | ||
788 | } | ||
789 | } | ||
790 | } | ||
791 | /* Disable SMPL when power off */ | ||
792 | s5m_rtc_enable_smpl(info, false); | ||
793 | } | ||
794 | |||
795 | static int s5m_rtc_remove(struct platform_device *pdev) | 738 | static int s5m_rtc_remove(struct platform_device *pdev) |
796 | { | 739 | { |
797 | struct s5m_rtc_info *info = platform_get_drvdata(pdev); | 740 | struct s5m_rtc_info *info = platform_get_drvdata(pdev); |
798 | 741 | ||
799 | /* Perform also all shutdown steps when removing */ | ||
800 | s5m_rtc_shutdown(pdev); | ||
801 | i2c_unregister_device(info->i2c); | 742 | i2c_unregister_device(info->i2c); |
802 | 743 | ||
803 | return 0; | 744 | return 0; |
@@ -842,7 +783,6 @@ static struct platform_driver s5m_rtc_driver = { | |||
842 | }, | 783 | }, |
843 | .probe = s5m_rtc_probe, | 784 | .probe = s5m_rtc_probe, |
844 | .remove = s5m_rtc_remove, | 785 | .remove = s5m_rtc_remove, |
845 | .shutdown = s5m_rtc_shutdown, | ||
846 | .id_table = s5m_rtc_id, | 786 | .id_table = s5m_rtc_id, |
847 | }; | 787 | }; |
848 | 788 | ||