- 01 9月, 2017 7 次提交
-
-
由 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>
-
- 31 7月, 2017 1 次提交
-
-
由 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>
-
- 07 7月, 2017 5 次提交
-
-
由 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> -
由 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>
-
由 Heiner Kallweit 提交于
The driver has lots of places with chip-specific code what doesn't necessarily facilitate maintenance. Let's describe chip-specific differences in century bit handling in struct chip_desc to improve this. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 06 7月, 2017 1 次提交
-
-
由 Heiner Kallweit 提交于
After the switch to regmap we can now make use of regmap_update_bits to simplify read/modify/write ops. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 25 6月, 2017 1 次提交
-
-
由 Marek Vasut 提交于
Add support for yet another RTC chip, Epson RX8130CE. This time around, the chip has slightly permutated registers and also the register starts at 0x10 instead of 0x0 . So far, we only support the RTC and NVRAM parts of the chip, Alarm and Timer is not supported. Signed-off-by: NMarek Vasut <marex@denx.de> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Felipe Balbi <balbi@ti.com> Cc: Nishanth Menon <nm@ti.com> Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 03 6月, 2017 1 次提交
-
-
由 Alexandre Belloni 提交于
ds1307->rtc->name is a copy of ds1307->name, use it instead. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 31 5月, 2017 1 次提交
-
-
由 David Lowe 提交于
This patch extends the fixes for ds1337, ds1339, ds3231 in commit 8bc2a407 ("rtc: ds1307: add support for the DT property 'wakeup-source'") to mcp794xx devices, so that those parts can similarly be used as a wakeup source without an IRQ to the processor. Tested on Raspberry Pi ZeroW with MCP79400. Signed-off-by: NDavid Lowe <dave-lowe@ntlworld.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 26 5月, 2017 1 次提交
-
-
由 Heiner Kallweit 提交于
This patch converts the ds1307 driver to using regmap. It's a rather big patch and I can test with DS3231 only. With this chip it's working fine. I'd appreciate if people with other supported hardware could test as well. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 14 4月, 2017 2 次提交
-
-
由 Alexandre Belloni 提交于
m41t0 was added to the I2C device ID table but not the OF table. Fix that. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> -
由 Stefan Agner 提交于
The m41t0 variant is very similar to the already supported m41t00 variant, with the notable exception of the oscillator fail bit. The data sheet notes: If the oscillator fail (OF) bit is internally set to a '1,' this indicates that the oscillator has either stopped, or was stopped for some period of time and can be used to judge the validity of the clock and date data. The bit will get cleared with a regular write of the system time, so no changes are needed to clear it. Signed-off-by: NStefan Agner <stefan@agner.ch> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 09 3月, 2017 1 次提交
-
-
由 Javier Martinez Canillas 提交于
The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:<device>. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 19 12月, 2016 1 次提交
-
-
由 Tin Huynh 提交于
This patch enables ACPI support for rtc-ds1307 driver. Signed-off-by: NTin Huynh <tnhuynh@apm.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 01 9月, 2016 2 次提交
-
-
由 Alexandre Belloni 提交于
Intersil ISL12057 is a drop-in replacement for DS1337. It can be supported by the ds1307 driver. Acked-by: NArnaud Ebalard <arno@natisbad.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Alexandre Belloni 提交于
Add an option to properly support the century bit of ds1337 and compatibles and ds1340. Because the driver had a bug until now, it is not possible to switch users to the fixed code directly as RTCs in the field will wrongly have the century bit set. Acked-by: NArnaud Ebalard <arno@natisbad.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 09 7月, 2016 2 次提交
-
-
由 Uwe Kleine-König 提交于
Since commit d68778b8 ("rtc: initialize output parameter for read alarm to "uninitialized"") there is no need to explicitly set unsupported members to -1. So drop the respective assignments from drivers. Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Keerthy 提交于
The reset value of weekday is 0x1. This is wrong since the reset values of the day/month/year make up to Jan 1 2001. When computed weekday comes out to be Monday. On a scale of 1-7(Sunday - Saturday) it should be 0x2. So we should not be relying on the reset value. Hence compute the wday using the current date/month/year values. Check if reset wday is any different from the computed wday, If different then set the wday which we computed using date/month/year values. Document Referred: http://ww1.microchip.com/downloads/en/DeviceDoc/20002266F.pdf Fixes: 1d1945d2 "drivers/rtc/rtc-ds1307.c: add alarm support for mcp7941x chips" Signed-off-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 20 5月, 2016 3 次提交
-
-
由 Stephen Boyd 提交于
This flag is a no-op now (see commit 47b0eeb3 "clk: Deprecate CLK_IS_ROOT", 2016-02-02) so remove it. Cc: Akinobu Mita <akinobu.mita@gmail.com> Cc: Michael Tatarinov <kukabu@gmail.com> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Nicolas Boullis 提交于
If a previously-set alarm was disabled and then triggered, it may still be pending when a new alarm is configured. Then, if the alarm is enabled before the pending alarm is cleared, then an interrupt is immediately raised. Unfortunately, when the alarm is cleared and enabled during the same I²C block write, the chip (at least the DS1339 I have) considers that the alarm is enabled before it is cleared, and raises an interrupt. This patch ensures that the pending alarm is cleared before the alarm is enabled. Signed-off-by: NNicolas Boullis <nboullis@debian.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Nicolas Boullis 提交于
The i2c_smbus_read_i2c_block_data function returns 0 on success, not the number of bytes written. Hence, when there are 32 bytes or less to send, the ds1307_native_smbus_write_block_data function returns 0 on success, while it returns the number of bytes when there are more than 32. The ds1307_write_block_data always returns the number of bytes on success. Signed-off-by: NNicolas Boullis <nboullis@debian.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 22 4月, 2016 2 次提交
-
-
由 Nishanth Menon 提交于
With commit 8bc2a407 ("rtc: ds1307: add support for the DT property 'wakeup-source'") we lost the ability for rtc irq functionality for devices that are actually hooked on a real IRQ line and have capability to wakeup as well. This is not an expected behavior. So, instead of just not requesting IRQ, skip the IRQ requirement only if interrupts are not defined for the device. Fixes: 8bc2a407 ("rtc: ds1307: add support for the DT property 'wakeup-source'") Reported-by: NTony Lindgren <tony@atomide.com> Cc: Michael Lange <linuxstuff@milaw.biz> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: NNishanth Menon <nm@ti.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Zhuang Yuyao 提交于
while retrieving temperature from ds3231, the result may be overflow since s16 is too small for a multiplication with 250. ie. if temp_buf[0] == 0x2d, the result (s16 temp) will be negative. Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Tested-by: NMichael Tatarinov <kukabu@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 15 3月, 2016 1 次提交
-
-
由 Akinobu Mita 提交于
DS3231 has programmable square-wave output signal. This enables to use this feature as a clock provider of common clock framework. Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Reviewed-by: NMichael Turquette <mturquette@baylibre.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 05 2月, 2016 2 次提交
-
-
由 Akinobu Mita 提交于
DS3231 has the temperature registers with a resolution of 0.25 degree celsius. This enables to get the value through hwmon. # cat /sys/class/i2c-adapter/i2c-2/2-0068/hwmon/hwmon0/temp1_input 21000 Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Acked-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Michael Lange 提交于
For RTC chips with no IRQ directly connected to the SoC, the RTC chip can be forced as a wakeup source by stating that explicitly in the device's .dts file using the "wakeup-source" boolean property. This will guarantee the 'wakealarm' sysfs entry is available on the device, if supported by the RTC. With these changes to the driver rtc-ds1307 and the necessary entries in the .dts file, I get an working ds1337 RTC on the Witty Pi extension board by UUGear for the Raspberry Pi. An example for the entry in the .dts file: rtc: ds1337@68 { compatible = "dallas,ds1337"; reg = <0x68>; wakeup-source; If the "wakeup-source" property is set, do not request an IRQ. Set also UIE mode to unsupported, to get a working 'hwclock' binary. Signed-off-by: NMichael Lange <linuxstuff@milaw.biz> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 12 1月, 2016 1 次提交
-
-
由 Rasmus Villemoes 提交于
This makes the generated code slightly smaller. Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 27 11月, 2015 1 次提交
-
-
由 Simon Guinot 提交于
With the actual code, read_alarm() always returns -EINVAL when called during the RTC device registration. This prevents from retrieving an already configured alarm in hardware. This patch fixes the issue by moving the HAS_ALARM bit configuration (if supported by the hardware) above the rtc_device_register() call. Signed-off-by: NSimon Guinot <simon.guinot@sequanux.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 25 11月, 2015 1 次提交
-
-
由 Felipe Balbi 提交于
Since commit 3fffd128 ("i2c: allow specifying separate wakeup interrupt in device tree") we have automatic wakeup irq support for i2c devices. That commit missed the fact that rtc-1307 had its own wakeup irq handling and ended up introducing a kernel splat for at least Beagle x15 boards. Fix that by reverting original commit _and_ passing correct interrupt names on DTS so i2c-core can choose correct IRQ as wakeup. Now that we have automatic wakeirq support, we can revert the original commit which did it manually. Fixes the following warning: [ 10.346582] WARNING: CPU: 1 PID: 263 at linux/drivers/base/power/wakeirq.c:43 dev_pm_attach_wake_irq+0xbc/0xd4() [ 10.359244] rtc-ds1307 2-006f: wake irq already initialized Cc: Tony Lindgren <tony@atomide.com> Cc: Nishanth Menon <nm@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Acked-by: NTony Lindgren <tony@atomide.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 08 11月, 2015 1 次提交
-
-
由 Tero Kristo 提交于
mcp794xx alarm registers must be written in BCD format. However, the alarm programming logic neglected this by adding one to the value after bin2bcd conversion has been already done, writing bad values to month register in case the alarm being set is in October. In this case, the alarm month value becomes 0x0a instead of the expected 0x10. Fix by moving the +1 addition within the bin2bcd call also. Fixes: 1d1945d2 ("drivers/rtc/rtc-ds1307.c: add alarm support for mcp7941x chips") Signed-off-by: NTero Kristo <t-kristo@ti.com> Acked-by: NNishanth Menon <nm@ti.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 05 9月, 2015 2 次提交
-
-
由 Vladimir Zapolskiy 提交于
The change removes redundant sysfs binary file boundary checks, since this task is already done on caller side in fs/sysfs/file.c Signed-off-by: NVladimir Zapolskiy <vz@mleia.com> 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>
-