- 27 10月, 2017 1 次提交
-
-
由 Bastian Stender 提交于
Make Epson RX8130 device tree and ACPI aware. Fixes: ee0981be ("rtc: ds1307: Add support for Epson RX8130CE") Signed-off-by: NBastian Stender <bst@pengutronix.de> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 26 10月, 2017 5 次提交
-
-
由 Sean Wang 提交于
Give a better description for original MediaTek RTC driver as PMIC based RTC in order to distinguish SoC based RTC. Also turning all words with Mediatek to MediaTek here. Cc: Eddie Huang <eddie.huang@mediatek.com> Signed-off-by: NSean Wang <sean.wang@mediatek.com> Acked-by: NEddie Huang <eddie.huang@mediatek.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Sean Wang 提交于
This patch introduces the driver for the RTC on MT7622 SoC. Signed-off-by: NSean Wang <sean.wang@mediatek.com> Reviewed-by: NYingjoe Chen <yingjoe.chen@mediatek.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Russell King 提交于
Add support for reading and writing the RTC offset register, converting it to the corresponding parts-per-billion value. When setting the drift, the PCF8523 has two modes: one applies the adjustment every two hours, the other applies the adjustment every minute. We select between these two modes according to which ever gives the closest PPB value to the one requested. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Russell King 提交于
Add support for trimming the RTC using the offset mechanism. This RTC supports two modes: low update mode and high update mode. Low update mode has finer precision than high update mode, so we use the low mode where possible. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Russell King 提交于
The RTC offset correction documentation is not very clear about the exact relationship between "offset" and the effect it has on the RTC. Supplement the documentation with an equation giving the relationship. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 13 10月, 2017 9 次提交
-
-
由 Alexandre Belloni 提交于
Instead of adding a binary sysfs attribute from the driver (which suffers from a race condition as the attribute appears after the device), use the core to register an nvmem device. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
Disabling interrupts when removing the driver is bad practice as this will prevent some platform from waking up when using that RTC. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
This allows for future improvement of the driver. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
There is a race condition that can happen if abx80x_probe() fails after the rtc registration succeeded. Solve that by moving the registration at the end of the probe function. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
This allows for future improvement of the driver. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
Instead of adding a binary sysfs attribute from the driver (which suffers from a race condition as the attribute appears after the device), use the core to register an nvmem device. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
This allows for future improvement of the driver. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
Instead of adding a binary sysfs attribute from the driver (which suffers from a race condition as the attribute appears after the device), use the core to register an nvmem device. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
This allows for future improvement of the driver. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 12 10月, 2017 8 次提交
-
-
由 Russell King 提交于
On some platforms, the interrupt for the PL031 is optional. Avoid trying to claim the interrupt if it's not specified. Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Russell King 提交于
If the RTC has no interrupt, there is little point in exposing the RTC alarm capabilities, as it can't be used as a wakeup source nor can it deliver an event to userspace. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Russell King 提交于
Use the devm_* APIs for allocating memory and mapping the memory in the probe function to relieve the driver from having to deal with this in the cleanup paths. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Russell King 提交于
The AMBA device IDs should be marked const. Make that so. Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Dan Carpenter 提交于
We don't need both "ret" and "err" when they do the same thing. All the functions called here return zero on success or negative error codes. It's more clear to return a literal zero at the end instead of "return ret;" Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Mathieu Malaterre 提交于
The current timeout for waiting for WRDY is not always sufficient. Always increase it to 10000 even on JZ4740. This is technically only required on JZ4780, where the current symptoms seen after a hard reboot are: jz4740-rtc 10003000.rtc: rtc core: registered 10003000.rtc as rtc0 jz4740-rtc 10003000.rtc: Could not write to RTC registers jz4740-rtc: probe of 10003000.rtc failed with error -5 Suggested-by: NAlex Smith <alex.smith@imgtec.com> Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: NMathieu Malaterre <malat@debian.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Mathieu Malaterre 提交于
Trivial fix in error message with duplicate 'write' Signed-off-by: NMathieu Malaterre <malat@debian.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Heiner Kallweit 提交于
The current code for checking and fixing the weekday in ds1307_probe faces some issues: - This check is applied to all chips even if its applicable (AFAIK) to mcp794xx only - The check uses MCP794XX constants for registers and bits even though it's executed also on other chips (ok, this could be fixed easily) - It relies on tm_wday being properly populated when core calls set_time and set_alarm. This is not guaranteed at all. First two issue we could solve by moving the check to the mcp794xx-specific initialization (where also VBATEN flag is set). The proposed alternative is in the set_alarm path for mcp794xx only and calculates the alarm weekday based on the current weekday in the RTC timekeeping regs and the difference between alarm date and current date. So we are fine with any weekday even if it doesn't match the date. Still there are cases where this could fail, e.g.: - rtc date/time + weekday have power-on-reset default values - alarm is set to actual date/time + x - set_time is called (may change diff between rtc weekday and actual weekday) But similar issues we have with the current code too: - rtc date/time + weekday have power-on-reset default values - alarm is set to rtc date/time + x - set_time is called before the alarm triggers Using random rtc date/time with relative alarms simply can interfere with set_time. I'm not totally convinced of either option yet. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 28 9月, 2017 1 次提交
-
-
由 Alexandre Belloni 提交于
If there is any non expired timer in the queue, the RTC alarm is never set. This is an issue when adding a timer that expires before the next non expired timer. Ensure the RTC alarm is set in that case. Fixes: 2b2f5ff0 ("rtc: interface: ignore expired timers when enqueuing new timers") Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 26 9月, 2017 1 次提交
-
-
由 Alexandre Belloni 提交于
The vendor string for Microcrystal is microcrystal. Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 05 9月, 2017 8 次提交
-
-
由 Alexandre Belloni 提交于
Octal permissions are preferred over symbolic permissions. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
Fix unnecessary or unbalanced braces. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
Alignment should always match open parenthesis. Also remove two unnecessary blank lines Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
Use the BIT macro were possbiel. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
u32 should be used instead of uint32_t Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
Use sizeof where possible to ensure we don't read/write more than the allocated buffer. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
ds1307->regs is never used before being read or initialized locally. There is no point in keeping a copy in memory. Also limit the size of the read buffer to what is really used, rename buf to regs for consistency and use sizeof() where possible. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Andreas Färber 提交于
Based on QNAP's arch/arm/mach-rtk119x/driver/rtk_rtc_drv.c code and mach-rtk119x/driver/dc2vo/fpga/include/mis_reg.h register definitions. The base year 2014 was observed on all of Zidoo X9S, ProBox2 Ava and Beelink Lake I. Signed-off-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 04 9月, 2017 1 次提交
-
-
由 Wolfram Sang 提交于
include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: NMark Brown <broonie@kernel.org> Acked-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: NJonathan Cameron <jic23@kernel.org> Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: NKishon Vijay Abraham I <kishon@ti.com> Acked-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: NThierry Reding <thierry.reding@gmail.com> Acked-by: NTony Lindgren <tony@atomide.com> Acked-by: NDaniel Thompson <daniel.thompson@linaro.org> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 01 9月, 2017 6 次提交
-
-
由 Maxime Ripard 提交于
The RTC can output its 32kHz clock outside of the SoC, for example to clock a WiFi chip. Create a new clock that other devices will be able to retrieve, while maintaining the DT stability by providing a default name for that clock if clock-output-names doesn't list one. Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Miodrag Dinic 提交于
Add device driver for a virtual RTC device in Android emulator. The compatible string used by OS for binding the driver is defined as "google,goldfish-rtc". Signed-off-by: NMiodrag Dinic <miodrag.dinic@imgtec.com> Signed-off-by: NGoran Ferenc <goran.ferenc@imgtec.com> Signed-off-by: NAleksandar Markovic <aleksandar.markovic@imgtec.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Nikita Yushchenko 提交于
This adds support for reading and writing date/time from/to ds1341 chip. ds1341 chip has other features - alarms, input clock (can be used instead of intercal oscillator for better accuracy), output clock ("square wave generation"). However, not all of that is available at the same time. Same chip pins, CLKIN/nINTA and SQW/nINTB, can be used either for input/output clocks, or for alarm interrupts. Role of these pins on particular board depends on hardware wiring. We can add device tree properties that describe if each of pins is wired as clock, or as interrupt, or left unconnected, and enable support for corresponding functionality based on that. But that is cumbersome, requires hardware for testing, and has to deal with bit enabling/disabling output clock also affects which pins alarm interrupts are routed to. Another factor is that there are hardware setups (i.e. ZII RDU2) that power DS1341 from SuperCap, which makes power saving critical. For such setups, kernel driver should leave register bits that control mentioned pins in the state configured by bootloader. Given all that, it was decided to limit support to "only date/time" for now. That is enough for common use case. Full (and cumbersome) implementation can be added later if ever needed. Signed-off-by: NNikita Yushchenko <nikita.yoush@cogentembedded.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Tested-by: NAleksander Morgado <aleksander@aleksander.es> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Heiner Kallweit 提交于
Remove member nvram_offset from struct ds1307 and use the value stored in struct chip_desc directly. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Heiner Kallweit 提交于
Factor out offset to struct chip_desc and remove it from struct ds1307. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Heiner Kallweit 提交于
Factor out rtc_ops to struct chip_desc and use ds13xx_rtc_ops as default. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-