19 Oct, 2007

1 commit

  • Found these while looking at printk uses.

    Add missing newlines to dev_ uses
    Add missing KERN_ prefixes to multiline dev_s
    Fixed a wierd->weird spelling typo
    Added a newline to a printk

    Signed-off-by: Joe Perches
    Cc: "Luck, Tony"
    Cc: Jens Axboe
    Cc: Mark M. Hoffman
    Cc: Roland Dreier
    Cc: Tilman Schmidt
    Cc: David Woodhouse
    Cc: Jeff Garzik
    Cc: Stephen Hemminger
    Cc: Greg KH
    Cc: Jeremy Fitzhardinge
    Cc: Geert Uytterhoeven
    Cc: Alessandro Zummo
    Cc: David Brownell
    Cc: James Smart
    Cc: Andrew Vasquez
    Cc: "Antonino A. Daplas"
    Cc: Evgeniy Polyakov
    Cc: Russell King
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

17 Oct, 2007

11 commits

  • drivers/char/rtc.c allowed RTC_PIE_ON ioctls for non-root users, as long as
    the current interval (set via RTC_IRQP_SET) is
    Acked-by: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bryan Kadzban
     
  • drivers/char/rtc.c exposed a sysctl to change the maximum frequency at
    which a non-root user could ask the RTC to generate interrupts (via the
    RTC_IRQP_SET ioctl). This value is no longer available under the new RTC
    subsystem, so add it to sysfs for each RTC device.

    Works for me on x86_64 (both reads and writes), using rtc-cmos.

    Signed-off-by: Bryan Kadzban
    Acked-by: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bryan Kadzban
     
  • Some cleanups for the rtc-cmos probe logic:

    - Claim i/o ports with request_region() not request_resource(),
    for better coexistence betwen platform and pnp bus glues.

    - Claim those ports earlier, to help work around procfs bugs
    (it allows duplicate names, like /proc/driver/rtc).

    - Fix some glitches in cleanup code, notably a cut'n'paste-o
    where the i/o port region might not get released during
    cleanup after a probe fault.

    And some comment clarifications, including noting that this code
    must work with PNPBIOS not just PNPACPI..

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: David Brownell
    Cc: Russell King
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Fix readback of RTC alarms on platforms which return -1 in
    non-hardware-supported RTC alarm fields.

    To fill in the missing (-1) values, we grab an RTC timestamp along with the
    RTC alarm value, and use the timestamp fields to populate the missing alarm
    fields.

    To counter field-wrap races (since the timestamp and alarm are not read
    together atomically), we read the RTC timestamp both before and after
    reading the RTC alarm value, and then check for wrapped fields --> if any
    have wrapped, we know we have a possible inconsistency, so we loop and
    reread the timestamp and alarm again.

    Wrapped fields in the RTC timestamps are an issue because rtc-cmos.c, for
    example, also gets/uses an RTC timestamp internally while fetching the RTC
    alarm. If our timestamp here wasn't the same (minutes and higher) as what
    was used internally there, then we might end up populating the -1 fields
    with inconsistent values.

    This fixes readbacks from /sys/class/rtc/rtc?/wakealarm, as well as other
    code paths which call rtc_read_alarm().

    Signed-off-by: Mark Lord
    Cc: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Lord
     
  • This patch adds an RTC class driver for the Maxim/Dallas 1374 RTC chip,
    based on drivers/i2c/chips/ds1374.c. It supports alarm functionality.

    Signed-off-by: Scott Wood
    Acked-by: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Scott Wood
     
  • Not all i2c adapters support I2C-level messaging. Check that the adapter
    does before probing for a PCF8583 chip, as the driver makes use of
    i2c_transfer and i2c_master_send.

    Signed-off-by: Jean Delvare
    Signed-off-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     
  • The rtc-ds1742 platform driver name doesn't match its module name,
    which might prevents it from properly hotplugging. There is only two
    in-tree user of its driver, which are fixed by this patch too.

    Signed-off-by: Atsushi Nemoto
    Cc: Alessandro Zummo
    Cc: David Brownell
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     
  • The rtc-ds1553 platform driver name doesn't match its module name, which
    might prevent it from properly hotplugging. This driver has no in-tree
    users.

    Signed-off-by: Atsushi Nemoto
    Cc: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     
  • In rtc-dev.c, when a rtc device is opened, file->private_data is already
    attached with the rtc device pointer, so there is no need to call
    to_rtc_device() to convert file->private_data to a rtc device pointer.

    Acked-by: Alessandro Zummo
    Signed-off-by: Mark Zhan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Zhan
     
  • RTC periodic IRQs are only defined to work for 2^N Hz values. This patch
    moves that validity check into the infrastructure, so drivers don't need to
    check it; and adds kerneldoc for the two interface functions related to
    periodic IRQs. (One of which was quite mysterious until its first use was
    recently checked in!)

    Signed-off-by: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Add kernel/kernel and kernel/user locking for the periodic irq feature of
    the rtc class.

    PIE ioctls are also supported.

    Signed-off-by: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alessandro Zummo
     

