13 May, 2008

3 commits

  • The driver uses printk(), but does not include -- add it.

    Signed-off-by: Maciej W. Rozycki
    Cc: Alessandro Zummo
    Cc: Alexander Bigga
    Cc: Wim Van Sebroeck
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Maciej W. Rozycki
     
  • Watchdog handlers within the driver make use of "save_client" -- make sure it
    has been initalized before the handlers are registered.

    Signed-off-by: Maciej W. Rozycki
    Cc: Alessandro Zummo
    Cc: Alexander Bigga
    Cc: Wim Van Sebroeck
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Maciej W. Rozycki
     
  • The input argument to rtc_time_to_tm() is unsigned as well as are members of
    the output structure. However signed arithmetic is used within for
    calculations leading to incorrect results for input values outside the signed
    positive range. If this happens the time of day returned is out of range.

    Found the problem when fiddling with the RTC and the driver where year was set
    to an unexpectedly large value like 2070, e.g.:

    rtc0: setting system clock to 2070-01-01 1193046:71582832:26 UTC (3155760954)

    while it should be:

    rtc0: setting system clock to 2070-01-01 00:15:54 UTC (3155760954)

    Changing types to unsigned fixes the problem.

    [akpm@linux-foundation.org: remove old-fashioned `register' keyword]
    Signed-off-by: Maciej W. Rozycki
    Cc: Alessandro Zummo
    Cc: David Brownell
    Cc: Dmitri Vorobiev
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Maciej W. Rozycki
     

12 May, 2008

1 commit

  • As the old driver_name/type matching scheme is going away soon, change
    the dummy device mechanism to use the new matching scheme.

    This has the downside that dummy i2c clients can no longer choose
    their name, they'll all appear as "dummy" in sysfs and in log
    messages. I don't think it is a problem in practice though, as there
    is little reason to use these i2c clients to log messages.

    Signed-off-by: Jean Delvare

    Jean Delvare
     

09 May, 2008

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (37 commits)
    SH: catch negative denormal_subf1() retval in denormal_add()
    sh: Fix DMAC base address for SH7709S
    sh: update smc91x platform data for se7206.
    sh: Stub in cpu_to_node() and friends for NUMA build.
    sh: intc register modify fix
    sh: no high level trigger on some sh3 cpus
    sh: clean up sh7710 and sh7720 intc tables
    sh: add interrupt ack code to sh3
    sh: unify external irq pin code for sh3
    sh-sci: avoid writing to nonexistent registers
    sh-sci: sh7722 lacks scsptr registers
    sh-sci: improve sh7722 support
    sh: reset hardware from early printk
    sh: drain and wait for early printk
    sh: use sci_out() for early printk
    sh: add memory resources to /proc/iomem
    sh: add kernel bss resource
    sh: fix sh7705 interrupt vector typo
    sh: update smc91x platform data for se7722
    sh: update smc91x platform data for MigoR
    ...

    Linus Torvalds
     
  • The file in drivers/rtc/rtc-ds1551.c uses "int" for flags. This can cause
    hard to find bugs on some architectures. This patch converts the flags to use
    "long" instead.

    This bug was discovered by doing an allyesconfig make on the -rt kernel where
    checks are done to ensure all flags are of size sizeof(long).

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

    Steven Rostedt
     

08 May, 2008

1 commit


01 May, 2008

1 commit

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (179 commits)
    ACPI: Fix acpi_processor_idle and idle= boot parameters interaction
    acpi: fix section mismatch warning in pnpacpi
    intel_menlo: fix build warning
    ACPI: Cleanup: Remove unneeded, multiple local dummy variables
    ACPI: video - fix permissions on some proc entries
    ACPI: video - properly handle errors when registering proc elements
    ACPI: video - do not store invalid entries in attached_array list
    ACPI: re-name acpi_pm_ops to acpi_suspend_ops
    ACER_WMI/ASUS_LAPTOP: fix build bug
    thinkpad_acpi: fix possible NULL pointer dereference if kstrdup failed
    ACPI: check a return value correctly in acpi_power_get_context()
    #if 0 acpi/bay.c:eject_removable_drive()
    eeepc-laptop: add hwmon fan control
    eeepc-laptop: add backlight
    eeepc-laptop: add base driver
    ACPI: thinkpad-acpi: bump up version to 0.20
    ACPI: thinkpad-acpi: fix selects in Kconfig
    ACPI: thinkpad-acpi: use a private workqueue
    ACPI: thinkpad-acpi: fluff really minor fix
    ACPI: thinkpad-acpi: use uppercase for "LED" on user documentation
    ...

    Fixed conflicts in drivers/acpi/video.c and drivers/misc/intel_menlow.c
    manually.

    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

    Jean Delvare
     
  • 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

    Jean Delvare
     

29 Apr, 2008

3 commits

  • Some drivers have duplicated unlikely() macros. IS_ERR() already has
    unlikely() in itself.

    This patch cleans up such pointless code.

    Signed-off-by: Hirofumi Nakagawa
    Acked-by: David S. Miller
    Acked-by: Jeff Garzik
    Cc: Paul Clements
    Cc: Richard Purdie
    Cc: Alessandro Zummo
    Cc: David Brownell
    Cc: James Bottomley
    Cc: Michael Halcrow
    Cc: Anton Altaparmakov
    Cc: Al Viro
    Cc: Carsten Otte
    Cc: Patrick McHardy
    Cc: Paul Mundt
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hirofumi Nakagawa
     
  • Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data
    be setup before gluing PDE to main tree.

    Signed-off-by: Denis V. Lunev
    Cc: Greg Kroah-Hartman
    Cc: Alexey Dobriyan
    Cc: "Eric W. Biederman"
    Cc: Peter Osterlund
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Dmitry Torokhov
    Cc: Neil Brown
    Cc: Mauro Carvalho Chehab
    Cc: Bjorn Helgaas
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Denis V. Lunev
     
  • pnp_resource_table is going away soon, so use the more
    generic public interfaces instead.

    Signed-off-by: Bjorn Helgaas
    Acked-By: Rene Herman
    Signed-off-by: Len Brown

    Bjorn Helgaas
     

28 Apr, 2008

10 commits

  • __FUNCTION__ is gcc-specific, use __func__

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

    Harvey Harrison
     
  • In current kernel if we want to set the alarm time, the absolute time the
    seconds relative to 1970-01-01 00:00:00) should be written into
    /sys/class/rtc/rtc0/wakealarm. It is not convenient.

    It is more reasonable to add the support for the alarm time relative to
    current RTC time.(the unit is second)

    For example:
    If the RTC is required to generate alarm after 2 minutes, the following
    will be OK.
    echo +120 > /sys/class/rtc/rtc0/wakealarm
    or echo +0x78 > /sys/class/rtc/rtc0/wakealarm

    Signed-off-by: Zhao Yakui
    Signed-off-by: Zhang Rui
    Signed-off-by: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zhao Yakui
     
  • rs5c_get_regs() currently uses rs5c->rtc->name for its debug printk when
    i2c_transfer() fails, though it is used several times before the rtc dev
    has been registered. The earliest we can get at the symbolic name is via
    the i2c client's struct device, which can be handled by moving the first
    rs5c_get_regs() until after the client pointer is assigned.

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

    Paul Mundt
     
  • Make the needlessly global ds1511_rtc_{read,set}_time() static.

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

    Adrian Bunk
     
  • Fix following warning:
    WARNING: vmlinux.o(.data+0x253e28): Section mismatch in reference from the variable test_drv to the function .devexit.text:test_remove()

    Fix by renaming the platfrom_driver variable from *_drv to *_driver
    so modpost ignore the reference to an __devexit section.

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

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

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

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

    Alessandro Zummo
     
  • Kconfig tweaks to help reduce RTC configuration bugs, by avoiding
    legacy RTC drivers when the generic RTC framework is enabled:

    - If rtc-cmos is selected, disable the legacy rtc driver;

    - When using generic RTC on x86, enable rtc-cmos by default;

    - In the old "chardev RTC" section of Kconfig, add a comment
    warning people off these (seven) legacy RTC drivers when
    the generic framework is in use.

    People can still use the legacy drivers if they want (or need) to.

    This doesn't fix the broken dependencies for the legacy "CMOS" RTC driver.
    Ideally it would be a full list of platforms where it works, not a partial
    list of ones where it won't. Or better yet, it would depend on a
    "HAVE_CMOS_RTC" flag defined by various platforms ... surely there's a
    Kconfig style guideline lurking there.

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

    David Brownell
     
  • Fix bogus #include in rtc-pcf8583, so it compiles on platforms that
    don't support PC clone RTCs. (Original issue noted by Adrian Bunk.)

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

    David Brownell
     

19 Apr, 2008

1 commit


16 Apr, 2008

1 commit

  • There is a bug in the function of cmos_set_alarm. RTC alarm time for October
    can't be set correctly.

    For October: 0x0A will be written into the RTC region (MONTH_ALARM) in current
    kernel. But in fact 0x10 should be written. Wildcards are also not handled
    correctly.

    Signed-off-by: Zhao Yakui
    Signed-off-by: Zhang Rui
    Signed-off-by: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zhao Yakui
     

11 Apr, 2008

2 commits

  • Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is
    prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable RTC
    platform drivers, to re-enable module auto loading.

    [dbrownell@users.sourceforge.net: more drivers, minor fix]
    Signed-off-by: Kay Sievers
    Signed-off-by: David Brownell
    Cc: Greg KH
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kay Sievers
     
  • rtc-s35390a uses BITREVERSE functions so it needs to select that config symbol
    to ensure that the functions are built.

    drivers/built-in.o: In function `s35390a_set_datetime':
    linux-2.6.25-rc8-git7/drivers/rtc/rtc-s35390a.c:144: undefined reference to `byte_rev_table'
    drivers/built-in.o: In function `s35390a_get_datetime':
    linux-2.6.25-rc8-git7/drivers/rtc/rtc-s35390a.c:163: undefined reference to `byte_rev_table'

    Signed-off-by: Randy Dunlap
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

20 Mar, 2008

2 commits

  • Updates to the at91sam9 rtt-as-rtc driver:

    - Bugfix: IRQ enable bits need shifting before masking with status
    - Platform code to initialize wakeup bits didn't get merged; cope

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

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

    Alessandro Zummo
     

05 Mar, 2008

1 commit

  • This adds basic get/set time support for the Seiko Instruments S-35390A.
    This chip communicates using I2C and is used on the QNAP TS-109/TS-209 NAS
    devices.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Byron Bradley
    Acked-by: Jean Delvare
    Acked-by: David Brownell
    Tested-by: Tim Ellis
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Byron Bradley
     

24 Feb, 2008

1 commit

  • For the "cmos" RTC, have /proc/driver/rtc say whether HPET based IRQ
    emulation is in effect. Given the problems we've had with this particular
    hardware maldesign (and the fact that most BIOS code seems not to provide
    the IRQ routing needed to use the saner HPET modes), this should help
    troubleshooting.

    Signed-off-by: David Brownell
    Cc: Alessandro Zummo
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

10 Feb, 2008

1 commit

  • Commit 75b6102257874a4ea796af686de2f72cfa0452f9 ("rtc: add support for
    Epson RTC-9701JE V4") introduced the warning

    drivers/rtc/rtc-r9701.c: In function `r9701_get_datetime':
    drivers/rtc/rtc-r9701.c:74: warning: unused variable `time'

    Signed-off-by: S.Çağlar Onur
    Signed-off-by: Linus Torvalds

    S.Çağlar Onur
     

07 Feb, 2008

8 commits

  • AT91sam9 RTC support, primarily in the form of an RTT-as-RTC driver that was
    extracted from 2.6.23-at91 patch and updated:

    - Relies on now-merged platform updates, which associate the RTT
    hardware address with each RTT and use the "at91_rtt" name.

    - RTC framework related fixes and cleanups, notably:
    * removed now-needless suspend/resume clock offset logic
    * alarm read/write now respects the "enabled" flag
    * suspend always disables update irqs
    * shutdown (and startup) disables all irqs

    - Misc cleanup:
    * use dev_*() messaging
    * add comments
    * remove globals,
    * ... etc

    - Don't force use of RTT0 and GPBR0. Either resource may need
    to be used for other purposes (like NO_HZ support).

    - Update "AT91RM9200 RTC" Kconfig to allow it on SAM9RL chips
    (it has both RTT and RTC).

    Driver binding uses bus_find_device() to avoid needing any kind of "timer
    library" code when there's more than one RTT module. (This timer can be used
    as an RTC, to support NO_HZ operation, or potentially for other stuff. The
    choice is a per-system policy.)

    Signed-off-by: David Brownell
    Cc: Michel Benoit
    Cc: Nicolas Ferre
    Cc: Andrew Victor
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Remove some more references to dev->power.power_state. That field is overdue
    for removal, but we can't do that while it's still referenced in the kernel.
    The only reason to update it was to make the /sys/devices/.../power/state
    files (now removed) work better.

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

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

    frederic Rodo
     
  • Add support for the Epson RTC-9701JE SPI RTC device.

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

    Magnus Damm
     
  • Add support for the Epson RTC-9701JE SPI RTC device.

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

    Magnus Damm
     
  • That patch adds the RTC emulation of the HPET timer to the new RTC_DRV_CMOS.
    The old drivers/char/rtc.ko driver had that functionality and it's important
    on new systems.

    [akpm@linux-foundation.org: unbreak alpha build]
    Signed-off-by: Bernhard Walle
    Cc: Alessandro Zummo
    Cc: David Brownell
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Andi Kleen
    Cc: john stultz
    Cc: Robert Picco
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bernhard Walle
     
  • - thus clearing out the need for spin locks
    - add a small optimization for reading of the rtc field

    Signed-off-by: Mike Frysinger
    Signed-off-by: Bryan Wu
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • Signed-off-by: Mike Frysinger
    Signed-off-by: Bryan Wu
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger