03 Sep, 2008

2 commits

  • Update rtc-cmos shutdown handling to leave RTC alarms active, resolving
    http://bugzilla.kernel.org/show_bug.cgi?id=11411 on several boards. There
    are still some systems where the ACPI event handling doesn't cooperate.
    (Possibly related to bugid 11312, reporting the spontaneous disabling of
    RTC events.)

    Bug 11411 reported that changes to work around some ACPI event issues
    broke wake-from-S5 handling, as used for DVR applications. (They like to
    power off, then wake later to record programs.)

    [yakui.zhao@intel.com: add shutdown for PNP devices]
    [dbrownell@users.sourceforge.net: update comments]
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Zhao Yakui
    Signed-off-by: Zhang Rui
    Signed-off-by: David Brownell
    Cc: Stefan Bauer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • commit 945185a69daa457c4c5e46e47f4afad7dcea734f ("rtc: rtc_time_to_tm: use
    unsigned arithmetic") changed the some types in rtc_time_to_tm() to
    unsigned:

    void rtc_time_to_tm(unsigned long time, struct rtc_time *tm)
    {
    - register int days, month, year;
    + unsigned int days, month, year;

    This doesn't work for all cases, because days is checked for < 0 later
    on:

    if (days < 0) {
    year -= 1;
    days += 365 + LEAP_YEAR(year);
    }

    I think the correct fix would be to keep days signed and do an appropriate
    cast later on.

    Signed-off-by: Jan Altenberg
    Cc: Maciej W. Rozycki
    Cc: Alessandro Zummo
    Cc: David Brownell
    Cc: Dmitri Vorobiev
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Altenberg
     

24 Aug, 2008

1 commit


21 Aug, 2008

6 commits


13 Aug, 2008

2 commits


07 Aug, 2008

3 commits


06 Aug, 2008

8 commits


31 Jul, 2008

2 commits

  • Solves http://bugzilla.kernel.org/show_bug.cgi?id=11127

    The old rtc.c driver did it and some drivers (like rtc-sh) do it in their
    release function, though they should not -- because they should provide
    the irq_set_state op and the rtc framework itself should care about it.
    This patch makes it do so.

    I am aware that some drivers, like rtc-sh, handle userspace PIE sets in
    their ioctl op (instead of having the framework call the op), exporting
    the irq_set_state op at the same time. The logic in rtc_irq_set_state
    should make sure it doesn't matter and the driver should not need to care
    stopping periodic interrupts in its release routine any more.

    The correct way, in my opinion, should be this:
    1) The driver provides the irq_set_state op and does not care closing the
    interrupts in its release op.
    2) If the driver does not provide the op and handles PIE in the ioctl op, it's
    reponsible for closing them in its release op.
    3) Something similar for other IRQs, like UIE -- if there's no in-kernel API
    like irq_set_state, handle it in ioctl and release ops. The framework will
    be responsible either for everything or for nothing. (This will probably
    change later.)

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

    Tomas Janousek
     
  • It was pointed out that the RTC framework handles its mutex locks oddly
    ... returning -EBUSY when interrupted. This fixes that by returning the
    value of mutex_lock_interruptible() (i.e. -EINTR).

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

    David Brownell
     

25 Jul, 2008

