28 Jun, 2011
1 commit
-
PT7C4338 chip is being manufactured by Pericom Technology Inc. It is a
serial real-time clock which provides:1) Low-power clock/calendar.
2) Programmable square-wave output.It has 56 bytes of nonvolatile RAM. Its register set is same as that of
rtc device: DS1307.Signed-off-by: Priyanka Jain
Acked-by: Timur Tabi
Reviewed-by: Wolfram Sang
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
04 Feb, 2011
1 commit
-
Some rtc drivers use the ioctl method instead of the alarm_irq_enable
method for enabling alarm interupts. With the new virtualized RTC
rework, its important for drivers to use the alarm_irq_enable instead.This patch converts the drivers that use the AIE ioctl method to
use the alarm_irq_enable method. Other ioctl cmds are left untouched.I have not been able to test or even compile most of these drivers.
Any help to make sure this change is correct would be appreciated!CC: Alessandro Zummo
CC: Thomas Gleixner
CC: Marcelo Roberto Jimenez
Reported-by: Marcelo Roberto Jimenez
Tested-by: Marcelo Roberto Jimenez
Signed-off-by: John Stultz
11 Jan, 2011
1 commit
-
Helper functions for I2C and SMBus transactions don't modify the
i2c_client that is passed to them, so it can be marked const.Signed-off-by: Jean Delvare
30 Jun, 2010
1 commit
-
The ds1307 driver misreads the ds1388 registers when checking for 12 or 24
hour mode. Instead of checking the hour register it reads the minute
register. Therefore the driver thinks minutes >= 40 has the 12HR bit set
and resets the minute register by zeroing the high bits. This results in
minutes are reset to 0-9, jumping back in time 40 or 50 minutes. The time
jump is also written back to the RTC.Signed-off-by: Joakim Tjernlund
Cc: Wan ZongShun
Cc: Alessandro Zummo
Cc: Paul Gortmaker
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 May, 2010
1 commit
-
This allows bin_attr->read,write,mmap callbacks to check file specific data
(such as inode owner) as part of any privilege validation.Signed-off-by: Chris Wright
Signed-off-by: Greg Kroah-Hartman
18 Dec, 2009
1 commit
-
RTC core won't allow wakeup alarms to be set if RTC devices' parent (i.e.
i2c_client or spi_device) isn't wakeup capable.For I2C devices there is I2C_CLIENT_WAKE flag exists that we can pass via
board info, and if set, I2C core will initialize wakeup capability. For
SPI devices there is no such flag at all.I believe that it's not platform code responsibility to allow or disallow
wakeups, instead, drivers themselves should set the capability if a device
can trigger wakeups.That's what drivers/base/power/sysfs.c says:
* It is the responsibility of device drivers to enable (or disable)
* wakeup signaling as part of changing device power states, respecting
* the policy choices provided through the driver model.I2C and SPI RTC devices send wakeup events via interrupt lines, so we
should set the wakeup capability if IRQ is routed.Ideally we should also check irq for wakeup capability before setting
device's capability, i.e.if (can_irq_wake(irq))
device_set_wakeup_capable(&client->dev, 1);But there is no can_irq_wake() call exist, and it is not that trivial to
implement it for all interrupts controllers and complex/cascaded setups.drivers/base/power/sysfs.c also covers these cases:
* Devices may not be able to generate wakeup events from all power
* states. Also, the events may be ignored in some configurations;
* for example, they might need help from other devices that aren't
* activeSo there is no guarantee that wakeup will actually work, and so I think
there is no point in being pedantic wrt checking IRQ wakeup capability.Signed-off-by: Anton Vorontsov
Cc: David Brownell
Cc: Ben Dooks
Cc: Jean Delvare
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
16 Dec, 2009
1 commit
-
It's possible to have RTC irq shared with other device (e.g.
mpc8349e-mitx board shares ds1339 irq with phy one). Handle this in
driver.Signed-off-by: Dmitry Eremin-Solenikov
Signed-off-by: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
23 Sep, 2009
1 commit
-
This code is not executed before ds1307->rtc has been successfully
initialized to the result of calling rtc_device_register. Thus the test
that ds1307->rtc is not NULL is always true.A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)//
@match exists@
expression x, E;
statement S1, S2;
@@x = rtc_device_register(...)
... when != x = E
(
* if (x == NULL || ...) S1 else S2
|
* if (x == NULL && ...) S1 else S2
)
//Signed-off-by: Julia Lawall
Acked-by: Wolfram Sang
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
20 Jun, 2009
1 commit
-
The rtc_update_irq() might be called with irqs enabled, if a interrupt
handler was registered without IRQF_DISABLED. Use
spin_lock_irqsave/spin_unlock_irqrestore instead of spin_lock/spin_unlock.Also update kerneldoc and drivers which do extra work to follow the
current interface spec, as suggestted by David Brownell.Signed-off-by: Atsushi Nemoto
Cc: Alessandro Zummo
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
19 Jun, 2009
2 commits
-
Add ds3231 variant. For that, the BBSQI bit position was changed from a
simple define into a lookup-array as it differs. This also removes
writing to an unused bit in case of the ds1337.Signed-off-by: Wolfram Sang
Acked-by: David Brownell
Signed-off-by: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Extend the ds1307 driver to support ds1388 too.
Signed-off-by: Joakim Tjernlund
Signed-off-by: Alessandro Zummo
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
01 Apr, 2009
2 commits
-
Add support for the EPSON RX8025 RTC. The date/time registers of this
chip are compatible with the DS1307.Signed-off-by: Matthias Fuchs
Signed-off-by: Alessandro Zummo
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Allow the rtc-ds1307 driver to work with SMBus controllers like nforce2
that do not support i2c block transfers.Signed-off-by: Ed Swierk
Acked-by: Jean Delvare
Acked-by: David Brownell
Cc: Alessandro Zummo
Cc: BARRE Sebastien
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 Jan, 2009
2 commits
-
Remove RTC register value checks from the rtc-ds1307 probe() function.
They were left over from the legacy style I2C driver, which had to defend
against finding a non-RTC chip when the driver was probed.Also fix a minor glitch in the alarm support: DS1307 chips don't have
alarms, so name those methods after one of the chips which actually *do*
have alarms (DS1337).Signed-off-by: Jüri Reitel
Signed-off-by: David Brownell
Cc: Sebastien Barre
Cc: Alessandro Zummo
Acked-by: Jean Delvare
Cc: Rodolfo Giometti
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Change i2c access functions to SMBus access functions in order to use the
ds1307 with SMBus adapter.Signed-off-by: Sebastien Barre
Acked-by: David Brownell
Tested-by: David Brownell
Acked-by: Alessandro Zummo
Acked-by: Jean Delvare
Cc: Rodolfo Giometti
Tested-by: Sebastien Barre
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
20 Oct, 2008
2 commits
-
Tejun's commit 7b595756ec1f49e0049a9e01a1298d53a7faaa15 made sysfs
attribute->owner unnecessary. But the field was left in the structure to
ease the merge. It's been over a year since that change and it is now
time to start killing attribute->owner along with its users - one arch at
a time!This patch is attempt #1 to get rid of attribute->owner only for
CONFIG_X86_64 or CONFIG_X86_32 . We will deal with other arches later on
as and when possible - avr32 will be the next since that is something I
can test. Compile (make allyesconfig / make allmodconfig / custom config)
and boot tested.akpm: the idea is that we put the declaration of sttribute.owner inside
`#ifndef CONFIG_X86'. But that proved to be too ambitious for now because
new usages kept on turning up in subsystem trees.[akpm: remove the ifdef for now]
Signed-off-by: Parag Warudkar
Cc: Greg KH
Cc: Ingo Molnar
Cc: Tejun Heo
Cc: Len Brown
Cc: Jens Axboe
Cc: Jean Delvare
Cc: Roland Dreier
Cc: David Brownell
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Change drivers/rtc/ to use the new bcd2bin/bin2bcd functions instead of
the obsolete BCD_TO_BIN/BIN_TO_BCD/BCD2BIN/BIN2BCD macros.Signed-off-by: Adrian Bunk
Acked-by: Alessandro Zummo
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Oct, 2008
1 commit
-
Update the ds1307 driver with alarm support for ds1337/ds1339. This uses
the first alarm (there are two), and matches on seconds, minutes, hours,
and day-of-month. Tested on ds1339.[dbrownell@users.sourceforge.net: add comments; fixup style, valid irq
checks, debug dumps; lock; more careful IRQ shutdown; switch BCD2BIN to
bcd2bin (and vice versa); ENOTTY not EINVAL.]
Signed-off-by: David Brownell
Signed-off-by: Rodolfo Giometti
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
30 Apr, 2008
2 commits
-
Based on earlier work by Jon Smirl and Jochen Friedrich.
Update most new-style i2c drivers to use standard module aliasing
instead of the old driver_name/type driver matching scheme. I've
left the video drivers apart (except for SoC camera drivers) as
they're a bit more diffcult to deal with, they'll have their own
patch later.Signed-off-by: Jean Delvare
Cc: Jon Smirl
Cc: Jochen Friedrich -
Based on earlier work by Jon Smirl and Jochen Friedrich.
This patch allows new-style i2c chip drivers to have alias names using
the official kernel aliasing system and MODULE_DEVICE_TABLE(). At this
point, the old i2c driver binding scheme (driver_name/type) is still
supported.Signed-off-by: Jean Delvare
Cc: Jochen Friedrich
Cc: Jon Smirl
Cc: Kay Sievers
07 Feb, 2008
1 commit
-
For DS140, clear the oscillator fault flag as needed.
Signed-off-by: Frederic RODO
[ And remove some "sparse" warnings. ]
Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
15 Nov, 2007
1 commit
-
Export the NVRAM on DS1307 and DS1338 chips, like several of the
other drivers do for such combination RTC-and-NVRAM chips.Signed-off-by: David Brownell
Acked-by: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
27 Jul, 2007
1 commit
-
Fix a typo turned up by a Coverity check: referring to the wrong register,
which could cause problems with DS1338 RTCs whose oscillators halted.Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
18 Jul, 2007
3 commits
-
Convert the rtc-ds1307 driver into a "new style" driver.
Also improve probe() checks: be more correct about switching out of
AM/PM mode, and issue a (debug) diagnostic when failing due to bogus
register values.Signed-off-by: David Brownell
Cc: Andrew Victor
Cc: Bill Gatliff
Cc: Alessandro Zummo
Cc: Paul Mackerras
Cc: Benjamin Herrenschmidt
Cc: Kumar Gala
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When we find a ds1337 or ds1339 with the oscillator powered off, turn it
on. If the oscillator fault flag was set, clear it and warn that the clock
needs to be set.David Brownell: Bugfixes; provide corresponding update for ds1338, and the
core of the fix for ds1340. Use a common warning message ("SET TIME!")
whenever the clock needs to be set after oscillator fault (or oscillator
enable, if fault is not a separate status).Signed-off-by: Rodolfo Giometti
Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This updates the rtc-ds1307 driver so that converting it to a "new style"
driver (driver model, not legacy i2c model) will involve fewer changes.- Use pointer to i2c_client almost everywhere, so that it's easy
to let the i2c core create that object;- Avoid using i2c_client.adapter, since that field is redundant and
thus may go away (same object as i2c_client.dev.parent).- Extend type enum to include various RTCs this is expected to
work with, and include register support for them.It also cleans up the support for multiple chip types, and fixes a
glitch that could appear with an un-initialized RTC.Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
04 Oct, 2006
1 commit
-
Fix obvious build breakage revealed by 'make allyesconfig'
in current -git.Signed-off-by: Jeff Garzik
Signed-off-by: Linus Torvalds
01 Oct, 2006
1 commit
-
Update RTC framework so that drivers can constify their method tables, moving
them from ".data" to ".rodata". Then update the drivers.Signed-off-by: David Brownell
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Jun, 2006
1 commit
-
This is an "RTC-framework" driver for DS1307 and similar RTC chips,
It should be a full replacement for the existing ds1337.c driver (using the
older RTC glue), giving a net increase in the number of RTC chips that work
out-of-the-box. There's a whole cluster of RTCs that are very similar, but
the 1337 driver was a bit too picky to work with most of them.Still no support for RTC alarm IRQs (on chips that support them).
Signed-off-by: David Brownell
Signed-off-by: James Chapman
Signed-off-by: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds