regulator: fix the ldo configure according to 88pm860x spec
PATCH 1/4 regulator: fix the ldo configure according to 88pm860x spec
--- drivers/regulator/88pm8607.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/regulator/88pm8607.c +3 -3
@@ -196,7 +196,7 @@ static const unsigned int LDO12_suspend_table[] = { };static const unsigned int LDO13_table[] = { -1300000 ,1800000 ,2000000 ,2500000 ,2800000 ,3000000 ,0 ,0 , +1200000 ,1300000 ,1800000 ,2000000 ,2500000 ,2800000 ,3000000 ,0 , };static const unsigned int LDO13_suspend_table[] = {
@@ -389,10 +389,10 @@ static struct pm8607_regulator_info pm8607_regulator_info[] = {PM8607_LDO (7 ,LDO7 ,0 ,3 ,SUPPLIES_EN12 ,1 ),PM8607_LDO (8 ,LDO8 ,0 ,3 ,SUPPLIES_EN12 ,2 ),PM8607_LDO (9 ,LDO9 ,0 ,3 ,SUPPLIES_EN12 ,3 ), -PM8607_LDO (10 ,LDO10 ,0 ,3 ,SUPPLIES_EN12 ,4 ), +PM8607_LDO (10 ,LDO10 ,0 ,4 ,SUPPLIES_EN12 ,4 ),PM8607_LDO (12 ,LDO12 ,0 ,4 ,SUPPLIES_EN12 ,5 ),PM8607_LDO (13 ,VIBRATOR_SET ,1 ,3 ,VIBRATOR_SET ,0 ), - PM8607_LDO(14, LDO14, 0, 4, SUPPLIES_EN12, 6), + PM8607_LDO(14, LDO14, 0, 3, SUPPLIES_EN12, 6), };static int __devinit pm8607_regulator_probe (struct platform_device *pdev)
Signature · 1 line
1.7.0.4
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 3/4 mfd: Add ability to wake the system for 88pm860x
Hi Jett,
Quoted 18 lines · Jett.Zhou
(quoted diff) +18
-0+#ifdef CONFIG_PM_SLEEP +static int pm860x_onkey_suspend(struct device *dev) +{ + struct platform_device *pdev = to_platform_device(dev); + struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent); + + if (device_may_wakeup(dev)) + chip->wakeup_flag |= 1 << PM8607_IRQ_ONKEY; + return 0; +} +static int pm860x_onkey_resume(struct device *dev) +{ + struct platform_device *pdev = to_platform_device(dev); + struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent); + + if (device_may_wakeup(dev)) + chip->wakeup_flag &= ~(1 << PM8607_IRQ_ONKEY); + return 0;
Review
Quoted 10 lines
(quoted diff) +6
-0+} +#endif + +static SIMPLE_DEV_PM_OPS(pm860x_onkey_pm_ops, pm860x_onkey_suspend, pm860x_onkey_resume); + static struct platform_driver pm860x_onkey_driver = { .driver = { .name = "88pm860x-onkey", .owner = THIS_MODULE, +#ifdef CONFIG_PM
This ifdef is not needed, SIMPLE_DEV_PM_OPS() will produce at least empty dev_pm_ops structure.
Thanks.
Signature · 1 line
Dmitry
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 3/4 mfd: Add ability to wake the system for 88pm860x
Hi Jett,
Quoted 2 lines · Jett.Zhou
For 88pm860x pmic, it can wake the system from low power mode by irq, its sub-devs like RTC and onkey can be enabled for this usage.
Patch applied, thanks.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 2/4 rtc: fix 88pm860x rtc irq enable callback
Quoted 13 lines · On Fri, 9 Mar 2012 10:24:34 +0800 "Jett.Zhou" <[email protected]> wrote:
According to 88pm860x spec, rtc alarm irq enable control is bit3 for
RTC_ALARM_EN, so fix it.Signed-off-by Jett.Zhou <[email protected]>--- drivers/rtc/rtc-88pm860x.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)drivers/rtc/rtc-88pm860x.c +0
-0
drivers/rtc/rtc-88pm860x.c static int pm860x_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) · line 79
Quoted 10 lines
drivers/rtc/rtc-88pm860x.c +2
-2@@ -72,9 +72,9 @@ static int pm860x_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)struct pm860x_rtc_info *info =dev_get_drvdata (dev);if (enabled) -pm860x_set_bits (info->i2c,PM8607_RTC1 ,ALARM ,ALARM ); +pm860x_set_bits (info->i2c,PM8607_RTC1 ,ALARM_EN ,ALARM_EN );else -pm860x_set_bits (info->i2c,PM8607_RTC1 ,ALARM ,0 ); +pm860x_set_bits (info->i2c,PM8607_RTC1 ,ALARM_EN ,0 );return 0 ; }
It's surprising that the driver has been in-tree for a year and nobody has noticed this bug. This makes me wonder if the fix is wrong.
Has the patch been runtime tested?
PATCH v2 2/4 rtc: fix 88pm860x rtc irq enable callback
Quoted 2 lines · Andrew Morton
It's surprising that the driver has been in-tree for a year and nobody has noticed this bug. This makes me wonder if the fix is wrong.
I rather suspect few of the boards that use this chip ever run mainline
and we're seeing the effects of Android's ICS release rolling out here -
it's using 3.0 as the default kernel which was the first version which
included this driver as standard.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120328/9915d3a0/attachment.sig>