14 commits

  • Implement the ioctls RTC_PIE_ON, RTC_PIE_OFF, RTC_IRQP_SET and
    RTC_IRQP_READ in the standard RTC way.

    Thanks Dave for noticing it.

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

    Yoichi Yuasa
     
  • This fixes kernel http://bugzilla.kernel.org/show_bug.cgi?id=11112 (bogus
    RTC update IRQs reported) for rtc-cmos, in two ways:

    - When HPET is stealing the IRQs, use the first IRQ to grab
    the seconds counter which will be monitored (instead of
    using whatever was previously in that memory);

    - In sane IRQ handling modes, scrub out old IRQ status before
    enabling IRQs.

    That latter is done by tightening up IRQ handling for rtc-cmos everywhere,
    also ensuring that when HPET is used it's the only thing triggering IRQ
    reports to userspace; net object shrink.

    Also fix a bogus HPET message related to its RTC emulation.

    Signed-off-by: David Brownell
    Report-by: W Unruh
    Cc: Andrew Victor
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • This fixes kernel http://bugzilla.kernel.org/show_bug.cgi?id=11112 (bogus
    RTC update IRQs reported) for rtc-at91rm9200 by scrubbing old IRQ status
    before enabling IRQs.

    It also removes nonfunctional periodic IRQ support from this driver;
    only update IRQs are reported, or provided by the hardware.

    I suspect some other RTCs probably have versions of #11112; it's easy to
    overlook, since most non-RTC drivers don't care about spurious IRQs:
    they're not reported to userspace.

    Signed-off-by: David Brownell
    Report-by: W Unruh
    Cc: Andrew Victor
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • The rtc-s3c.c driver has been using its own ioctl() handling to deal with
    alarm and periodic interrupts to handle what should now be done with the
    rtc core code.

    Change to using the .irq_set_freq and .irq_set_state driver entries and
    remove the .ioctl handling.

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

    Ben Dooks
     
  • Add the relevant __devinit and __devexit attributes to the rtc-s3c driver.

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

    Ben Dooks
     
  • Resolve http://bugzilla.kernel.org/show_bug.cgi?id=11051 and other bugs
    related to the way the HPET glue code in rtc-cmos was incomplete and
    inconsistent:

    * Switch the approach so that the basic driver code flow isn't
    changed by having HPET ... instead, just have HPET shadow the
    RTC_CONTROL irq enables and RTC_FREQ_SELECT data. It's only
    coping with IRQ thievery, after all.

    * Do that consistently (!!) to avoid problems when the HPET code
    is out of sync with the real RTC intent. Examples include:

    - cmos_procfs(), which now reports correct data

    - cmos_irq_set_state() ... also removing the previous PIE_{ON,OFF}
    ioctl support so only one code path manages "periodic" IRQs

    - cmos_do_shutdown() ... currently a "just in case" change.

    - cmos_suspend() and cmos_resume() ... also handling a bug that
    was specific to HPET's IRQ thievery, where the alarm wasn't
    disabled after waking the system

    * Always call that HPET code under the RTC spinlock (it doesn't do
    its own locking)

    Also clean up the HPET glue:

    * Add some comments explaining what's going on.

    * Switch to having just one #ifdef for the HPET glue, and inline
    functions (not #defines) to avoid some compiler warnings.

    * Have the probe message also report when HPET IRQs are involved

    This still leaves various holes in the HPET glue, like the emulated update
    IRQs being out of sync with the RTC, alarms never using day or month
    matches, and many extra IRQs (at 64 Hz).

    [akpm@linux-foundation.org: fix build]
    Signed-off-by: David Brownell
    Cc: Tomas Janousek
    Cc: Bernhard Walle
    Cc: Carlos R. Mafra
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • When CONFIG_HPET_EMULATE_RTC is defined the external declaration of
    hpet_rtc_interrupt is redundant due to the inclusion of hpet.h.

    When !CONFIG_HPET_EMULATE_RTC we make it clear that hpet_rtc_interrupt is
    not used by defining it to return zero.

    Signed-off-by: Carlos R. Mafra
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Carlos R. Mafra
     
  • Convert the PCF8583 driver to the new I2C style framework with device_ids

    Signed-off-by: Juergen Beisert
    Signed-off-by: Wolfram Sang
    Signed-off-by: Alessandro Zummo
    Cc: David Brownell
    Acked-by: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wolfram Sang
     
  • Shrink the runtime footprint of the OMAP1 RTC driver a bunch by removing
    some old hacks and switching to platform_driver_probe().

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

    David Brownell
     
  • Support the Dallas/Maxim DS1305 and DS1306 RTC chips. These use SPI, and
    support alarms, NVRAM, and a trickle charger for use when their backup
    power supply is a supercap or rechargeable cell.

    This basic driver doesn't yet support suspend/resume or wakealarms.

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

    David Brownell
     
  • This patch adds kernel driver for M41T94 RTC chip connected via SPI.
    I've tested it on two different AT91-based hardwares.

    This is third revision of the patch: some comments made by
    Alessandro Zummo fixed.

    Revision two added support for century bit and fixes.

    Signed-off-by: Kim B. Heino
    Signed-off-by: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kim B. Heino
     
  • Remove implicit use of BKL in ioctl() from the RTC framework.

    Instead, the rtc->ops_lock is used. That's the same lock that already
    protects the RTC operations when they're issued through the exported
    rtc_*() calls in drivers/rtc/interface.c ... making this a bugfix, not
    just a cleanup, since both ioctl calls and set_alarm() need to update IRQ
    enable flags and that implies a common lock (which RTC drivers as a rule
    do not provide on their own).

    A new comment at the declaration of "struct rtc_class_ops" summarizes
    current locking rules. It's not clear to me that the exceptions listed
    there should exist ... if not, those are pre-existing problems which can
    be fixed in a patch that doesn't relate to BKL removal.

    Signed-off-by: David Brownell
    Cc: Alan Cox
    Cc: Jonathan Corbet
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Replace printk(KERN_INFO ...) calls with appropriate pr_info(...)
    equivalents.

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

    Maciej W. Rozycki
     
  • Sort the header inclusions for readability. No functional changes.

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

    Maciej W. Rozycki
     

22 Jul, 2008

1 commit


15 Jul, 2008

1 commit

  • * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (241 commits)
    [ARM] 5171/1: ep93xx: fix compilation of modules using clocks
    [ARM] 5133/2: at91sam9g20 defconfig file
    [ARM] 5130/4: Support for the at91sam9g20
    [ARM] 5160/1: IOP3XX: gpio/gpiolib support
    [ARM] at91: Fix NAND FLASH timings for at91sam9x evaluation kits.
    [ARM] 5084/1: zylonite: Register AC97 device
    [ARM] 5085/2: PXA: Move AC97 over to the new central device declaration model
    [ARM] 5120/1: pxa: correct platform driver names for PXA25x and PXA27x UDC drivers
    [ARM] 5147/1: pxaficp_ir: drop pxa_gpio_mode calls, as pin setting
    [ARM] 5145/1: PXA2xx: provide api to control IrDA pins state
    [ARM] 5144/1: pxaficp_ir: cleanup includes
    [ARM] pxa: remove pxa_set_cken()
    [ARM] pxa: allow clk aliases
    [ARM] Feroceon: don't disable BPU on boot
    [ARM] Orion: LED support for HP mv2120
    [ARM] Orion: add RD88F5181L-FXO support
    [ARM] Orion: add RD88F5181L-GE support
    [ARM] Orion: add Netgear WNR854T support
    [ARM] s3c2410_defconfig: update for current build
    [ARM] Acer n30: Minor style and indentation fixes.
    ...

    Linus Torvalds