diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-10 14:10:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-10 14:10:27 -0400 |
commit | 3aa78e0cb5c9b8b4ed2a617bb1e1542bfb508379 (patch) | |
tree | a446e1f8a81f63933423ef11ea7d31cc918b30f6 /drivers/rtc/rtc-max8998.c | |
parent | dc5ef1f56968c67e81ad1c81ab7dce678f480285 (diff) | |
parent | 25f311fa58c18c19ae1348336265ccb8368638f0 (diff) |
Merge tag 'mfd-3.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next
Pull MFD update from Samuel Ortiz:
"For the 3.11 merge we only have one new MFD driver for the Kontron
PLD.
But we also have:
- Support for the TPS659038 PMIC from the palmas driver.
- Intel's Coleto Creek and Avoton SoCs support from the lpc_ich
driver.
- RTL8411B support from the rtsx driver.
- More DT support for the Arizona, max8998, twl4030-power and the
ti_am335x_tsadc drivers.
- The SSBI driver move under MFD.
- A conversion to the devm_* API for most of the MFD drivers.
- The twl4030-power got split from twl-core into its own module.
- A major ti_am335x_adc cleanup, leading to a proper DT support.
- Our regular arizona and wm* updates and cleanups from the Wolfson
folks.
- A better error handling and initialization, and a regulator
subdevice addition for the 88pm80x driver.
- A bulk platform_set_drvdata() call removal that's no longer need
since commit 0998d0631001 ("device-core: Ensure drvdata = NULL when
no driver is bound")
* tag 'mfd-3.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next: (102 commits)
mfd: sec: Provide max_register to regmap
mfd: wm8994: Remove duplicate check for active JACKDET
MAINTAINERS: Add include directory to MFD file patterns
mfd: sec: Remove fields not used since regmap conversion
watchdog: Kontron PLD watchdog timer driver
mfd: max8998: Add support for Device Tree
regulator: max8998: Use arrays for specifying voltages in platform data
mfd: max8998: Add irq domain support
regulator: palmas: Add TPS659038 support
mfd: Kontron PLD mfd driver
mfd: palmas: Add TPS659038 PMIC support
mfd: palmas: Add SMPS10_BOOST feature
mfd: palmas: Check if irq is valid
mfd: lpc_ich: iTCO_wdt patch for Intel Coleto Creek DeviceIDs
mfd: twl-core: Change TWL6025 references to TWL6032
mfd: davinci_voicecodec: Fix build breakage
mfd: vexpress: Make the driver optional for arm and arm64
mfd: htc-egpio: Use devm_ioremap_nocache() instead of ioremap_nocache()
mfd: davinci_voicecodec: Convert to use devm_* APIs
mfd: twl4030-power: Fix relocking on error
...
Diffstat (limited to 'drivers/rtc/rtc-max8998.c')
-rw-r--r-- | drivers/rtc/rtc-max8998.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-max8998.c b/drivers/rtc/rtc-max8998.c index 5388336a2c4c..f098ad8382de 100644 --- a/drivers/rtc/rtc-max8998.c +++ b/drivers/rtc/rtc-max8998.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/bcd.h> | 18 | #include <linux/bcd.h> |
19 | #include <linux/irqdomain.h> | ||
19 | #include <linux/rtc.h> | 20 | #include <linux/rtc.h> |
20 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
21 | #include <linux/mfd/max8998.h> | 22 | #include <linux/mfd/max8998.h> |
@@ -252,7 +253,7 @@ static const struct rtc_class_ops max8998_rtc_ops = { | |||
252 | static int max8998_rtc_probe(struct platform_device *pdev) | 253 | static int max8998_rtc_probe(struct platform_device *pdev) |
253 | { | 254 | { |
254 | struct max8998_dev *max8998 = dev_get_drvdata(pdev->dev.parent); | 255 | struct max8998_dev *max8998 = dev_get_drvdata(pdev->dev.parent); |
255 | struct max8998_platform_data *pdata = dev_get_platdata(max8998->dev); | 256 | struct max8998_platform_data *pdata = max8998->pdata; |
256 | struct max8998_rtc_info *info; | 257 | struct max8998_rtc_info *info; |
257 | int ret; | 258 | int ret; |
258 | 259 | ||
@@ -264,7 +265,6 @@ static int max8998_rtc_probe(struct platform_device *pdev) | |||
264 | info->dev = &pdev->dev; | 265 | info->dev = &pdev->dev; |
265 | info->max8998 = max8998; | 266 | info->max8998 = max8998; |
266 | info->rtc = max8998->rtc; | 267 | info->rtc = max8998->rtc; |
267 | info->irq = max8998->irq_base + MAX8998_IRQ_ALARM0; | ||
268 | 268 | ||
269 | platform_set_drvdata(pdev, info); | 269 | platform_set_drvdata(pdev, info); |
270 | 270 | ||
@@ -277,6 +277,15 @@ static int max8998_rtc_probe(struct platform_device *pdev) | |||
277 | return ret; | 277 | return ret; |
278 | } | 278 | } |
279 | 279 | ||
280 | if (!max8998->irq_domain) | ||
281 | goto no_irq; | ||
282 | |||
283 | info->irq = irq_create_mapping(max8998->irq_domain, MAX8998_IRQ_ALARM0); | ||
284 | if (!info->irq) { | ||
285 | dev_warn(&pdev->dev, "Failed to map alarm IRQ\n"); | ||
286 | goto no_irq; | ||
287 | } | ||
288 | |||
280 | ret = devm_request_threaded_irq(&pdev->dev, info->irq, NULL, | 289 | ret = devm_request_threaded_irq(&pdev->dev, info->irq, NULL, |
281 | max8998_rtc_alarm_irq, 0, "rtc-alarm0", info); | 290 | max8998_rtc_alarm_irq, 0, "rtc-alarm0", info); |
282 | 291 | ||
@@ -284,6 +293,7 @@ static int max8998_rtc_probe(struct platform_device *pdev) | |||
284 | dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n", | 293 | dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n", |
285 | info->irq, ret); | 294 | info->irq, ret); |
286 | 295 | ||
296 | no_irq: | ||
287 | dev_info(&pdev->dev, "RTC CHIP NAME: %s\n", pdev->id_entry->name); | 297 | dev_info(&pdev->dev, "RTC CHIP NAME: %s\n", pdev->id_entry->name); |
288 | if (pdata && pdata->rtc_delay) { | 298 | if (pdata && pdata->rtc_delay) { |
289 | info->lp3974_bug_workaround = true; | 299 | info->lp3974_bug_workaround = true; |