summaryrefslogtreecommitdiffstats
path: root/drivers/rtc
Commit message (Collapse)AuthorAgeFilesLines
...
* rtc: at91sam9: get sclk rate after enabling itAlexandre Belloni2015-09-051-6/+7
| | | | | | | | | | | See help for clk_get_rate(): "obtain the current clock rate (in Hz) for a clock source. This is only valid once the clock source has been enabled." It currently returns the correct value but that may not stay that way. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
* rtc: at91sam9: sort headers alphabeticallyAlexandre Belloni2015-09-051-8/+8
| | | | | | | | Sort included headers alphabetically. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
* rtc: at91sam9: remove useless checkAlexandre Belloni2015-09-051-2/+1
| | | | | | | | | rtc->sclk necessarily points to a valid clocks at this point. Else the probe would have aborted. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
* rtc: at91sam9: properly handle error caseAlexandre Belloni2015-09-051-3/+10
| | | | | | | | | | In case of a probe error, it is possible to abort after issuing clk_prepare_enable(). Ensure the clock is disabled and unprepared in that case. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
* rtc: pl031: fix typo for author emailLeo Yan2015-09-051-1/+1
| | | | | | | The email address missed character ">", so add it. Signed-off-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: Export OF module alias information in missing driversJavier Martinez Canillas2015-09-053-0/+3
| | | | | | | | | | | | | | | | | | | | | | | The I2C core always reports the MODALIAS uevent as "i2c:<client name" regardless if the driver was matched using the I2C id_table or the of_match_table. So technically there's no need for a driver to export the OF table since currently it's not used. In fact, the I2C device ID table is mandatory for I2C drivers since a i2c_device_id is passed to the driver's probe function even if the I2C core used the OF table to match the driver. And since the I2C core uses different tables, OF-only drivers needs to have duplicated data that has to be kept in sync and also the dev node compatible manufacturer prefix is stripped when reporting the MODALIAS. To avoid the above, the I2C core behavior may be changed in the future to not require an I2C device table for OF-only drivers and report the OF module alias. So, it's better to also export the OF table to prevent breaking module autoloading if that happens. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: cmos: Revert "rtc-cmos: Add an alarm disable quirk"Adrian Huang2015-09-051-50/+0
| | | | | | | | | | | | | Commit d5a1c7e3fc38 ("rtc-cmos: Add an alarm disable quirk") that added a special quirk is not needed because [PATCH 1/2] of this patchset makes the kernel more robust: rtc-cmos: Cancel alarm timer if alarm time is equal to now+1 seconds Signed-off-by: Adrian Huang <ahuang12@lenovo.com> Tested-by: Egbert Eich <eich@suse.de> Tested-by: Diego Ercolani <diego.ercolani@gmail.com> Cc: Borislav Petkov <bp@suse.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: cmos: Cancel alarm timer if alarm time is equal to now+1 secondsAdrian Huang2015-09-051-4/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Steps to reproduce the problem: 1) Enable RTC wake-up option in BIOS Setup 2) Issue one of these commands in the OS: "poweroff" or "shutdown -h now" 3) System will shut down and then reboot automatically Root-cause of the issue: 1) During the shutdown process, the hwclock utility is used to save the system clock to hardware clock (RTC). 2) The hwclock utility invokes ioctl() with RTC_UIE_ON. The kernel configures the RTC alarm for the periodic interrupt (every 1 second). 3) The hwclock uitlity closes the /dev/rtc0 device, and the kernel disables the RTC alarm irq (AIE bit of Register B) via ioctl() with RTC_UIE_OFF. But, the configured alarm time is the current_time + 1. 4) After the next 1 second is elapsed, the AF (alarm interrupt flag) of Register C is set. 5) The S5 handler in BIOS is invoked to configure alarm registers (enable AIE bit and configure alarm date/time). But, BIOS does not clear the previous interrupt status during alarm configuration. Therefore, "AF=AIE=1" causes the rtc device to trigger an interrupt. 6) So, the machine reboots automatically right after shutdown. This patch cancels the alarm timer if the following condictions are met (suggested by Alexandre): 1) The configured alarm time is equal to current_time + 1 seconds. 2) The AIE timer is not in use. The member 'alarm_expires' is introduced in struct cmos_rtc because of the following reasons: 1) The configured alarm time can be retrieved from cmos_read_alarm(), but we need to take the 'wrapped timestamp' and 'time rollover' into consideration. The function __rtc_read_alarm() eliminates the concerns. To avoid the duplicated code in the lower level RTC driver, invoking __rtc_read_alarm from the lower level RTC driver is not encouraged. Moreover, the compilation error 'the undefined __rtc_read_alarm" is observed if the lower level RTC driver is compiled as a kernel module. 2) The uie_rtctimer.node.expires and aie_timer.node.expires can be retrieved for the configured alarm time. But, the problem is that either of them might configure the CMOS alarm time. We cannot make sure UIE timer or AIE tiemr configured the CMOS alarm time before. (uie_rtctimer or aie_timer is enabled and then is disabled). 3) The patch introduces the member 'alarm_expires' to keep the newly configured alarm time, so the above-mentioned concerns can be eliminated. The issue goes away after 20-time shutdown tests. Signed-off-by: Adrian Huang <ahuang12@lenovo.com> Tested-by: Egbert Eich <eich@suse.de> Tested-by: Diego Ercolani <diego.ercolani@gmail.com> Cc: Borislav Petkov <bp@suse.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: da9063: Add DA9062 RTC capability to DA9063 RTC driverS Twiss2015-09-052-115/+282
| | | | | | | | | | | | | | | | | | | | | | | | | Add DA9062 RTC support into the existing DA9063 RTC driver component by using generic access tables for common register and bit mask definitions. The following change will add generic register and bit mask support to the DA9063 RTC. The changes are slightly complicated by requiring support for three register sets: DA9063-AD, DA9063-BB and DA9062-AA. The following alterations have been made to the DA9063 RTC: - Addition of a da9063_compatible_rtc_regmap structure to hold all generic registers and bitmasks for this type of RTC component. - A re-write of struct da9063 to use pointers for regmap and compatible registers/masks definitions - Addition of a of_device_id table for DA9063 and DA9062 defaults - Refactoring functions to use struct da9063_compatible_rtc accesses to generic registers/masks instead of using defines from registers.h - Re-work of da9063_rtc_probe() to use of_match_node() and dev_get_regmap() to provide initialisation of generic registers and masks and access to regmap Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: mt6397: implement suspend/resume function in rtc-mt6397 driverHenry Chen2015-09-051-0/+26
| | | | | | | | Implement the suspend/resume function in order to control rtc's irq_wake flag and handle as wakeup source. Signed-off-by: Henry Chen <henryc.chen@mediatek.com> Acked-by: Eddie Huang <eddie.huang@mediatek.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: switch to using is_visible() to control sysfs attributesDmitry Torokhov2015-09-053-48/+34
| | | | | | | | | | | | Instead of creating wakealarm attribute manually, after the device has been registered, let's rely on facilities provided by the attribute groups to control which attributes are visible and which are not. This allows to create all needed attributes at once, at the same time that we register RTC class device. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: switch wakealarm attribute to DEVICE_ATTR_RWDmitry Torokhov2015-09-051-5/+3
| | | | | | | | | | Instead of using older style DEVICE_ATTR for wakealarm attribute let's switch to using DEVICE_ATTR_RW that ensures consistent across the kernel permissions on the attribute. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: make rtc_does_wakealarm() return booleanDmitry Torokhov2015-09-051-2/+3
| | | | | | | | | Users of rtc_does_wakealarm() return value treat it as boolean so let's change the signature accordingly. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: rx8025: remove obsolete local_irq_disable() and local_irq_enable() for ↵Henri Roosen2015-09-051-4/+0
| | | | | | | | | | rtc_update_irq() Since commit e6229bec25be ("rtc: make rtc_update_irq callable with irqs enabled") rtc_update_irq() is callable with irqs enabled. Signed-off-by: Henri Roosen <henriroosen@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: fix drivers that consider 0 as a valid IRQ in client->irqOctavian Purdila2015-09-052-3/+3
| | | | | | | | | | | | | | Since dab472eb931b ("i2c / ACPI: Use 0 to indicate that device does not have interrupt assigned"), 0 is not a valid i2c client irq anymore, so change all driver's checks accordingly. The same issue occurs when the device is instantiated via device tree with no IRQ, or from the i2c sysfs interface, even before the patch above. Signed-off-by: Octavian Purdila <octavian.purdila@intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: dev: properly manage lifetime of dev and cdev in rtc deviceDmitry Torokhov2015-09-051-0/+1
| | | | | | | | | | | struct rtc embeds both struct dev and struct cdev. Unfortunately character device structure may outlive the parent rtc structure unless we set it up as parent of character device so that it will stay pinned until character device is freed. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: class: remove unnecessary device_get() in rtc_device_unregisterDmitry Torokhov2015-09-051-13/+12
| | | | | | | | | | | Technically the address of rtc->dev can never be NULL, so get_device() can never fail. Also caller of rtc_device_unregister() supposed to be the owner of the device and thus have a valid reference. Therefore call to get_device() is not needed here. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: class: fix double free in rtc_register_device() error pathDmitry Torokhov2015-09-051-4/+2
| | | | | | | | | | | | Commit 59cca865f21e ("drivers/rtc/class.c: fix device_register() error handling") correctly noted that naked kfree() should not be used after failed device_register() call, however, while it added the needed put_device() it forgot to remove the original kfree() causing double-free. Cc: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: sirfsoc: move to regmap APIs from platform-specific APIsGuo Zeng2015-09-051-43/+64
| | | | | | | | | | | | | | | The current codes use CSR platform specific API exported by machine codes to read/write RTC registers. they are: sirfsoc_rtc_iobrg_readl() sirfsoc_rtc_iobrg_writel() commit b1999477ed91 ("ARM: prima2: move to use REGMAP APIs for rtciobrg") moves to regmap support, now we can move to use regmap APIs in RTC driver. Signed-off-by: Guo Zeng <guo.zeng@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: opal: Enable alarms only when opal supports tpoVaibhav Jain2015-09-051-4/+5
| | | | | | | | | | | | | | | | | | | | | rtc-opal driver provides support for rtc alarms via timed-power-on(tpo). However some Power platforms like BML use a fake rtc clock and don't support tpo. Such platforms are indicated by the missing 'has-tpo' property in the device tree. Current implementation however enables callback for rtc_class_ops.read/set alarm irrespective of the tpo support from the platform. This results in a failed opal call when kernel tries to read an existing alarms via opal_get_tpo_time during rtc device registration. This patch fixes this issue by setting opal_rtc_ops.read/set_alarm callback pointers only when tpo is supported. Acked-by: Michael Neuling <mikey@neuling.org> Acked-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com> Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: add rtc-lpc24xx driverJoachim Eastwood2015-09-053-0/+323
| | | | | | | | | Add driver for the RTC found on NXP LPC178x/18xx/408x/43xx devices. The RTC provides calendar and clock functionality together with alarm interrupt support. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: Drop owner assignment from platform_driverKrzysztof Kozlowski2015-09-051-1/+0
| | | | | | | platform_driver does not need to set an owner because platform_driver_register() will set it. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: Drop owner assignment from i2c_driverKrzysztof Kozlowski2015-09-0515-15/+0
| | | | | | | | i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: pcf2127: use OFS flag to detect unreliable date and warn the userAndrea Scian2015-09-051-3/+23
| | | | | | | | | | | The PCF2127 datasheet states that it's wrong to say that the date in unreliable if BLF (battery low flag) is set but instead, OSF (seconds register) should be used to check if oscillator, for any reason, stopped. Battery may be low (usually below 2V5 threshold) but the date may be anyway correct (typically date is unreliable when input voltage is below 1V2). Signed-off-by: Andrea Scian <andrea.scian@dave.eu> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: use rtc_valid_tm() error code when reading date/timeAndrea Scian2015-09-053-20/+3
| | | | | | | | | There's a wrong comment in some RTC drivers that say it's better to ignore rtc_valid_tm() when reading RTC timestamp. However this is wrong and is better to return to the userspace the error if timestamp is not valid. Signed-off-by: Andrea Scian <andrea.scian@dave.eu> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: 88pm80x: add device tree supportVaibhav Hiremath2015-09-051-11/+17
| | | | | | | | | Along with DT support, this patch also cleans up the unnecessary code around 'rtc_wakeup' initialization. Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: bq32k: remove redundant checkManinder Singh2015-09-051-1/+1
| | | | | | | | | | | | | removing below static analysis error: (error) Possible null pointer dereference: client if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) ^^^^^^^ Error comes because client is dereferenced before NULL check. So probably NULL this check is not required. Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: ds1685: Use module_platform_driverVaishali Thakkar2015-09-051-21/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use module_platform_driver for drivers whose init and exit functions only register and unregister, respectively. A simplified version of the Coccinelle semantic patch that performs this transformation is as follows: @a@ identifier f, x; @@ -static f(...) { return platform_driver_register(&x); } @b depends on a@ identifier e, a.x; @@ -static e(...) { platform_driver_unregister(&x); } @c depends on a && b@ identifier a.f; declarer name module_init; @@ -module_init(f); @d depends on a && b && c@ identifier b.e, a.x; declarer name module_exit; declarer name module_platform_driver; @@ -module_exit(e); +module_platform_driver(x); Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: ds1307: Support optional wakeup interrupt sourceNishanth Menon2015-09-051-3/+33
| | | | | | | | | | | | | | | | | | | | | | | With the recent pinctrl-single changes, SoCs such as Texas Instrument's OMAP processors can treat wake-up events from deeper idle states as interrupts. Let's add support for the optional second interrupt for wake-up using the generic wakeirq support added in commit 4990d4fe327b ("PM / Wakeirq: Add automated device wake IRQ handling") Finally, to pass the wake-up interrupt in the dts file, interrupts-extended property needs to be passed. This is similar in approach to commit 2a0b965cfb6e ("serial: omap: Add support for optional wake-up") + ee83bd3b6483 ("serial: omap: Switch wake-up interrupt to generic wakeirq") Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: ds1307: Sort the headersNishanth Menon2015-09-051-5/+5
| | | | | | | | | It is always a good practice to keep the #includes sorted Signed-off-by: Nishanth Menon <nm@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: ds1307: Switch to managed irq allocationNishanth Menon2015-09-051-6/+4
| | | | | | | | | | | | Since we are not doing anything fancy in remove function that requires us to sequence IRQ free operation, we might as well switch over to devm_ equivalent of managed IRQ allocation and remove the explicit free_irq since it'd be done automatically at remove. Signed-off-by: Nishanth Menon <nm@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: ds1307: Convert to threaded IRQFelipe Balbi2015-09-051-40/+19
| | | | | | | | | | | The driver currently emulates the concept of threaded IRQ using a workqueue, which it really does not need to. Instead, switch over to threaded_irq handlers which is meant precisely for the same purpose. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* Merge tag 'mfd-for-linus-4.3' of ↵Linus Torvalds2015-09-041-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Device Support: - New Clocksource driver from ST - New MFD/ACPI/DMA drivers for Intel's Sunrisepoint PCH based platforms - Add support for Arizona WM8998 and WM1814 - Add support for Dialog Semi DA9062 and DA9063 - Add support for Kontron COMe-bBL6 and COMe-cBW6 - Add support for X-Powers AXP152 - Add support for Atmel, many - Add support for STMPE, many - Add support for USB in X-Powers AXP22X Core Frameworks: - New Base API to traverse devices and their children in reverse order Bug Fixes: - Fix race between runtime-suspend and IRQs - Obtain platform data form more reliable source Fix-ups: - Constifying things - Variable signage changes - Kconfig depends|selects changes - Make use of BIT() macro - Do not supply .owner attribute in *_driver structures - MAINTAINERS entries - Stop using set_irq_flags() - Start using irq_set_chained_handler_and_data() - Export DT device ID structures" * tag 'mfd-for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (69 commits) mfd: jz4740-adc: Init mask cache in generic IRQ chip mfd: cros_ec: spi: Add OF match table mfd: stmpe: Add OF match table mfd: max77686: Split out regulator part from the DT binding mfd: Add DT binding for Maxim MAX77802 IC mfd: max77686: Use a generic name for the PMIC node in the example mfd: max77686: Don't suggest in binding to use a deprecated property mfd: Add MFD_CROS_EC dependencies mfd: cros_ec: Remove CROS_EC_PROTO dependency for SPI and I2C drivers mfd: axp20x: Add a cell for the usb power_supply part of the axp20x PMICs mfd: axp20x: Add missing registers, and mark more registers volatile mfd: arizona: Fixup some formatting/white space errors mfd: wm8994: Fix NULL pointer exception on missing pdata of: Add vendor prefix for Nuvoton mfd: mt6397: Implement wake handler and suspend/resume to handle wake up event mfd: atmel-hlcdc: Add support for new SoCs mfd: Export OF module alias information in missing drivers mfd: stw481x: Export I2C module alias information mfd: da9062: Support for the DA9063 OnKey in the DA9062 core mfd: max899x: Avoid redundant irq_data lookup ...
| * rtc: st: Update IP layout information to include ClocksourceLee Jones2015-07-231-1/+1
| | | | | | | | | | | | | | | | | | | | Initial submission adding support for this IP only included Watchdog and the Real-Time Clock. Now the third (and final) device is enabled this trivial patch is required to update the comment in the RTC driver to encompass Clocksource. Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* | Merge tag 'armsoc-soc' of ↵Linus Torvalds2015-09-013-79/+114
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC platform updates from Olof Johansson: "New or improved SoC support: - add support for Atmel's SAMA5D2 SoC - add support for Freescale i.MX6UL - improved support for TI's DM814x platform - misc fixes and improvements for RockChip platforms - Marvell MVEBU suspend/resume support A few driver changes that ideally would belong in the drivers branch are also here (acked by appropriate maintainers): - power key input driver for Freescale platforms (svns) - RTC driver updates for Freescale platforms (svns/mxc) - clk fixes for TI DM814/816X + a bunch of other changes for various platforms" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (83 commits) ARM: rockchip: pm: Fix PTR_ERR() argument ARM: imx: mach-imx6ul: Fix allmodconfig build clk: ti: fix for definition movement ARM: uniphier: drop v7_invalidate_l1 call at secondary entry memory: kill off set_irq_flags usage rtc: snvs: select option REGMAP_MMIO ARM: brcmstb: select ARCH_DMA_ADDR_T_64BIT for LPAE ARM: BCM: Enable ARM erratum 798181 for BRCMSTB ARM: OMAP2+: Fix power domain operations regression caused by 81xx ARM: rockchip: enable PMU_GPIOINT_WAKEUP_EN when entering shallow suspend ARM: rockchip: set correct stabilization thresholds in suspend ARM: rockchip: rename osc_switch_to_32k variable ARM: imx6ul: add fec MAC refrence clock and phy fixup init ARM: imx6ul: add fec bits to GPR syscon definition rtc: mxc: add support of device tree dt-binding: document the binding for mxc rtc rtc: mxc: use a second rtc clock ARM: davinci: cp_intc: use IRQCHIP_SKIP_SET_WAKE instead of irq_set_wake callback soc: mediatek: Fix SCPSYS compilation ARM: at91/soc: add basic support for new sama5d2 SoC ...
| * | rtc: snvs: select option REGMAP_MMIOShawn Guo2015-08-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Select REGMAP_MMIO to fix the following build error seen with x86_64 randconfig. drivers/built-in.o: In function `snvs_rtc_probe': rtc-snvs.c:(.text+0x567730): undefined reference to `devm_regmap_init_mmio_clk' Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> Acked-by: Frank Li <Frank.Li@freescale.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
| * | rtc: mxc: add support of device treePhilippe Reynes2015-08-051-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | Add device tree support for the mxc rtc driver. Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
| * | rtc: mxc: use a second rtc clockPhilippe Reynes2015-08-051-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mxc RTC needs two clocks, one for the input reference, and one for the IP. But this driver was only using one clock (for the reference). This patch add the second clock (for the IP). Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
| * | rtc: snvs: use syscon to access registerFrank Li2015-07-151-65/+67
| |/ | | | | | | | | | | | | | | | | snvs included rtc, on/off key, power-off module change to syscon to access register Signed-off-by: Frank Li <Frank.Li@freescale.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
* | char: make misc_deregister a void functionGreg Kroah-Hartman2015-08-051-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With well over 200+ users of this api, there are a mere 12 users that actually checked the return value of this function. And all of them really didn't do anything with that information as the system or module was shutting down no matter what. So stop pretending like it matters, and just return void from misc_deregister(). If something goes wrong in the call, you will get a WARNING splat in the syslog so you know how to fix up your driver. Other than that, there's nothing that can go wrong. Cc: Alasdair Kergon <agk@redhat.com> Cc: Neil Brown <neilb@suse.com> Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Christine Caulfield <ccaulfie@redhat.com> Cc: David Teigland <teigland@redhat.com> Cc: Mark Fasheh <mfasheh@suse.com> Acked-by: Joel Becker <jlbec@evilplan.org> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Acked-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | rtc: armada38x: Remove unused variable from armada38x_rtc_set_time()Fabio Estevam2015-07-181-1/+1
| | | | | | | | | | | | | | | | | | Remove the 'flags' variable in order to fix the following warning: drivers/rtc/rtc-armada38x.c:91:22: warning: unused variable 'flags' [-Wunused-variable] Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* | rtc: mt6397: enable wakeup before registering rtc deviceWei-Ning Huang2015-07-181-2/+2
|/ | | | | | | | | | rtc_sysfs_add_device checks if device can wakeup before creating the wakealarm file in sysfs. Thus the driver must set wakeup capability before registering the rtc device. Signed-off-by: Wei-Ning Huang <wnhuang@google.com> Acked-by: Eddie Huang <eddie.huang@mediatek.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linusLinus Torvalds2015-06-272-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull MIPS updates from Ralf Baechle: - Improvements to the tlb_dump code - KVM fixes - Add support for appended DTB - Minor improvements to the R12000 support - Minor improvements to the R12000 support - Various platform improvments for BCM47xx - The usual pile of minor cleanups - A number of BPF fixes and improvments - Some improvments to the support for R3000 and DECstations - Some improvments to the ATH79 platform support - A major patchset for the JZ4740 SOC adding support for the CI20 platform - Add support for the Pistachio SOC - Minor BMIPS/BCM63xx platform support improvments. - Avoid "SYNC 0" as memory barrier when unlocking spinlocks - Add support for the XWR-1750 board. - Paul's __cpuinit/__cpuinitdata cleanups. - New Malta CPU board support large memory so enable ZONE_DMA32. * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (131 commits) MIPS: spinlock: Adjust arch_spin_lock back-off time MIPS: asmmacro: Ensure 64-bit FP registers are used with MSA MIPS: BCM47xx: Simplify handling SPROM revisions MIPS: Cobalt Don't use module_init in non-modular MTD registration. MIPS: BCM47xx: Move NVRAM driver to the drivers/firmware/ MIPS: use for_each_sg() MIPS: BCM47xx: Don't select BCMA_HOST_PCI MIPS: BCM47xx: Add helper variable for storing NVRAM length MIPS: IRQ/IP27: Move IRQ allocation API to platform code. MIPS: Replace smp_mb with release barrier function in unlocks. MIPS: i8259: DT support MIPS: Malta: Basic DT plumbing MIPS: include errno.h for ENODEV in mips-cm.h MIPS: Define GCR_GIC_STATUS register fields MIPS: BPF: Introduce BPF ASM helpers MIPS: BPF: Use BPF register names to describe the ABI MIPS: BPF: Move register definition to the BPF header MIPS: net: BPF: Replace RSIZE with SZREG MIPS: BPF: Free up some callee-saved registers MIPS: Xtalk: Update xwidget.h with known Xtalk device numbers ...
| * MIPS: Loongson: Naming style cleanup and reworkHuacai Chen2015-06-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, code of Loongson-2/3 is under loongson directory and code of Loongson-1 is under loongson1 directory. Besides, there are Kconfig options such as MACH_LOONGSON and MACH_LOONGSON1. This naming style is very ugly and confusing. Since Loongson-2/3 are both 64-bit general- purpose CPU while Loongson-1 is 32-bit SoC, we rename both file names and Kconfig symbols from loongson/loongson1 to loongson64/loongson32. [ralf@linux-mips.org: Resolve a number of simple conflicts.] Signed-off-by: Huacai Chen <chenhc@lemote.com> Cc: Steven J. Hill <Steven.Hill@imgtec.com> Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang <zhangfx@lemote.com> Cc: Zhangjin Wu <wuzhangjin@gmail.com> Cc: Kelvin Cheung <keguang.zhang@gmail.com> Patchwork: https://patchwork.linux-mips.org/patch/9790/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Merge tag 'rtc-v4.2-1' of ↵Linus Torvalds2015-06-2532-323/+1155
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "Core: - Coding style and whitespace fixes (interface, Makefile and Kconfig) - New rtc_tm_sub() helper - New CONFIG_RTC_SYSTOHC_DEVICE option - Removed rtc_set_mmss() New drivers: - Mediatek MT6397 - Cortina Gemini Drivers: - Year 2106 fixes for isl1208, pcf8563 and sunxi - update author email for at32ap700x and efi - ds1307: alarm fix - efi: use correct EFI 'epoch' - hym8563: make irq optional - imxdi: cleanups and better handling of the security/tamper monitoring - snvs: fix wakealarm - Compilation fixes or warning removal for gemini, mt6397, palmas, pfc8563 - Trivial cleanups for ab8500, ds1216, ds1286, ds1672, ep93xx, hid-sensor-time, max6900, max8998, max77686, max77802, mc13xxx, mv, mxc, s3c, spear, v3020 - Kconfig fixes for stmp3xxx and xgene" * tag 'rtc-v4.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (48 commits) rtc: remove useless I2C dependencies rtc: whitespace fixes rtc: Properly sort Makefile MAINTAINERS: Add RTC subsystem repository rtc: pfc8563: fix uninitialized variable warning rtc: ds1307: Enable the mcp794xx alarm after programming time rtc: hym8563: make the irq optional rtc: gemini: fix cocci warnings rtc: mv: correct 24 hour error message rtc: mv: use BIT() rtc: efi: use correct EFI 'epoch' rtc: interface: Remove rtc_set_mmss() sparc: time: Replace update_persistent_clock() with CONFIG_RTC_SYSTOHC rtc: NTP: Add CONFIG_RTC_SYSTOHC_DEVICE for NTP synchronization rtc: sunxi: Replace deprecated rtc_tm_to_time() rtc: isl1208: Replace deprecated rtc_tm_to_time() rtc: Introduce rtc_tm_sub() helper function rtc: pcf8563: Replace deprecated rtc_time_to_tm() and rtc_tm_to_time() rtc: palmas: Initialise bb_charging flag before using it rtc: simplify use of devm_ioremap_resource ...
| * | rtc: remove useless I2C dependenciesAlexandre Belloni2015-06-251-7/+3
| | | | | | | | | | | | | | | | | | | | | Multiple options depend on I2C but are already under under if I2C. Remove those useless dependencies. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
| * | rtc: whitespace fixesAlexandre Belloni2015-06-252-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | Some entries in the Kconfig are improperly indented with spaces instead of tabs. Also fix whitespaces in Makefile. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
| * | rtc: Properly sort MakefileAlexandre Belloni2015-06-251-17/+17
| | | | | | | | | | | | | | | | | | Properly sort the Makefile by filename Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
| * | rtc: pfc8563: fix uninitialized variable warningArnd Bergmann2015-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gcc is unable to prove that alm_pending is always initialized when it is used, so it prints a harmless warning: drivers/rtc/rtc-pcf8563.c: In function 'pcf8563_probe': drivers/rtc/rtc-pcf8563.c:449:5: warning: 'alm_pending' may be used uninitialized in this function [-Wmaybe-uninitialized] This uses the same conditional expression that is used inside of the pcf8563_get_alarm_mode() function, to help gcc figure it out and shut up that warning, and make the ARM defconfigs build again with no warnings. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: a45d528aab8b ("rtc: pcf8563: clear expired alarm at boot time") Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
| * | rtc: ds1307: Enable the mcp794xx alarm after programming timeNishanth Menon2015-06-251-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alarm interrupt enable register is at offset 0x7, while the time registers for the alarm follow that. When we program Alarm interrupt enable prior to programming the time, it is possible that previous time value could be close or match at the time of alarm enable resulting in interrupt trigger which is unexpected (and does not match the time we expect it to trigger). To prevent this scenario from occuring, program the ALM0_EN bit only after the alarm time is appropriately programmed. Ofcourse, I2C programming is non-atomic, so there are loopholes where the interrupt wont trigger if the time requested is in the past at the time of programming the ALM0_EN bit. However, we will not have unexpected interrupts while the time is programmed after the interrupt are enabled. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Grygorii Strashko <grygorii.strashko@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
OpenPOWER on IntegriCloud