PXA: Fix wakealarm capability for pxa-rtc
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
The wakealarm capability was incorrectly set after the RTC was registered, which resulted into the sysfs node not being created.
--- drivers/rtc/rtc-pxa.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/rtc/rtc-pxa.c +2 -2
@@ -403,6 +403,8 @@ static int __init pxa_rtc_probe(struct platform_device *pdev)rtsr_clear_bits (pxa_rtc,RTSR_PIALE |RTSR_RDALE1 |RTSR_HZE ); +device_init_wakeup (dev,1 ); + pxa_rtc->rtc =rtc_device_register ("pxa-rtc" , &pdev->dev, &pxa_rtc_ops,THIS_MODULE ); ret =PTR_ERR (pxa_rtc->rtc);
@@ -411,8 +413,6 @@ static int __init pxa_rtc_probe(struct platform_device *pdev) goto err_rtc_reg; } -device_init_wakeup (dev,1 ); -return 0 ; err_rtc_reg:
Signature · 1 line
1.7.1
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
Quoted 2 lines · Marek Vasut
The wakealarm capability was incorrectly set after the RTC was registered, which resulted into the sysfs node not being created.
On my platform, without this patch:
Quoted 2 lines
cat
/sys/devices/platform/pxa-rtc/power/wakeup
enabled
The sysfs node is created. What's the issue you're having ?
Cheers.
--
Robert
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
Dne So 31. ?ervence 2010 17:38:06 Robert Jarzmik napsal(a):
Quoted 9 lines
Quoted 2 lines · Marek Vasut
The wakealarm capability was incorrectly set after the RTC was registered, which resulted into the sysfs node not being created.
On my platform, without this patch:
Quoted 2 lines
cat
/sys/devices/platform/pxa-rtc/power/wakeup
enabledThe sysfs node is created. What's the issue you're having ?
It's not created for me without this patch (and if you read the code, it is impossible to be created without this patch).
Cheers
Quoted 5 lines
Cheers.
--
Robert
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
Quoted 5 lines · Marek Vasut
Dne So 31. ?ervence 2010 17:38:06 Robert Jarzmik napsal(a):
Quoted 4 lines
Quoted 2 lines · Marek Vasut
The wakealarm capability was incorrectly set after the RTC was registered, which resulted into the sysfs node not being created.
Quoted 8 lines
Quoted 5 lines
On my platform, without this patch:
Quoted 2 lines
cat
/sys/devices/platform/pxa-rtc/power/wakeup
enabledThe sysfs node is created. What's the issue you're having ?
It's not created for me without this patch (and if you read the code, it is impossible to be created without this patch).
I read the code, and I see:rtc_device_register()
-> device_register()
-> device_initialize()
-> device_init_wakeup(dev, 0)So with or without your patch, device_init_wakeup() is called. The difference is that with your patch, we end up with a disabled wakeup capability. I showed the code sequence, your turn to show your "if you read the code".
Moreover, my platform without your patch prooves that the sysfs entry is created.
So unless you prove me wrong, I will reject the patch.
Cheers.
Signature · 1 line
Robert
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
Dne So 31. ?ervence 2010 23:07:06 Robert Jarzmik napsal(a):
Quoted 18 lines
Quoted 5 lines · Marek Vasut
Dne So 31. ?ervence 2010 17:38:06 Robert Jarzmik napsal(a):
Quoted 4 lines
Quoted 2 lines · Marek Vasut
The wakealarm capability was incorrectly set after the RTC was registered, which resulted into the sysfs node not being created.
Quoted 8 lines
Quoted 5 lines
On my platform, without this patch:
Quoted 2 lines
cat
/sys/devices/platform/pxa-rtc/power/wakeup
enabledThe sysfs node is created. What's the issue you're having ?
It's not created for me without this patch (and if you read the code, it is impossible to be created without this patch).
I read the code, and I see:
rtc_device_register()
->device_register()
Quoted 7 lines
-> device_initialize() -> device_init_wakeup(dev, 0)So with or without your patch,
device_init_wakeup()is called. The difference is that with your patch, we end up with a disabled wakeup capability. I showed the code sequence, your turn to show your "if you read the code".
drivers/rtc/rtc-sysfs.c
217 static inline int rtc_does_wakealarm(struct rtc_device *rtc) 218 {
219 if (!device_can_wakeup(rtc->dev.parent))
220 return 0;
221 return rtc->ops->set_alarm != NULL;
222 }
223
224
225 void rtc_sysfs_add_device(struct rtc_device *rtc) 226 {
227 int err;
228
229 /* not all RTCs support both alarms and wakeup */
230 if (!rtc_does_wakealarm(rtc))
231 return;
232
233 err = device_create_file(&rtc->dev, &dev_attr_wakealarm);
234 if (err)
235 dev_err(rtc->dev.parent,
236 "failed to create alarm attribute, %d\n", err);
237 }
For me, it leaves the function on rtc_does_wakealarm(); That's because device_can_wakeup on line 219 returns 0;
include/linux/pm_wakeup.h
45 static inline bool device_can_wakeup(struct device *dev) 46 {
47 return dev->power.can_wakeup;
48 }
This dev->power.can_wakeup is set by:
include/linux/pm_wakeup.h
35 static inline void device_init_wakeup(struct device *dev, bool val) 36 {
37 dev->power.can_wakeup = dev->power.should_wakeup = val;
38 }
But, the rtc_sysfs_add_device is called by:
drivers/rtc/class.c
114 struct rtc_device *rtc_device_register(const char *name, struct device *dev,
115 const struct rtc_class_ops *ops,
116 struct module *owner)
117 {
So the dev->power.can_wakeup must be set before registering the device.
Quoted 3 lines
Moreover, my platform without your patch prooves that the sysfs entry is created.
My platform (sharp akita) without this patch doesn't even show the wakealarm sysfs node. So something is certainly wrong in this driver, explain what it is please.
Quoted 2 lines
So unless you prove me wrong, I will reject the patch.
Ok, then I'd like to see you come up with better patch that actually fixes my platform.
Quoted 2 lines
Cheers.
Cheers
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
Quoted 15 lines · Marek Vasut
Dne So 31. ?ervence 2010 23:07:06 Robert Jarzmik napsal(a):
Quoted 14 lines
Quoted 13 lines · Marek Vasut
Dne So 31. ?ervence 2010 17:38:06 Robert Jarzmik napsal(a):
Quoted 9 lines
Quoted 2 lines · Marek Vasut
The wakealarm capability was incorrectly set after the RTC was registered, which resulted into the sysfs node not being created.
On my platform, without this patch:
Quoted 2 lines
cat
/sys/devices/platform/pxa-rtc/power/wakeup
enabledThe sysfs node is created. What's the issue you're having ?
It's not created for me without this patch (and if you read the code, it is impossible to be created without this patch).
Are we talking about the same /sys/devices/platform/pxa-rtc/power/wakeup ? Aren't you looking for /sys/class/rtc/rtc0/power/wakeup ?
Because the code you're showing seems to be related to the class sysfs entries, not the driver's unless I'm mistaken.
I'll join Alessandro to the discussion, he might have some insight for [1].
Cheers.
--
Robert
Quoted 78 lines
Quoted 11 lines
I read the code, and I see:
rtc_device_register()
->device_register()-> device_initialize() -> device_init_wakeup(dev, 0)So with or without your patch,
device_init_wakeup()is called. The difference is that with your patch, we end up with a disabled wakeup capability. I showed the code sequence, your turn to show your "if you read the code".
drivers/rtc/rtc-sysfs.c217 static inline int
rtc_does_wakealarm(struct rtc_device *rtc)218 {
219 if (!device_can_wakeup(rtc->dev.parent))
220 return 0;
221 returnrtc->ops->set_alarm!= NULL;
222 }
223
224
225 voidrtc_sysfs_add_device(struct rtc_device *rtc)226 {
227 int err;
228
229 /* not all RTCs support both alarms and wakeup */
230 if (!rtc_does_wakealarm(rtc))
231 return;
232
233 err =device_create_file(&rtc->dev, &dev_attr_wakealarm);
234 if (err)
235 dev_err(rtc->dev.parent,
236 "failed to create alarm attribute, %d\n", err);
237 }For me, it leaves the function on
rtc_does_wakealarm(); That's becausedevice_can_wakeupon line 219 returns 0;
include/linux/pm_wakeup.h
45 static inline booldevice_can_wakeup(struct device *dev)46 {
47 returndev->power.can_wakeup;
48 }This
dev->power.can_wakeupis set by:
include/linux/pm_wakeup.h
35 static inline voiddevice_init_wakeup(struct device *dev, bool val)36 {
37dev->power.can_wakeup=dev->power.should_wakeup= val;
38 }But, the
rtc_sysfs_add_deviceis called by:
drivers/rtc/class.c
114 structrtc_device*rtc_device_register(const char *name, struct device *dev,
115 const structrtc_class_ops*ops,
116 struct module *owner)
117 {So the
dev->power.can_wakeupmust be set before registering the device.Quoted 3 lines
Moreover, my platform without your patch prooves that the sysfs entry is created.
My platform (sharp akita) without this patch doesn't even show the wakealarm sysfs node. So something is certainly wrong in this driver, explain what it is please.
Quoted 2 lines
So unless you prove me wrong, I will reject the patch.
Ok, then I'd like to see you come up with better patch that actually fixes my platform.
Quoted 2 lines
Cheers.
Cheers
Signature · 1 line
Robert
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
Dne Ne 1. srpna 2010 02:48:38 Robert Jarzmik napsal(a):
Quoted 12 lines
Quoted 11 lines · Marek Vasut
Dne So 31. ?ervence 2010 23:07:06 Robert Jarzmik napsal(a):
Quoted 10 lines
Quoted 9 lines · Marek Vasut
Dne So 31. ?ervence 2010 17:38:06 Robert Jarzmik napsal(a):
Quoted 8 lines
Quoted 2 lines · Marek Vasut
The wakealarm capability was incorrectly set after the RTC was registered, which resulted into the sysfs node not being created.
On my platform, without this patch:
Quoted 2 lines
cat
/sys/devices/platform/pxa-rtc/power/wakeup
enabled
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
The sysfs node is created. What's the issue you're having ?
It's not created for me without this patch (and if you read the code, it is impossible to be created without this patch).
Are we talking about the same
/sys/devices/platform/pxa-rtc/power/wakeup? Aren't you looking for/sys/class/rtc/rtc0/power/wakeup?
I'm looking for /sys/class/rtc/rtc0/wakealarm
Quoted 91 lines
Because the code you're showing seems to be related to the class sysfs entries, not the driver's unless I'm mistaken.
I'll join Alessandro to the discussion, he might have some insight for [1].
Cheers.
--
RobertQuoted 80 lines
Quoted 5 lines
I read the code, and I see:
rtc_device_register()->
device_register()Quoted 8 lines
-> device_initialize() -> device_init_wakeup(dev, 0)So with or without your patch,
device_init_wakeup()is called. The difference is that with your patch, we end up with a disabled wakeup capability. I showed the code sequence, your turn to show your "if you read the code".
drivers/rtc/rtc-sysfs.c217 static inline int
rtc_does_wakealarm(struct rtc_device *rtc)218 {
219 if (!device_can_wakeup(rtc->dev.parent))
220 return 0;
221 returnrtc->ops->set_alarm!= NULL;
222 }
223
224
225 voidrtc_sysfs_add_device(struct rtc_device *rtc)226 {
227 int err;
228
229 /* not all RTCs support both alarms and wakeup */
230 if (!rtc_does_wakealarm(rtc))
231 return;
232
233 err =device_create_file(&rtc->dev, &dev_attr_wakealarm);
234 if (err)
235 dev_err(rtc->dev.parent,
236 "failed to create alarm attribute, %d\n",
err); 237 }For me, it leaves the function on
rtc_does_wakealarm(); That's becausedevice_can_wakeupon line 219 returns 0;
include/linux/pm_wakeup.h
45 static inline booldevice_can_wakeup(struct device *dev)46 {
47 returndev->power.can_wakeup;
48 }This
dev->power.can_wakeupis set by:
include/linux/pm_wakeup.h
35 static inline voiddevice_init_wakeup(struct device *dev, bool val)36 {
37dev->power.can_wakeup=dev->power.should_wakeup= val;
38 }But, the
rtc_sysfs_add_deviceis called by:
drivers/rtc/class.c
114 structrtc_device*rtc_device_register(const char *name, struct
device *dev, 115 const structrtc_class_ops*ops, 116 struct
module *owner) 117 {So the
dev->power.can_wakeupmust be set before registering the device.Quoted 2 lines
Moreover, my platform without your patch prooves that the sysfs entry is created.
My platform (sharp akita) without this patch doesn't even show the wakealarm sysfs node. So something is certainly wrong in this driver, explain what it is please.
Quoted 1 line
So unless you prove me wrong, I will reject the patch.
Ok, then I'd like to see you come up with better patch that actually fixes my platform.
Quoted 1 line
Cheers.
Cheers
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
Quoted 15 lines · Marek Vasut
Dne Ne 1. srpna 2010 02:48:38 Robert Jarzmik napsal(a):
Quoted 14 lines
Quoted 13 lines · Marek Vasut
Dne So 31. ?ervence 2010 23:07:06 Robert Jarzmik napsal(a):
Quoted 12 lines
Quoted 11 lines · Marek Vasut
Dne So 31. ?ervence 2010 17:38:06 Robert Jarzmik napsal(a):
Quoted 9 lines
Quoted 2 lines · Marek Vasut
The wakealarm capability was incorrectly set after the RTC was registered, which resulted into the sysfs node not being created.
On my platform, without this patch:
Quoted 2 lines
cat
/sys/devices/platform/pxa-rtc/power/wakeup
enabledThe sysfs node is created. What's the issue you're having ?
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
It's not created for me without this patch (and if you read the code, it is impossible to be created without this patch).
Are we talking about the same
/sys/devices/platform/pxa-rtc/power/wakeup? Aren't you looking for/sys/class/rtc/rtc0/power/wakeup?I'm looking for
/sys/class/rtc/rtc0/wakealarm
Okay, I understand better, you're looking for the class driver wakup sysfs entry, and not the driver sysfs wakeup entry.
So when you said "It's not created for me without this patch", you meant the class driver's sysfs entry, not the one I mentioned I presume ?
Anyway, to straighten things up :
- for an rtc driver, device_init_wakeup() has to be called before rtc_driver_register()
- if that's not the case, /sys/class/rtc/rtc0/wakealarm won't be created
- if that's the case, if the driver called device_init_wakeup(x, 1), the rtc registering will override the value with device_init_wakeup(x, 0)
I don't think changing the current behaviour, ie. having by default the rtc driver *not* wake up from suspend is a good thing. As I see now your real problem, I would request you leave the existing "device_init_wakeup(x, 1)" *and* you add yours to make the class driver happy.
Cheers.
--
Robert
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
Dne Ne 1. srpna 2010 13:15:13 Robert Jarzmik napsal(a):
Quoted 23 lines
Quoted 22 lines · Marek Vasut
Dne Ne 1. srpna 2010 02:48:38 Robert Jarzmik napsal(a):
Quoted 20 lines
Quoted 16 lines · Marek Vasut
Dne So 31. ?ervence 2010 23:07:06 Robert Jarzmik napsal(a):
Quoted 15 lines
Quoted 14 lines · Marek Vasut
Dne So 31. ?ervence 2010 17:38:06 Robert Jarzmik napsal(a):
Quoted 10 lines
Quoted 3 lines · Marek Vasut
The wakealarm capability was incorrectly set after the RTC was registered, which resulted into the sysfs node not being created.
On my platform, without this patch:
Quoted 2 lines
cat
/sys/devices/platform/pxa-rtc/power/wakeup
enabledThe sysfs node is created. What's the issue you're having ?
It's not created for me without this patch (and if you read the code, it is impossible to be created without this patch).
Are we talking about the same
/sys/devices/platform/pxa-rtc/power/wakeup? Aren't you looking for/sys/class/rtc/rtc0/power/wakeup?
Quoted 7 lines
Quoted 1 line
I'm looking for
/sys/class/rtc/rtc0/wakealarmOkay, I understand better, you're looking for the class driver wakup sysfs entry, and not the driver sysfs wakeup entry.
So when you said "It's not created for me without this patch", you meant the class driver's sysfs entry, not the one I mentioned I presume ?
You're still talking about some "wakeup", I'm talking about /sys/devices/platform/pxa-rtc/power/wakealarm .
Quoted 7 lines
Anyway, to straighten things up :
- for an rtc driver,device_init_wakeup()has to be called beforertc_driver_register()
- if that's not the case,/sys/class/rtc/rtc0/wakealarmwon't be created
- if that's the case, if the driver calleddevice_init_wakeup(x, 1), the
rtc registering will override the value withdevice_init_wakeup(x, 0)
Are we talking about the same kernel? I just can't find this "device_init_wakeup(x, 0);" which would override anything anywhere.
Quoted 3 lines
I don't think changing the current behaviour, ie. having by default the rtc driver *not* wake up from suspend is a good thing.
Huh?
Quoted 3 lines
As I see now your real
problem, I would request you leave the existing "device_init_wakeup(x, 1)" *and* you add yours to make the class driver happy.
Why wouldn't the driver wake up from suspend?
Quoted 5 lines
Cheers.
--
Robert
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
Quoted 8 lines · Marek Vasut
Quoted 5 lines
Okay, I understand better, you're looking for the class driver wakup sysfs entry, and not the driver sysfs wakeup entry.
So when you said "It's not created for me without this patch", you meant the class driver's sysfs entry, not the one I mentioned I presume ?
You're still talking about some "wakeup", I'm talking about
/sys/devices/platform/pxa-rtc/power/wakealarm.
...
Quoted 10 lines
Quoted 7 lines
Anyway, to straighten things up :
- for an rtc driver,device_init_wakeup()has to be called beforertc_driver_register()
- if that's not the case,/sys/class/rtc/rtc0/wakealarmwon't be created
- if that's the case, if the driver calleddevice_init_wakeup(x, 1), the
rtc registering will override the value withdevice_init_wakeup(x, 0)Are we talking about the same kernel? I just can't find this "
device_init_wakeup(x, 0);" which would override anything anywhere.
I already provided the call tree.
Anyway, I won't be available for the next days, and as I don't want to argue anymore, and I expect you have tested your patch against a suspended device to see it wake up, have my:
--
Robert
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
In reply to Marek VasutQuoted 6 lines · On Sun, 1 Aug 2010 17:38:16 +0200 Marek Vasut <[email protected]> wrote:
Quoted 3 lines
As I see now your real
problem, I would request you leave the existing "device_init_wakeup(x, 1)" *and* you add yours to make the class driver happy.Why wouldn't the driver wake up from suspend?
Quoted 1 line
may I see the latest version of your patch, Marek?
ty
Signature · 6 lines
Best regards, Alessandro Zummo, Tower Technologies - Torino, Italy http://www.towertech.it
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
Dne ?t 3. srpna 2010 02:03:28 Alessandro Zummo napsal(a):
Quoted 7 lines
On Sun, 1 Aug 2010 17:38:16 +0200
Quoted 4 lines · Marek Vasut
Quoted 3 lines
As I see now your real
problem, I would request you leave the existing "device_init_wakeup(x, 1)" *and* you add yours to make the class driver happy.
Quoted 5 lines
Quoted 1 line
Why wouldn't the driver wake up from suspend?
may I see the latest version of your patch, Marek?
ty
--- drivers/rtc/rtc-pxa.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/rtc/rtc-pxa.c +0 -0
@@ -403,6 +403,8 @@ static int __init pxa_rtc_probe(struct platform_device
*pdev)
rtsr_clear_bits(pxa_rtc, RTSR_PIALE | RTSR_RDALE1 | RTSR_HZE);
+ device_init_wakeup(dev, 1);
+
pxa_rtc->rtc = rtc_device_register("pxa-rtc", &pdev->dev, &pxa_rtc_ops,
THIS_MODULE);
ret = PTR_ERR(pxa_rtc->rtc);
@@ -411,8 +413,6 @@ static int __init pxa_rtc_probe(struct platform_device
*pdev)
goto err_rtc_reg;
}- device_init_wakeup(dev, 1);
-
return 0;
err_rtc_reg:
Signature · 1 line
1.7.1
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
Quoted 6 lines · On Tue, 3 Aug 2010 05:10:03 +0200 Marek Vasut <[email protected]> wrote:
Quoted 3 lines
may I see the latest version of your patch, Marek?
ty
--- drivers/rtc/rtc-pxa.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
well, if it's ok for Robert...
Signature · 6 lines
Best regards, Alessandro Zummo, Tower Technologies - Torino, Italy http://www.towertech.it
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
Dne P? 6. srpna 2010 21:59:55 Alessandro Zummo napsal(a):
Quoted 5 lines
On Tue, 3 Aug 2010 05:10:03 +0200
Quoted 2 lines · Marek Vasut
Quoted 2 lines
may I see the latest version of your patch, Marek?
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
ty
---
drivers/rtc/rtc-pxa.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)well, if it's ok for Robert...
Then? It apparently is not OK for Robert for some unknown reason.
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
In reply to Alessandro ZummoQuoted 11 lines · Alessandro Zummo
Quoted 6 lines · On Tue, 3 Aug 2010 05:10:03 +0200 Marek Vasut <[email protected]> wrote:
Quoted 3 lines
may I see the latest version of your patch, Marek?
ty
--- drivers/rtc/rtc-pxa.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)well, if it's ok for Robert...
Yes, I already gave my ack in [1].
As I'm still on holidays, I won't be available for a couple of days again, so take it granted that IMO Marek's patch can go in your tree and that it has my full aggreement. Thanks.
--
Robert
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
Quoted 12 lines · Robert Jarzmik
Quoted 10 lines · Alessandro Zummo
Quoted 6 lines · On Tue, 3 Aug 2010 05:10:03 +0200 Marek Vasut <[email protected]> wrote:
Quoted 3 lines
?may I see the latest version of your patch, Marek?
?ty
---
?drivers/rtc/rtc-pxa.c | ? ?4 ++--
?1 files changed, 2 insertions(+), 2 deletions(-)
Quoted 8 lines
Quoted 1 line
?well, if it's ok for Robert...
Yes, I already gave my ack in [1].
As I'm still on holidays, I won't be available for a couple of days again, so take it granted that IMO Marek's patch can go in your tree and that it has my full aggreement. Thanks.
Hi Alessandro,
Cann't find this in -next so far, the patch looks correct to me. We did the same thing for rtc-sa1100.c before. So you also have my Ack on this if it's not yet in your tree.
Quoted 5 lines
--
Robert
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
Dne St 18. srpna 2010 06:08:44 Eric Miao napsal(a):
Quoted 21 lines · Robert Jarzmik
Quoted 12 lines
Quoted 11 lines · Alessandro Zummo
On Tue, 3 Aug 2010 05:10:03 +0200
Quoted 7 lines · Marek Vasut
Quoted 3 lines
may I see the latest version of your patch, Marek?
ty
--- drivers/rtc/rtc-pxa.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)Quoted 7 lines
Quoted 1 line
well, if it's ok for Robert...
Yes, I already gave my ack in [1].
As I'm still on holidays, I won't be available for a couple of days again, so take it granted that IMO Marek's patch can go in your tree and that it has my full aggreement. Thanks.
Quoted 5 lines
Hi Alessandro,
Cann't find this in -next so far, the patch looks correct to me. We did the same thing for
rtc-sa1100.cbefore. So you also have my Ack on this if it's not yet in your tree.
If you want, I can put this patch it into next pull rq for pxa-linux-2.6 towards you, Eric ? Maybe it should go through fix though.
Btw. Eric, could you please sync devel with mainline? Also, did you push your - fix?
Thanks, Cheers!
Quoted 5 lines
Quoted 5 lines
--
Robert
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
Quoted 22 lines · Marek Vasut
Dne St 18. srpna 2010 06:08:44 Eric Miao napsal(a):
Quoted 21 lines · Robert Jarzmik
Quoted 19 lines
Quoted 5 lines · Alessandro Zummo
On Tue, 3 Aug 2010 05:10:03 +0200
Quoted 2 lines · Marek Vasut
Quoted 2 lines
?may I see the latest version of your patch, Marek?
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
?ty
---
?drivers/rtc/rtc-pxa.c | ? ?4 ++--
?1 files changed, 2 insertions(+), 2 deletions(-)?well, if it's ok for Robert...
Yes, I already gave my ack in [1].
As I'm still on holidays, I won't be available for a couple of days again, so take it granted that IMO Marek's patch can go in your tree and that it has my full aggreement. Thanks.
Quoted 9 lines
Quoted 5 lines
Hi Alessandro,
Cann't find this in -next so far, the patch looks correct to me. We did the same thing for
rtc-sa1100.cbefore. So you also have my Ack on this if it's not yet in your tree.If you want, I can put this patch it into next pull rq for pxa-linux-2.6 towards you, Eric ? Maybe it should go through fix though.
I'd prefer Alessandro merge this.
Quoted 2 lines
Btw. Eric, could you please sync devel with mainline? Also, did you push your - fix?
I'll do it soon.
Quoted 8 lines
Thanks, Cheers!
Quoted 5 lines
Quoted 5 lines
--
Robert
PATCH 1/1 PXA: Fix wakealarm capability for pxa-rtc
In reply to Marek VasutQuoted 5 lines · Marek Vasut
The wakealarm capability was incorrectly set after the RTC was registered, which resulted into the sysfs node not being created.
Signed-off-by Marek Vasut <[email protected]>
Same problem exists on on pxa3xx/cm-x300 and I suppose on many other pxa based systems which use rtc-pxa and not rtc-sa1100 (in which device_init_wakeup() indeed called before the rtc_device_register()).
This patch makes /sys/class/rtc/rtc0/wakealarm visible and thus solves the problem for cm-x300
Quoted 27 lines
--- drivers/rtc/rtc-pxa.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)drivers/rtc/rtc-pxa.c +2
-2@@ -403,6 +403,8 @@ static int __init pxa_rtc_probe(struct platform_device *pdev)rtsr_clear_bits (pxa_rtc,RTSR_PIALE |RTSR_RDALE1 |RTSR_HZE ); +device_init_wakeup (dev,1 ); + pxa_rtc->rtc =rtc_device_register ("pxa-rtc" , &pdev->dev, &pxa_rtc_ops,THIS_MODULE ); ret =PTR_ERR (pxa_rtc->rtc);@@ -411,8 +413,6 @@ static int __init pxa_rtc_probe(struct platform_device *pdev) goto err_rtc_reg; } -device_init_wakeup (dev,1 ); -return 0 ; err_rtc_reg:
Signature · 2 lines
Regards, Igor.