15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

14 Dec, 2014

1 commit

  • Commit 7654e9d4fd8f ("drivers/rtc/rtc-snvs: fix suspend/resume")
    replaces SIMPLE_DEV_PM_OPS with direct declaration of snvs_rtc_pm_ops,
    but does so outside #ifdef CONFIG_PM_SLEEP. This causes the driver
    build to fail if CONFIG_PM_SLEEP is not configured.

    Fixes: 7654e9d4fd8f ("drivers/rtc/rtc-snvs: fix suspend/resume")
    Signed-off-by: Guenter Roeck
    Cc: Sanchayan Maity
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Guenter Roeck
     

12 Dec, 2014

1 commit

  • Pull powerpc updates from Michael Ellerman:
    "Some nice cleanups like removing bootmem, and removal of
    __get_cpu_var().

    There is one patch to mm/gup.c. This is the generic GUP
    implementation, but is only used by us and arm(64). We have an ack
    from Steve Capper, and although we didn't get an ack from Andrew he
    told us to take the patch through the powerpc tree.

    There's one cxl patch. This is in drivers/misc, but Greg said he was
    happy for us to manage fixes for it.

    There is an infrastructure patch to support an IPMI driver for OPAL.

    There is also an RTC driver for OPAL. We weren't able to get any
    response from the RTC maintainer, Alessandro Zummo, so in the end we
    just merged the driver.

    The usual batch of Freescale updates from Scott"

    * tag 'powerpc-3.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux: (101 commits)
    powerpc/powernv: Return to cpu offline loop when finished in KVM guest
    powerpc/book3s: Fix partial invalidation of TLBs in MCE code.
    powerpc/mm: don't do tlbie for updatepp request with NO HPTE fault
    powerpc/xmon: Cleanup the breakpoint flags
    powerpc/xmon: Enable HW instruction breakpoint on POWER8
    powerpc/mm/thp: Use tlbiel if possible
    powerpc/mm/thp: Remove code duplication
    powerpc/mm/hugetlb: Sanity check gigantic hugepage count
    powerpc/oprofile: Disable pagefaults during user stack read
    powerpc/mm: Check for matching hpte without taking hpte lock
    powerpc: Drop useless warning in eeh_init()
    powerpc/powernv: Cleanup unused MCE definitions/declarations.
    powerpc/eeh: Dump PHB diag-data early
    powerpc/eeh: Recover EEH error on ownership change for BCM5719
    powerpc/eeh: Set EEH_PE_RESET on PE reset
    powerpc/eeh: Refactor eeh_reset_pe()
    powerpc: Remove more traces of bootmem
    powerpc/pseries: Initialise nvram_pstore_info's buf_lock
    cxl: Name interrupts in /proc/interrupt
    cxl: Return error to PSL if IRQ demultiplexing fails & print clearer warning
    ...

    Linus Torvalds
     

11 Dec, 2014

