- 05 9月, 2017 5 次提交
-
-
由 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>
-
- 01 9月, 2017 14 次提交
-
-
由 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>
-
由 Heiner Kallweit 提交于
Factor out irq_handler to struct chip_desc and use ds1307_irq as default. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Heiner Kallweit 提交于
Change the usage of variable want_irq to reflect its name. Don't set it to true in case wakeup is enabled but no interrupt number is given. In addition set variable ds1307_can_wakeup_device if chip->alarm is set only. This allows to simplify the code and make it better understandable. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Heiner Kallweit 提交于
Constify struct chip_desc variables. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Heiner Kallweit 提交于
Instead of storing the trickle_charger_setup value in struct chip_desc we can let function ds1307_trickle_init return it because it's used in the probe function only. This allows us to constify struct chip_desc variables in a next step. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Heiner Kallweit 提交于
Factor out the bbsqi bit to struct chip_desc. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Heiner Kallweit 提交于
The irq number is used in the probe function only, so we don't have to store it in struct ds1307. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Elaine Zhang 提交于
The RK808 and RK805 PMICs are using a similar register map. We can reuse the rtc driver for the RK805 PMIC. So let's add the RK805 in the Kconfig description. Signed-off-by: NElaine Zhang <zhangqing@rock-chips.com> Signed-off-by: NJoseph Chen <chenjh@rock-chips.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Arvind Yadav 提交于
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by <linux/i2c.h> work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 24 8月, 2017 8 次提交
-
-
由 Alexandre Belloni 提交于
There are no driver left using .open and .release. There is no good use case for them as there is nothing the character device interface does that should not be done in the sysfs interface or in-kernel interface. Remove those callbacks now to avoid future confusion. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
Currently, the IRQs are disabled when the rtc character device is closed. This means that the device needs to stay open to get alarms while the usual use case will open the device, set the alarm and close the device as is done in rtcwake. Keep the alarm functional on character device release so the platform can actually wakeup. Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Alexandre Belloni 提交于
Currently, the IRQs are disabled when the rtc character device is closed. This means that the device needs to stay open to get alarms while the usual use case will open the device, set the alarm and close the device. Keep the alarms functional on character device release. Note that the PIE are never enabled and would anyway be disabled by the core. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
Currently, the driver unregisters the IRQs when the rtc character device is closed. This means that the device needs to stay open to get alarms while the usual use case will open the device, set the alarm and close the device. Move the IRQ requests to sa1100_rtc_probe() and use the devm managed versions so we don't need to free them. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
In the error path of sa1100_rtc_open(), info->clk is disabled which will happen again in sa1100_rtc_remove() when the module is removed whereas it is only enabled once in sa1100_rtc_init(). Fixes: 0cc0c38e ("drivers/rtc/rtc-sa1100.c: move clock enable/disable to probe/remove") Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Alexandre Belloni 提交于
pxa_rtc_open() registers the interrupt handler which will access the RTC registers. However, pxa_rtc_open() is called before the register range is ioremapped. Instead, call it after devm_ioremap(). Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Alexandre Belloni 提交于
The last remaining sysfs attribute is undocumented and useless as it can only be used to debug the driver. Remove it. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Eric Cooper 提交于
Don't require an IRQ if the wakeup-source device-tree property is present. Signed-off-by: NEric Cooper <ecc@cmu.edu> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 22 8月, 2017 2 次提交
-
-
由 Alexandre Belloni 提交于
Currently, the driver unregisters the IRQs when the rtc character device is closed. This means that the device needs to stay open to get alarms while the usual use case will open the device, set the alarm and close the device. Move the IRQ requests to puv3_rtc_probe() and use the devm managed versions so we don't need to free them. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
Use managed RTC device allocation as this allows for further cleanup. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 31 7月, 2017 6 次提交
-
-
由 Colin Ian King 提交于
The check on ret < 0 is redundant as the goto destination is the next statment. Remove this redudant check and goto. Detected by CoverityScan, CID#1268785 ("Identical code for different branches") Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Colin Ian King 提交于
There are two error return paths that do not kfree clk_data and we end up with a memory leak. Fix these with a kfree error exit path. Detected by CoverityScan, CID#1402959 ("Resource Leak") Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexey Klimov 提交于
Remove double init of spinlock in sun6i_rtc_clk_init() Fixes: 847b8bf62eb4 ("rtc: sun6i: Expose the 32kHz oscillator") Signed-off-by: NAlexey Klimov <alexey.klimov@arm.com> Reviewed-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Heiner Kallweit 提交于
Commit 8b44f5be ("ARM: dts: armada: replace isil,irq2-can-wakeup-machine with wakeup-source property") removed the last usage of "isil,irq2-can-wakeup-machine" almost two years ago. So I think we can get rid of supporting this legacy binding. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Fabien Lahoudere 提交于
Implements RTC_VL_READ and RTC_VL_CLR ioctls. Signed-off-by: NFabien Lahoudere <fabien.lahoudere@collabora.co.uk> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Fabien Lahoudere 提交于
If RTC time have been altered by low voltage, we notify users that RTC time is invalid by returning -EINVAL. The RTC time needs to be set correctly to clear the invalid flag. Signed-off-by: NFabien Lahoudere <fabien.lahoudere@collabora.co.uk> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 10 7月, 2017 1 次提交
-
-
由 Benjamin Gaignard 提交于
Make driver use u64 variables and functions to be sure that it will support dates after year 2038. Signed-off-by: NBenjamin Gaignard <benjamin.gaignard@linaro.org> Acked-by: NPatrice Chotard <patrice.chotard@st.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 07 7月, 2017 4 次提交
-
-
由 Alexandre Belloni 提交于
ds1307_remove() is now empty, remove it 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 removes a possible race condition and crash and allows for further improvement of the driver. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
rv8803_remove() is now empty, remove it. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-