- 05 9月, 2015 31 次提交
-
-
由 Alexandre Belloni 提交于
Sort included headers alphabetically. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
-
由 Alexandre Belloni 提交于
rtc->sclk necessarily points to a valid clocks at this point. Else the probe would have aborted. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
-
由 Alexandre Belloni 提交于
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: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
-
由 Leo Yan 提交于
The email address missed character ">", so add it. Signed-off-by: NLeo Yan <leo.yan@linaro.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Javier Martinez Canillas 提交于
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: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Adrian Huang 提交于
Commit d5a1c7e3 ("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: NAdrian Huang <ahuang12@lenovo.com> Tested-by: NEgbert Eich <eich@suse.de> Tested-by: NDiego Ercolani <diego.ercolani@gmail.com> Cc: Borislav Petkov <bp@suse.de> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Adrian Huang 提交于
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: NAdrian Huang <ahuang12@lenovo.com> Tested-by: NEgbert Eich <eich@suse.de> Tested-by: NDiego Ercolani <diego.ercolani@gmail.com> Cc: Borislav Petkov <bp@suse.de> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 S Twiss 提交于
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: NSteve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Henry Chen 提交于
Implement the suspend/resume function in order to control rtc's irq_wake flag and handle as wakeup source. Signed-off-by: NHenry Chen <henryc.chen@mediatek.com> Acked-by: NEddie Huang <eddie.huang@mediatek.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Dmitry Torokhov 提交于
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: NDmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Dmitry Torokhov 提交于
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: NDmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Dmitry Torokhov 提交于
Users of rtc_does_wakealarm() return value treat it as boolean so let's change the signature accordingly. Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Henri Roosen 提交于
Since commit e6229bec ("rtc: make rtc_update_irq callable with irqs enabled") rtc_update_irq() is callable with irqs enabled. Signed-off-by: NHenri Roosen <henriroosen@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Octavian Purdila 提交于
Since dab472eb ("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: NOctavian Purdila <octavian.purdila@intel.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Dmitry Torokhov 提交于
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: NDmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Dmitry Torokhov 提交于
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: NDmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Dmitry Torokhov 提交于
Commit 59cca865 ("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: NDmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Guo Zeng 提交于
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 b1999477 ("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: NGuo Zeng <guo.zeng@csr.com> Signed-off-by: NBarry Song <Baohua.Song@csr.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Vaibhav Jain 提交于
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: NMichael Neuling <mikey@neuling.org> Acked-by: NNeelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: NVaibhav Jain <vaibhav@linux.vnet.ibm.com> Acked-by: NStewart Smith <stewart@linux.vnet.ibm.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Joachim Eastwood 提交于
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: NJoachim Eastwood <manabian@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Krzysztof Kozlowski 提交于
platform_driver does not need to set an owner because platform_driver_register() will set it. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Krzysztof Kozlowski 提交于
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Andrea Scian 提交于
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: NAndrea Scian <andrea.scian@dave.eu> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Andrea Scian 提交于
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: NAndrea Scian <andrea.scian@dave.eu> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Vaibhav Hiremath 提交于
Along with DT support, this patch also cleans up the unnecessary code around 'rtc_wakeup' initialization. Signed-off-by: NChao Xie <chao.xie@marvell.com> Signed-off-by: NVaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Maninder Singh 提交于
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: NManinder Singh <maninder1.s@samsung.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Vaishali Thakkar 提交于
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: NVaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Nishanth Menon 提交于
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 4990d4fe ("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 2a0b965c ("serial: omap: Add support for optional wake-up") + ee83bd3b ("serial: omap: Switch wake-up interrupt to generic wakeirq") Signed-off-by: NNishanth Menon <nm@ti.com> Reviewed-by: NGrygorii Strashko <grygorii.strashko@ti.com> Acked-by: NTony Lindgren <tony@atomide.com> Acked-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Nishanth Menon 提交于
It is always a good practice to keep the #includes sorted Signed-off-by: NNishanth Menon <nm@ti.com> Acked-by: NFelipe Balbi <balbi@ti.com> Reviewed-by: NGrygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Nishanth Menon 提交于
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: NNishanth Menon <nm@ti.com> Acked-by: NFelipe Balbi <balbi@ti.com> Reviewed-by: NGrygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Felipe Balbi 提交于
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: NFelipe Balbi <balbi@ti.com> Signed-off-by: NNishanth Menon <nm@ti.com> Reviewed-by: NGrygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 11 8月, 2015 1 次提交
-
-
由 Shawn Guo 提交于
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: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NShawn Guo <shawnguo@kernel.org> Acked-by: NFrank Li <Frank.Li@freescale.com> Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 06 8月, 2015 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
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: NJoel Becker <jlbec@evilplan.org> Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: NAlessandro Zummo <a.zummo@towertech.it> Acked-by: NMike Snitzer <snitzer@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 05 8月, 2015 2 次提交
-
-
由 Philippe Reynes 提交于
Add device tree support for the mxc rtc driver. Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: NPhilippe Reynes <tremyfr@gmail.com> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
由 Philippe Reynes 提交于
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: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: NPhilippe Reynes <tremyfr@gmail.com> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
- 24 7月, 2015 1 次提交
-
-
由 Lee Jones 提交于
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: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 18 7月, 2015 2 次提交
-
-
由 Fabio Estevam 提交于
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: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Wei-Ning Huang 提交于
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: NWei-Ning Huang <wnhuang@google.com> Acked-by: NEddie Huang <eddie.huang@mediatek.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 15 7月, 2015 1 次提交
-
-
由 Frank Li 提交于
snvs included rtc, on/off key, power-off module change to syscon to access register Signed-off-by: NFrank Li <Frank.Li@freescale.com> Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
- 25 6月, 2015 1 次提交
-
-
由 Alexandre Belloni 提交于
Multiple options depend on I2C but are already under under if I2C. Remove those useless dependencies. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-