On 5 February 2010 22:44, Neil Jerram <neiljer...@googlemail.com> wrote:
> On 14 January 2010 22:41, Neil Jerram <neiljer...@googlemail.com> wrote:
>>
>> I've just installed Timo's kernel from
>> http://users.tkk.fi/~tajyrink/moko/kernel_20100108_nodebug_nopreempt/uImage-moredrivers-GTA02_oma-andy-2a04ce8203d7d0f1.bin,
>>  [...]
>>
>> But I noticed two apparent changes/regressions.
>>
>> 1. The openmoko-panel-plugin battery icon doesn't notice changes to
>> the battery charging state.  I can force it to notice by clicking on
>> the icon, but it doesn't notice itself.  I guess that means that the
>> dbus signals for charging status are not working.
>
> I think I've fixed this one.  Apparently kobject notification has
> changed behaviour in the case where the /sys paths that frameworkd
> watches are symbolic links.  When the Python-level notification
> callback is called, the path given is a canonical link, not the
> original symbolic link path.

I'd like to get the attached frameworkd patch upstream, if people
think it is correct.  But it occurs to me that I don't recall hearing
this problem being reported by SHR users - and so I'm wondering if
that might mean that the patch isn't right for SHR.

Is the current SHR kernel significantly different (older?) from Timo's
no-debug kernel at the location above?  In particular, can anyone pin
down whether it contains the same (apparent) sysfs change as described
above?  (I'm afraid I haven't yet managed to find that change in the
andy-tracking git log.)

Alternatively, does SHR do battery status reporting in some completely
different way, which would be unaffected by this patch?

Thanks in advance for any enlightenment...

    Neil
From 14eef5a5bfc1e9d1b673fa1af050a4bb8a3118d4 Mon Sep 17 00:00:00 2001
From: Neil Jerram <neiljer...@googlemail.com>
Date: Fri, 5 Feb 2010 22:35:40 +0000
Subject: [PATCH] Fix battery status reporting with latest andy-tracking kernel

---
 framework/patterns/kobject.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/framework/patterns/kobject.py b/framework/patterns/kobject.py
index fec201b..adc44fa 100644
--- a/framework/patterns/kobject.py
+++ b/framework/patterns/kobject.py
@@ -108,6 +108,10 @@ class KObjectDispatcher( object ):
 
     def _addMatch( self, action, path, callback ):
         logger.debug( "_addMatch %s, %s, %s" % ( action, path, callback ) )
+        path = os.path.realpath( "/sys%s" % path )
+        logger.debug( "real /sys path for addMatch is %s" % path )
+        path = path[4:]
+        logger.debug( "real path for addMatch is %s" % path )
         #print "action='%s', path='%s'" % ( action, path )
         if action == '*':
             self._addMatch( "add", path, callback )
-- 
1.7.0

_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community

Reply via email to