Skip to contentSkip to conversation

[0904_10] Siano: smsdvb - add events mechanism

PATCH Uri Shkolnik 2 participants 2 messages Apr 20, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw
Quoted 92 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, 7:21 PM
On Sun, 5 Apr 2009 03:18:01 -0700
(PDT)
Uri Shkolnik <[email protected]>

Quoted 6 lines · wrote:

# HG changeset patch
# User Uri Shkolnik <[email protected]>
# Date 1238742622 -10800
# Node ID ec7ee486fb86d51bdb48e6a637a6ddd52e9e08c2 # Parent

020ba7b31c963bd36d607848198e9e4258a6f80e

Quoted 1 line

[PATCH] [0904_10] Siano: smsdvb - add events

mechanism

Quoted 4 lines

From: Uri Shkolnik <[email protected]>

Add events mechanism that will notify the "cards"

component

Quoted 1 line

(which represent the specific hardware target) for DVB

related

Quoted 1 line

events.

This patch contains unrelated coding style fixes. Some of them seem to be
related to previous changesets not applied.

It is better to split coding style and real changes into separate patches.

Review

Quoted 2 lines
(quoted diff) +2 -0
+/* Events that may come from DVB v3 adapter */
+static void sms_board_dvb3_event(struct

smscore_device_t *coredev,

Quoted 1 line

+        enum

SMS_DVB3_EVENTS event) {

Quoted 3 lines

+    switch (event) {
+    case DVB3_EVENT_INIT:
+

sms_debug("DVB3_EVENT_INIT");

Quoted 1 line

+        /*

sms_board_event(coredev, BOARD_EVENT_BIND); */

Quoted 3 lines

+        break;
+    case DVB3_EVENT_SLEEP:
+

sms_debug("DVB3_EVENT_SLEEP");

Quoted 1 line

+        /*

sms_board_event(coredev, BOARD_EVENT_POWER_SUSPEND); */

Quoted 3 lines

+        break;
+    case DVB3_EVENT_HOTPLUG:
+

sms_debug("DVB3_EVENT_HOTPLUG");

Quoted 1 line

+        /*

sms_board_event(coredev, BOARD_EVENT_POWER_INIT); */

Quoted 3 lines

+        break;
+    case DVB3_EVENT_FE_LOCK:
+

sms_debug("DVB3_EVENT_FE_LOCK");

Quoted 1 line

+        /*

sms_board_event(coredev, BOARD_EVENT_FE_LOCK); */

Quoted 3 lines

+        break;
+    case DVB3_EVENT_FE_UNLOCK:
+

sms_debug("DVB3_EVENT_FE_UNLOCK");

Quoted 1 line

+        /*

sms_board_event(coredev, BOARD_EVENT_FE_UNLOCK); */

Quoted 3 lines

+        break;
+    case DVB3_EVENT_UNC_OK:
+

sms_debug("DVB3_EVENT_UNC_OK");

Quoted 1 line

+        /*

sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_OK); */

Quoted 3 lines

+        break;
+    case DVB3_EVENT_UNC_ERR:
+

sms_debug("DVB3_EVENT_UNC_ERR");

Quoted 1 line

+        /*

sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_ERRORS); */

Quoted 4 lines

+        break;
+
+    default:
+

sms_err("Unknown dvb3 api event");

Quoted 3 lines

+        break;
+    }
+}

Quoted 9 lines

This seems to be the core of this changeset. However, it just prints debug
messages, since the real call to the event notification mechanism is commented.

Cheers,
Mauro

The Siano driver is composed from several components. The sms_board_event() is called from one component (dvb3 in this case) to the "cards" component.
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.

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).

Regards,

Uri

#1 lore raw
Quoted 103 lines · On Mon, 20 Apr 2009 09:56:26 -0700 (PDT) Uri Shkolnik <[email protected]> wrote:
Quoted 98 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, 7:21 PM
On Sun, 5 Apr 2009 03:18:01 -0700
(PDT)
Uri Shkolnik <[email protected]>

Quoted 6 lines · wrote:

# HG changeset patch
# User Uri Shkolnik <[email protected]>
# Date 1238742622 -10800
# Node ID ec7ee486fb86d51bdb48e6a637a6ddd52e9e08c2 # Parent

020ba7b31c963bd36d607848198e9e4258a6f80e

Quoted 1 line

[PATCH] [0904_10] Siano: smsdvb - add events

mechanism

Quoted 4 lines

From: Uri Shkolnik <[email protected]>

Add events mechanism that will notify the "cards"

component

Quoted 1 line

(which represent the specific hardware target) for DVB

related

Quoted 1 line

events.

This patch contains unrelated coding style fixes. Some of them seem to be
related to previous changesets not applied.

It is better to split coding style and real changes into separate patches.

Review

Quoted 2 lines
(quoted diff) +2 -0
+/* Events that may come from DVB v3 adapter */
+static void sms_board_dvb3_event(struct

smscore_device_t *coredev,

Quoted 1 line

+        enum

SMS_DVB3_EVENTS event) {

Quoted 3 lines

+    switch (event) {
+    case DVB3_EVENT_INIT:
+

sms_debug("DVB3_EVENT_INIT");

Quoted 1 line

+        /*

sms_board_event(coredev, BOARD_EVENT_BIND); */

Quoted 3 lines

+        break;
+    case DVB3_EVENT_SLEEP:
+

sms_debug("DVB3_EVENT_SLEEP");

Quoted 1 line

+        /*

sms_board_event(coredev, BOARD_EVENT_POWER_SUSPEND); */

Quoted 3 lines

+        break;
+    case DVB3_EVENT_HOTPLUG:
+

sms_debug("DVB3_EVENT_HOTPLUG");

Quoted 1 line

+        /*

sms_board_event(coredev, BOARD_EVENT_POWER_INIT); */

Quoted 3 lines

+        break;
+    case DVB3_EVENT_FE_LOCK:
+

sms_debug("DVB3_EVENT_FE_LOCK");

Quoted 1 line

+        /*

sms_board_event(coredev, BOARD_EVENT_FE_LOCK); */

Quoted 3 lines

+        break;
+    case DVB3_EVENT_FE_UNLOCK:
+

sms_debug("DVB3_EVENT_FE_UNLOCK");

Quoted 1 line

+        /*

sms_board_event(coredev, BOARD_EVENT_FE_UNLOCK); */

Quoted 3 lines

+        break;
+    case DVB3_EVENT_UNC_OK:
+

sms_debug("DVB3_EVENT_UNC_OK");

Quoted 1 line

+        /*

sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_OK); */

Quoted 3 lines

+        break;
+    case DVB3_EVENT_UNC_ERR:
+

sms_debug("DVB3_EVENT_UNC_ERR");

Quoted 1 line

+        /*

sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_ERRORS); */

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 just prints debug
messages, since the real call to the event notification mechanism is commented.

Quoted 6 lines
Quoted 3 lines

Cheers,
Mauro

The Siano driver is composed from several components. The sms_board_event() is called from one component (dvb3 in this case) to the "cards" component.
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).

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