37 commits

  • rtc_timer_do_work() only judges -ETIME failure of__rtc_set_alarm(), but
    doesn't handle other failures like -EIO, -EBUSY, etc.

    If there is a failure other than -ETIME, the next rtc_timer will stay in
    the timerqueue. Then later rtc_timers will be enqueued directly because
    they have a later expires time, so the alarm irq will never be programmed.

    When such failures happen, this patch will retry __rtc_set_alarm(), if
    still can't program the alarm time, it will remove current rtc_timer from
    timerqueue and fetch next one, thus preventing it from affecting other rtc
    timers.

    Signed-off-by: Xunlei Pang
    Cc: Alessandro Zummo
    Cc: John Stultz
    Cc: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Xunlei Pang
     
  • Currently, ab8500 doesn't set uie_unsupported of rtc_device, while it
    doesn't support UIE, see ab8500_rtc_set_alarm().

    Thus, when going through rtc_update_irq_enable()->rtc_timer_enqueue(),
    there's a chance it has an alarm timer1 queued before which is going to
    fired, so this update timer2 will be queued because it isn't the leftmost
    one, which means rtc_timer_enqueue() will return 0.

    This will result in two problems:
    1) UIE EMUL will not be used.
    2) When the alarm timer1 is fired, in rtc_timer_do_work() timer2 will
    fail to set the alarm time, so this rtc will disfunctional due to
    timer2 with the earliest expires in the timerqueue.

    So, rtc drivers must set this flag if they don't support UIE.

    Signed-off-by: Xunlei Pang
    Cc: Alessandro Zummo
    Cc: John Stultz
    Cc: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Xunlei Pang
     
  • The alarm interrupt handler also reads registers which are part of SNVS
    and need clocks enabled. However, the resume function is called after
    IRQ's have been enabled, hence this leads to a abort:

    Unhandled fault: external abort on non-linefetch (0x1008) at 0x908c604c
    Internal error: : 1008 [#1] ARM
    Modules linked in:
    CPU: 0 PID: 421 Comm: sh Not tainted 3.18.0-rc5-00135-g0689c67-dirty #1592
    task: 8e03e800 ti: 8cad8000 task.ti: 8cad8000
    PC is at snvs_rtc_irq_handler+0x14/0x74
    LR is at handle_irq_event_percpu+0x3c/0x144

    Fix this by using the .{suspend/resume}_noirq callbacks instead of
    .{suspend/resume} .

    Signed-off-by: Sanchayan Maity
    Cc: Shawn Guo
    Cc: Stefan Agner
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sanchayan Maity
     
  • Add clock enable and disable support for the SNVS peripheral, which is
    required for using the RTC within the SNVS block.

    The clock is not strictly enforced, as this would break the i.MX devices.
    The clocking for the i.MX devices seems to be enabled elsewhere and
    enabling RTC SNVS for Vybrid results in a crash. This patch adds the
    clock support but also makes it optional so Vybrid platform can use the
    clock if defined while making sure not to break i.MX.

    Signed-off-by: Sanchayan Maity
    Cc: Shawn Guo
    Acked-by: Stefan Agner
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sanchayan Maity
     
  • Drop the vendor-prefix from the "ti,system-power-controller" device-tree
    property name.

    It has been agreed to make "system-power-controller" a standard property
    and to drop the vendor-prefix that is currently used by several drivers.

    Note that drivers that have used ",system-power-controller" in a
    released kernel will need to support both versions.

    Signed-off-by: Johan Hovold
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Alessandro Zummo
    Cc: Felipe Balbi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • As pointed out by Mark, it is generally useful to log the error code when
    reporting a failure. This patch improves existing calls to dev_err() in
    ISL12057 driver to also report error code.

    Signed-off-by: Arnaud Ebalard
    Suggested-by: Mark Brown
    Cc: Mark Rutland
    Cc: Alessandro Zummo
    Cc: Peter Huewe
    Cc: Linus Walleij
    Cc: Thierry Reding
    Cc: Grant Likely
    Acked-by: Uwe Kleine-König
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnaud Ebalard
     
  • As suggested by Uwe, instead of clearing oscillator failure bit
    unconditionally at driver load, this patch adds proper handling of the
    flag. The driver now returns -ENODATA when reading time from the device
    and oscillator failure bit is set. The flag is now cleared only when the
    a new time value is pushed to the device.

    Signed-off-by: Arnaud Ebalard
    Reported-by: Uwe Kleine-König
    Acked-by: Uwe Kleine-König
    Cc: Mark Rutland
    Cc: Alessandro Zummo
    Cc: Peter Huewe
    Cc: Linus Walleij
    Cc: Thierry Reding
    Cc: Mark Brown
    Cc: Grant Likely
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnaud Ebalard
     
  • The month register of ISL12057 RTC chip includes a century bit which
    reports overflow of year register from 99 to 0. This bit can also be
    written, which allows using it to extend the time interval the chip can
    support from 99 to 199 years.

    This patch adds support for century overflow bit in tm to regs and regs to
    tm helpers in ISL12057 driver.

    This was tested by putting a device 100 years in the future (using a
    specific kernel due to the inability of userland tools such as date or
    hwclock to pass year 2038), rebooting on a kernel w/ this patch applied
    and verifying the device was still 100 years in the future.

    Signed-off-by: Arnaud Ebalard
    Suggested-by: Uwe Kleine-König
    Acked-by: Uwe Kleine-König
    Cc: Mark Rutland
    Cc: Alessandro Zummo
    Cc: Peter Huewe
    Cc: Linus Walleij
    Cc: Thierry Reding
    Cc: Mark Brown
    Cc: Grant Likely
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnaud Ebalard
     
  • When Intersil ISL12057 support was added by commit 70e123373c05 ("rtc: Add
    support for Intersil ISL12057 I2C RTC chip"), two masks for time registers
    values imported from the device were either wrong or omitted, leading to
    additional bits from those registers to impact read values:

    - mask for hour register value when reading it in AM/PM mode. As
    AM/PM mode is not the usual mode used by the driver, this error
    would only have an impact on an externally configured RTC hour
    later read by the driver.
    - mask for month value. The lack of masking would provide an
    erroneous value if century bit is set.

    This patch fixes those two masks.

    Fixes: 70e123373c05 ("rtc: Add support for Intersil ISL12057 I2C RTC chip")
    Signed-off-by: Arnaud Ebalard
    Cc: Mark Rutland
    Cc: Alessandro Zummo
    Cc: Peter Huewe
    Cc: Linus Walleij
    Cc: Thierry Reding
    Cc: Mark Brown
    Cc: Grant Likely
    Acked-by: Uwe Kleine-König
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnaud Ebalard
     
  • MCP7940x is same RTC as MCP7941x. The difference is that MCP7941x chips
    contain additional EEPROM on a different i2c address.

    DS1307 driver already supports MCP7941x, so just add a new i2c device id
    and rename functions and defines accordingly.

    Signed-off-by: Tomas Novotny
    Cc: Alessandro Zummo
    Cc: Grant Likely
    Cc: Rob Herring
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tomas Novotny
     
  • Add support for the watchdog functionality of the DS1374 rtc. Based on
    the m41t80 watchdog functionality Note: watchdog uses the same registers
    as alarm.

    [akpm@linux-foundation.org: don't forget mutex_unlock() in ds1374_wdt_open() error path]
    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Soeren Andersen
    Cc: Alessandro Zummo
    Cc: Dan Carpenter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Søren Andersen
     
  • Signed-off-by: Barry Song
    Cc: hao liu
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Barry Song
     
  • Add missed alarm_irq_enable() callback for CSR SiRFSoC RTCs.

    [akpm@linux-foundation.org: remove unneeded cast]
    Signed-off-by: hao liu
    Signed-off-by: Barry Song
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    hao liu
     
  • In case the card is woken up of the rtc alarm, the
    devm_rtc_device_register function detects it as a pending alarm about a
    month in the future. Fix this by clearing the alarm in module probe.

    Signed-off-by: Jan Kardell
    Cc: Alessandro Zummo
    Cc: Grant Likely
    Cc: Rob Herring
    Cc: Vincent Donnefort
    Cc: Dan Carpenter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kardell
     
  • According to Haoyu hym8563 datasheet this saves som power. Might be
    importat to battery life. And maybe it works for the NXP part as well.

    Signed-off-by: Jan Kardell
    Cc: Alessandro Zummo
    Cc: Grant Likely
    Cc: Rob Herring
    Cc: Vincent Donnefort
    Cc: Dan Carpenter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kardell
     
  • To guarantee that a set alarm occurs in the future, the set alarm time
    is rounded up to the nearest minute. Also we cannot handle UIE as it
    requires second precision.

    Signed-off-by: Jan Kardell
    Cc: Alessandro Zummo
    Cc: Grant Likely
    Cc: Rob Herring
    Cc: Vincent Donnefort
    Cc: Dan Carpenter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kardell
     
  • Incorrect mask was used for hour and monthday fields.

    Signed-off-by: Jan Kardell
    Cc: Alessandro Zummo
    Cc: Grant Likely
    Cc: Rob Herring
    Cc: Vincent Donnefort
    Cc: Dan Carpenter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kardell
     
  • The NXP datasheet says:
    "Bits labeled as N should always be written with logic 0."

    At least one of those bits is sometime read as a 1, therfore violating
    this rule. To fix this we mask away those bits.

    Signed-off-by: Jan Kardell
    Cc: Alessandro Zummo
    Cc: Grant Likely
    Cc: Rob Herring
    Cc: Vincent Donnefort
    Cc: Dan Carpenter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kardell
     
  • Remove some code that was left from before block read/write was used.

    Signed-off-by: Jan Kardell
    Cc: Alessandro Zummo
    Cc: Grant Likely
    Cc: Rob Herring
    Cc: Vincent Donnefort
    Cc: Dan Carpenter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kardell
     
  • Add myself to the list of copyright holders.

    Signed-off-by: Johan Hovold
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Lokesh Vutla
    Cc: Guenter Roeck
    Cc: Sekhar Nori
    Cc: Tero Kristo
    Cc: Keerthy J
    Tested-by: Felipe Balbi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • Fix minor coding style issues like comment style, indentation and remove
    a few unnecessary casts.

    Also drop the 1 from OMAP1 in the driver description.

    Signed-off-by: Johan Hovold
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Lokesh Vutla
    Cc: Guenter Roeck
    Cc: Sekhar Nori
    Cc: Tero Kristo
    Cc: Keerthy J
    Tested-by: Felipe Balbi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • The ALARM interrupt must not be disabled during shutdown in order to be
    able to power up the system using an RTC alarm.

    Signed-off-by: Johan Hovold
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Lokesh Vutla
    Cc: Guenter Roeck
    Cc: Sekhar Nori
    Cc: Tero Kristo
    Cc: Keerthy J
    Tested-by: Felipe Balbi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • Add new property "ti,system-power-controller" to register the RTC as a
    power-off handler.

    Some RTC IP revisions can control an external PMIC via the pmic_power_en
    pin, which can be configured to transition to OFF on ALARM2 events and
    back to ON on subsequent ALARM (wakealarm) events.

    This is based on earlier work by Colin Foe-Parker and AnilKumar Ch. [1]

    [1] https://www.mail-archive.com/linux-omap@vger.kernel.org/msg82127.html

    [akpm@linux-foundation.org: add comment]
    Signed-off-by: Johan Hovold
    Cc: Colin Foe-Parker
    Cc: AnilKumar Ch
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Lokesh Vutla
    Cc: Guenter Roeck
    Cc: Sekhar Nori
    Cc: Tero Kristo
    Cc: Keerthy J
    Tested-by: Felipe Balbi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • Add helper to read full register width.

    Signed-off-by: Johan Hovold
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Lokesh Vutla
    Cc: Guenter Roeck
    Cc: Sekhar Nori
    Cc: Tero Kristo
    Cc: Keerthy J
    Tested-by: Felipe Balbi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • Add helper to read raw BCD time that can be used in interrupt context.

    Signed-off-by: Johan Hovold
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Lokesh Vutla
    Cc: Guenter Roeck
    Cc: Sekhar Nori
    Cc: Tero Kristo
    Cc: Keerthy J
    Tested-by: Felipe Balbi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • Some legacy RTC IP revisions has a power-up reset flag in the status
    register that later revisions lack.

    As this flag is always read back as set on later revisions (or is
    overloaded with a different flag), make sure to only clear the flag and
    print the info message on legacy platforms.

    Signed-off-by: Johan Hovold
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Lokesh Vutla
    Cc: Guenter Roeck
    Cc: Sekhar Nori
    Cc: Tero Kristo
    Cc: Keerthy J
    Tested-by: Felipe Balbi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • Add structured device-type info to encode IP-block revision differences.

    Signed-off-by: Johan Hovold
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Lokesh Vutla
    Cc: Guenter Roeck
    Cc: Sekhar Nori
    Cc: Tero Kristo
    Cc: Keerthy J
    Tested-by: Felipe Balbi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • Remove DRIVER_NAME macro which was used for unrelated strings (e.g.
    id-table entry and module name), but not for related ones (e.g. module
    name and alias).

    Also move the module alias to the other module-info entries.

    Signed-off-by: Johan Hovold
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Lokesh Vutla
    Cc: Guenter Roeck
    Cc: Sekhar Nori
    Cc: Tero Kristo
    Tested-by: Felipe Balbi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • Add struct omap_rtc to hold previously global data as well as the
    IP-block feature flags.

    Also convert the register-access macros to proper inline helper functions.

    Signed-off-by: Johan Hovold
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Lokesh Vutla
    Cc: Guenter Roeck
    Cc: Sekhar Nori
    Cc: Tero Kristo
    Cc: Keerthy J
    Tested-by: Felipe Balbi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • Make platform-device id table const.

    Signed-off-by: Johan Hovold
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Lokesh Vutla
    Cc: Guenter Roeck
    Cc: Sekhar Nori
    Cc: Tero Kristo
    Cc: Keerthy J
    Tested-by: Felipe Balbi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • Use dev_info rather than pr_info.

    Signed-off-by: Johan Hovold
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Lokesh Vutla
    Cc: Guenter Roeck
    Cc: Sekhar Nori
    Cc: Tero Kristo
    Cc: Keerthy J
    Tested-by: Felipe Balbi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • Remove register-base define, which is no longer used.

    Signed-off-by: Johan Hovold
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Lokesh Vutla
    Cc: Guenter Roeck
    Cc: Sekhar Nori
    Cc: Tero Kristo
    Cc: Keerthy J
    Tested-by: Felipe Balbi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • Make sure not to register the class device until after the device has
    been configured.

    Currently, the device is not fully configured (e.g. 24-hour mode) when
    the class device is registered, something which involves driver
    callbacks for example to read the current time.

    Signed-off-by: Johan Hovold
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Lokesh Vutla
    Cc: Guenter Roeck
    Cc: Sekhar Nori
    Cc: Tero Kristo
    Cc: Keerthy J
    Tested-by: Felipe Balbi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • Remove some debug messages and return errors from subsystems rather than
    always fail with -EIO.

    Note that the class-registration error has already been logged by rtc
    core.

    Signed-off-by: Johan Hovold
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Lokesh Vutla
    Cc: Guenter Roeck
    Cc: Sekhar Nori
    Cc: Tero Kristo
    Cc: Keerthy J
    Tested-by: Felipe Balbi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • Use writel instead of writeb when disabling interrupts at probe as
    ALARM2 is not cleared otherwise on some IP-block revisions (e.g.
    AM3352).

    Note that the driver currently never enables the ALARM2 interrupt.

    Signed-off-by: Johan Hovold
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Lokesh Vutla
    Cc: Guenter Roeck
    Cc: Sekhar Nori
    Cc: Tero Kristo
    Cc: Keerthy J
    Tested-by: Felipe Balbi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • The platform device must be registered as wakeup capable before
    registering the class device, or the wakealarm attribute will not be
    created.

    Also make sure to unregister the wakeup source on probe errors.

    Fixes: 1d2e2b65d098 ("rtc: omap: restore back (hard-code) wakeup support")
    Signed-off-by: Johan Hovold
    Reviewed-by: Felipe Balbi
    Tested-by: Felipe Balbi
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Lokesh Vutla
    Cc: Guenter Roeck
    Cc: Sekhar Nori
    Cc: Tero Kristo
    Cc: Keerthy J
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • This series fixes a few issues with the omap rtc-driver, cleans up a
    bit, adds device abstraction, and finally adds support for the PMIC
    control feature found in some revisions of this RTC IP block.

    Ultimately, this allows for powering off the Beaglebone and waking it up
    again on RTC alarms.

    This patch (of 20):

    Make sure not to reset the clock-source configuration when enabling the
    32kHz clock mux.

    Until the clock source can be configured through device tree we must not
    overwrite settings made by the bootloader (e.g. clock-source
    selection).

    Fixes: cd914bba03d8 ("drivers/rtc/rtc-omap.c: add support for enabling 32khz clock")
    Signed-off-by: Johan Hovold
    Reviewed-by: Felipe Balbi
    Tested-by: Felipe Balbi
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Benot Cousson
    Cc: Lokesh Vutla
    Cc: Guenter Roeck
    Cc: Sekhar Nori
    Cc: Tero Kristo
    Cc: Keerthy J
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold