1. 07 5月, 2011 1 次提交
    • J
      rtc: max8998: Initialize drvdata before registering device · 03cf7c47
      John Stultz 提交于
      Commit f44f7f96 ("RTC: Initialize kernel state from RTC") uncovered
      an issue in a number of RTC drivers, where the drivers call
      rtc_device_register before initializing the device or platform drvdata.
      
      This frequently results in null pointer dereferences when the
      rtc_device_register immediately makes use of the rtc device, calling
      rtc_read_alarm.
      
      The solution is to ensure the drvdata is initialized prior to registering
      the rtc device.
      
      CC: Wolfram Sang <w.sang@pengutronix.de>
      CC: Alessandro Zummo <a.zummo@towertech.it>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: rtc-linux@googlegroups.com
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      03cf7c47
  2. 14 1月, 2011 1 次提交
    • M
      mfd: Support LP3974 RTC · 337ce5d1
      MyungJoo Ham 提交于
      The first releases of LP3974 have a large delay in RTC registers,
      which requires 2 seconds of delay after writing to a rtc register
      (recommended by National Semiconductor's engineers)
      before reading it.
      
      If "rtc_delay" field of the platform data is true, the rtc driver
      assumes that such delays are required. Although we have not seen
      LP3974s without requiring such delays, we assume that such LP3974s
      will be released soon (or they have done so already) and they are
      supported by "lp3974" without setting "rtc_delay" at the platform
      data.
      
      This patch adds delays with msleep when writing values to RTC registers
      if the platform data has rtc_delay set.
      Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      Reviewed-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      337ce5d1
  3. 29 10月, 2010 1 次提交