- 01 9月, 2017 9 次提交
-
-
由 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 14 次提交
-
-
由 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> -
由 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 allows for further improvement of the driver. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
Many RTCs have an on board non volatile storage. It can be battery backed RAM or an EEPROM. Use the nvmem subsystem to export it to both userspace and in-kernel consumers. This stays compatible with the previous (non documented) ABI that was using /sys/class/rtc/rtcx/device/nvram to export that memory. But will warn about the deprecation. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
While highly unlikely, it is possible to get an interrupt as soon as it is requested. In that case, at91_rtc_interrupt() will be called with rtc == NULL. Solve that by using devm_rtc_allocate_device/rtc_register_device. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
Introduce rtc_register_device() to register an already allocated and initialized struct rtc_device. It automatically sets up the owner and the two steps allocation/registration will allow to remove race conditions in the IRQ handling of some driver. It also allows to properly extend the core without adding more arguments to rtc_device_register(). Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
Create rtc_device_get_id to allocate the id for an RTC. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Alexandre Belloni 提交于
Create rtc_allocate_device to allocate memory for a struct rtc_device and initialize it. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Amelie Delaunay 提交于
This patch adds support for STM32H7 RTC. On STM32H7, the RTC bus interface clock (APB clock) needs to be enabled. Signed-off-by: NAmelie Delaunay <amelie.delaunay@st.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Sean Nyekjaer 提交于
The ds1308 variant is very similar to the already supported ds1338 variant, it have more debug registers and a square wave clock output. Signed-off-by: NSean Nyekjaer <sean.nyekjaer@prevas.dk> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Kirill Esipov 提交于
DS3232/DS3234 has the temperature registers with a resolution of 0.25 degree celsius. This enables to get the value through hwmon. # cat /sys/class/hwmon/hwmon0/temp1_input 37250 Signed-off-by: NKirill Esipov <yesipov@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-