[0904_10] Siano: smsdvb - add events mechanism
Quoted 153 lines · Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <[email protected]>
Subject: Re: [PATCH] [0904_10] Siano: smsdvb - add events mechanism
To: "Uri Shkolnik" <[email protected]>
Cc: "LinuxML" <[email protected]>
Date: Monday, April 20, 2009, 8:14 PM
On Mon, 20 Apr 2009 09:56:26 -0700
(PDT)
Uri Shkolnik <[email protected]>Quoted 4 lines · wrote:
--- On Mon, 4/20/09, Mauro Carvalho Chehab <[email protected]>
Quoted 3 lines · wrote:
Quoted 3 lines
From: Mauro Carvalho Chehab <[email protected]>
Subject: Re: [PATCH] [0904_10] Siano: smsdvb -add events mechanism
Quoted 9 lines
Quoted 9 lines
To: "Uri Shkolnik" <[email protected]>
Cc: "LinuxML" <[email protected]>
Date: Monday, April 20, 2009, 7:21 PM
On Sun, 5 Apr 2009 03:18:01 -0700
(PDT)
Uri Shkolnik <[email protected]>Quoted 1 line · wrote:
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
# HG changeset patch
# User Uri Shkolnik <[email protected]>
# Date 1238742622 -10800
# Node ID
ec7ee486fb86d51bdb48e6a637a6ddd52e9e08c2Quoted 3 lines
Quoted 3 lines
Quoted 1 line
# Parent
020ba7b31c963bd36d607848198e9e4258a6f80eQuoted 1 line
[PATCH] [0904_10] Siano: smsdvb - add
events
Quoted 5 lines
Quoted 5 lines
mechanism
Quoted 4 lines
From: Uri Shkolnik <[email protected]>
Add events mechanism that will notify the
"cards"
Quoted 2 lines
Quoted 2 lines
component
Quoted 1 line
(which represent the specific hardware
target) for DVB
Quoted 5 lines
Quoted 5 lines
related
Quoted 1 line
events.
This patch contains unrelated coding style fixes.
Some of
Quoted 4 lines
Quoted 4 lines
them seem to be
related to previous changesets not applied.It is better to split coding style and real
changes into
Quoted 3 lines
Quoted 3 lines
separate patches.
Quoted 1 line
+/* Events that may come from DVB v3 adapter
*/
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
+static void sms_board_dvb3_event(struct
smscore_device_t*coredev,Quoted 1 line
+ enum
SMS_DVB3_EVENTSevent) {Quoted 3 lines
+ switch (event) {
+ caseDVB3_EVENT_INIT:
+
sms_debug("DVB3_EVENT_INIT");Quoted 8 lines
Quoted 8 lines
Quoted 1 line
+ /*
sms_board_event(coredev, BOARD_EVENT_BIND); */Quoted 3 lines
+ break;
+ caseDVB3_EVENT_SLEEP:
+
sms_debug("DVB3_EVENT_SLEEP");Quoted 1 line
+ /*
sms_board_event(coredev,
BOARD_EVENT_POWER_SUSPEND); */Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
+ break;
+ caseDVB3_EVENT_HOTPLUG:
+
sms_debug("DVB3_EVENT_HOTPLUG");Quoted 1 line
+ /*
sms_board_event(coredev, BOARD_EVENT_POWER_INIT);*/
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
+ break;
+ caseDVB3_EVENT_FE_LOCK:
+
sms_debug("DVB3_EVENT_FE_LOCK");Quoted 1 line
+ /*
sms_board_event(coredev, BOARD_EVENT_FE_LOCK);*/
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
+ break;
+ caseDVB3_EVENT_FE_UNLOCK:
+
sms_debug("DVB3_EVENT_FE_UNLOCK");Quoted 1 line
+ /*
sms_board_event(coredev, BOARD_EVENT_FE_UNLOCK);*/
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
+ break;
+ caseDVB3_EVENT_UNC_OK:
+
sms_debug("DVB3_EVENT_UNC_OK");Quoted 1 line
+ /*
sms_board_event(coredev,
BOARD_EVENT_MULTIPLEX_OK); */Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
+ break;
+ caseDVB3_EVENT_UNC_ERR:
+
sms_debug("DVB3_EVENT_UNC_ERR");Quoted 1 line
+ /*
sms_board_event(coredev,
BOARD_EVENT_MULTIPLEX_ERRORS); */Quoted 10 lines
Quoted 10 lines
Quoted 4 lines
+ break;
+
+ default:
+
sms_err("Unknown dvb3 api event");Quoted 3 lines
+ break;
+ }
+}This seems to be the core of this changeset.
However, it
Quoted 2 lines
Quoted 2 lines
just prints debug
messages, since the real call to the eventnotification
Quoted 8 lines
Quoted 6 lines
mechanism is commented.
Cheers,
MauroThe Siano driver is composed from several
components. The
sms_board_event()is called from one component (dvb3 in this case) to the "cards" component.Quoted 1 line
The series of patches I submitted, came to bring the
'dvb3' component as close as possible to the current file used by Siano. Since the "cards" has not been patched (yet), those functions have been add, but commented out.
This makes the above patch meaningless. If you first need to create this function, then add the function first, then add its call at the proper places, otherwise, it is impossible for someone that it is reviewing your patch series what are you doing with it.
Quoted 2 lines
I did the same with the endian and IR calls in other
patches (add 'place holders' e.g. a comment, to be un-comment later when those component will be patches and avaliable).
Quoted 9 lines
The same applies to the parts: first add the function, then add the function calls (or do both on the same patch), not the reverse.
Cheers,
Mauro
got it. will do.