21 Sep, 2007

1 commit

  • All SH-4 parts have a 4-digit year, while the SH-3 parts typically
    only use a 2-digit one. The SH7705, SH7710, and SH7712 SH-3 parts
    however opted to extend it to 4-digit and still look and act like
    an SH-3 RTC in all other ways.

    This adds a capability flag (RTC_CAP_4_DIGIT_YEAR) that these
    corner-case CPU subtypes can set in their platform data and cleans
    up some of the ifdef mess in the driver as a result.

    Reported-by: Markus Brunner
    Signed-off-by: Paul Mundt

    Paul Mundt
     

20 Sep, 2007

2 commits

  • Currently the rtc driver, rtc-ds1552.c uses an unsigned long to store the
    base mmio address of the NVRAM/RTC. This breaks on 32-bit systems with
    larger physical addresses.

    Signed-off-by: Atsushi Nemoto
    Cc: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     
  • Currently the rtc driver, rtc-ds1742.c uses an unsigned long to store the
    base mmio address of the NVRAM/RTC. This breaks on systems like PowerPC
    440, which is a 32-bit core with 36-bit physical addresses: IO on the
    system, including the RTC, is typically above the 4GB point, and cannot fit
    into an unsigned long.

    This patch fixes the problem by replacing the unsigned long with a
    resource_size_t. Tested on Ebony (PPC440) (with additional patches to
    instantiate the ds1742 platform device appropriately).

    Signed-off-by: David Gibson
    Acked-by: Atsushi Nemoto
    Cc: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Gibson
     

12 Sep, 2007

1 commit

  • Fix off-by-one in month calculations
    Add delay for bus accesses to satisfy Tw > 500ns

    Signed-off-by: Mike Rapoport
    Acked-by: Raphael Assenat
    Cc: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     

27 Aug, 2007

1 commit


23 Aug, 2007

2 commits

  • Minor tweaks to rtc-max6902: make it hotplug correctly, and fix a few
    space-before-tab whitespace botches. This driver has no current in-tree
    users, so the hotplug fix changes the driver name.

    Signed-off-by: David Brownell
    Cc: Atsushi Nemoto
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • The new rtc-m41t80 driver name doesn't match its module name, which
    prevents it from properly hotplugging. Since it's new, no platforms yet
    depend on that name ... so this patch fixes the driver name to match its
    module name, rather than going the other way around with a MODULE_ALIAS().

    NOTE: This sort of bug is a new thing to watch out for with new-style I2C
    drivers; previously I2C couldn't hotplug.

    Signed-off-by: David Brownell
    Acked-by: Atsushi Nemoto
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

01 Aug, 2007

5 commits

  • Since irq in m48t59_private struct is defined as 'unsigned int', which will
    make the following if sentence to be never true:

    if (m48t59->irq < 0)
    m48t59->irq = NO_IRQ;

    And thus it will make the m48t59_rtc_probe() is failed when the driver is
    working in a no irq mode:

    Signed-off-by: Mark Zhan
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Zhan
     
  • Change Kconfig objects from "menu, config" into "menuconfig" so that the
    user can disable the whole feature without having to enter the menu first.

    Signed-off-by: Jan Engelhardt
    Cc: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Engelhardt
     
  • The arm26 port has been in a state where it was far from even compiling
    for quite some time.

    Ian Molton agreed with the removal.

    Signed-off-by: Adrian Bunk
    Cc: Ian Molton
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Prevent the RTC driver from returning ENOIOCTLCMD to userspace.

    Signed-off-by: Thomas Hommel
    Acked-by: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Hommel
     
  • Fixup the changes from moving around the arch support for s3c24xx based
    systems.

    Signed-off-by: Ben Dooks
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     

31 Jul, 2007

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6.23:
    sh: Fix fs.h removal from mm.h regressions.
    sh: fix get_wchan() for SH kernels without framepointers
    sh: arch/sh/boot - fix shell usage
    rtc: rtc-sh: Correct sh_rtc_set_time() for some SH-3 parts.
    sh: remove support for sh7300 and solution engine 7300
    sh: Add sh to the CC_OPTIMIZE_FOR_SIZE dependencies.
    sh: Kill off virt_to_bus()/bus_to_virt().
    sh: sh-sci - fix SH7708 support
    sh: Restrict DSP support to specific CPUs.
    sh: Silence sq compile warning on sh4 nommu.
    sh: Kill the rest of the SE73180 cruft.
    sh: remove support for sh73180 and solution engine 73180
    sh: remove old broken pint code
    sh: Reclaim beginning of P3 space for vmalloc area.
    sh: Fix Dreamcast DMA issues.
    sh: Add kmap_coherent()/kunmap_coherent() interface for SH-4.

    Linus Torvalds
     

29 Jul, 2007

1 commit

  • * 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
    Input Serio: Blackfin doesnt support I8042 - make sure it doesnt get selected
    Blackfin arch: add BF54x I2C/TWI TWI0 driver support
    Blackfin On-Chip RTC driver update for supporting BF54x
    Blackfin Ethernet MAC driver: fix bug Report returned -ENOMEM upwards (in case L1/uncached memory alloc fails)
    Blackfin arch: add error message when IRQ no available
    Blackfin arch: Initialize the exception vectors early in the boot process
    Blackfin arch: fix a compiling warning about dma-mapping
    Blackfin arch: switch to using proper defines this time THREAD_SIZE and PAGE_SIZE instead of just PAGE_SIZE everywhere
    Blackfin arch: fix bug which unaligns the init thread's stack and causes the current macro to fail.
    Blackfin arch: Load P0 before storing through it
    Blackfin arch: fix KGDB bug, dont forget last parameter.
    Blackfin arch: add selections for BF544 and BF542
    Blackfin arch: use bfin_read_SWRST() now that BF561 provides it
    Blackfin arch: setup aliases for some core Core A MMRs

    Linus Torvalds
     

27 Jul, 2007

3 commits

  • Alphabetic reordering of the drivers in the rtc subsys makefile.

    (akpm: merge this asap! Makefiles are the source of many patch conflicts..)

    Signed-off-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alessandro Zummo
     
  • 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

    David Brownell
     
  • struct bin_attribute * is needed in bin_attribute ->read()/->write()
    now. Incidentally, could people please run the fscking compiler
    before and after applying their patch and compare the build logs?
    That (and many, many other) would be caught immediately.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

26 Jul, 2007

2 commits

  • Some SH-3 parts (SH7720 and SH7705 at least) need to have the
    start bit explicitly cleared, as the reset is not enough. This
    is safe across all parts, so simply clear the start bit in
    the sh_rtc_set_time() path.

    Signed-off-by: Markus Brunner
    Signed-off by: Mark Jonas
    Signed-off-by: Paul Mundt

    Markus Brunner
     
  • This avoids use of the kernel-internal "xtime" variable directly outside
    of the actual time-related functions. Instead, use the helper functions
    that we already have available to us.

    This doesn't actually change any behaviour, but this will allow us to
    fix the fact that "xtime" isn't updated very often with CONFIG_NO_HZ
    (because much of the realtime information is maintained as separate
    offsets to 'xtime'), which has caused interfaces that use xtime directly
    to get a time that is out of sync with the real-time clock by up to a
    third of a second or so.

    Signed-off-by: John Stultz
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Linus Torvalds

    john stultz
     

22 Jul, 2007

4 commits

  • This patch adds support for the Simtek STK17TA8 timekeeping chip.

    The STK17TA8 is quite similar to the DS1553, but differs in register layout
    and in various control bits in the registers. I chose to make this a new
    driver to avoid confusion in the code and to not get lost in #ifdefs.

    Signed-off-by: Thomas Hommel
    Cc: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Hommel
     
  • We now read and write the century byte in the max6900 chip. We probably
    don't need to do so on Linux-only system, but it's necessary when the chip
    is shared by another OS that uses the century byte.

    Signed-off-by: Dale Farnsworth
    Cc: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dale Farnsworth
     
  • Various people have expressed surprise that their modular RTC drivers don't
    seem to work for initializing the system time at boot. To help avoid such
    unpleasantness, make the Kconfig text point out that the driver probably
    needs to be statically linked.

    Signed-off-by: David Brownell
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • This patch fixes these sparse warnings:

    drivers/rtc/rtc-ds1742.c:265:2: warning: returning void-valued expression
    drivers/rtc/rtc-ds1553.c:409:2: warning: returning void-valued expression

    Signed-off-by: Atsushi Nemoto
    Cc: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     

20 Jul, 2007

2 commits


18 Jul, 2007

3 commits

  • Add Texas Instruments TWL92330/Menelaus Power Management chip driver. This
    includes voltage regulators, Dual slot memory card tranceivers and
    real-time clock(RTC).

    The support for RTC is integrated with this driver only; it is not separate
    module. Passes 'rtctest' on OMAP H4 EVM, other than lack of "periodic"
    (1/N second) IRQs. System wakeup alarms (from suspend-to-RAM) work too.

    The battery keeps the RTC active over power off, so once you set clock
    (rdate/ntpdate/etc, then "hwclock -w") then RTC_HCTOSYS at boot time will
    behave as expected.

    Cc: "Jean Delvare"
    Cc: "Tony Lindgren"
    Cc: "David Brownell"
    Signed-off-by: Trilok Soni
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tony Lindgren
     
  • 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

    David Brownell
     
  • 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

    Rodolfo Giometti