gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: devices: pass gn_config to open and following devices: *: use instan


From: Pawel Kot
Subject: Re: devices: pass gn_config to open and following devices: *: use instance data commits
Date: Sun, 9 Jan 2022 22:01:37 +0100

Hi Ladis,

Thanks. Let me look into preview5 shortly then.

Why bother with gn_config then? As far as I can see all drivers use just ->port_device. (Plus two more by bluetooth). So perhaps let's kill this dependency as well?

I mean this part:
https://github.com/3x380V/gnokii/commit/fcbe237d1c18b499a1a5992130146edb07f4f0f2#diff-eda4a60c956c0ae338299217d26f32a0a34ad79e14ddbfab08594a4cbfdc5d64
You have moved the n = atoi(cfg->port_device) portion from one function to the other.

Cheers,
Paweł

On Sun, Jan 9, 2022 at 9:47 PM Ladislav Michl <ladis@triops.cz> wrote:
Hi Pawel!

(and welcome back :-))
I just pushed my last changes here:
https://github.com/3x380V/gnokii/commits/preview5
Sorry for not doing that earlier...

As for changes you are asking about:
- gn_statemachine was removed as parameter of device drivers as it was
pulling pretty high level stuff into low level. Driver is just a simple
driver, it does not need to be aware at all about gnokii itself.

- as for usbfbus_find_interfaces I believe you misread patch. Logic is
the same, I just modified interface to be the same for all drivers, so
I could use plugin architecture.

        ladis

-----Original Message-----
From: Pawel Kot <gnokii@gmail.com>
To: Ladislav Michl <ladis@linux-mips.org>, Discussion forum for gnokii
users. <gnokii-users@nongnu.org>
Subject: devices: pass gn_config to open and following devices: *: use
instance data commits
Date: Sun, 9 Jan 2022 19:55:40 +0100

Hi Ladis,

I'm in the process of pulling patches from you to the mainline. I think
I got most of them already read, understood, and committed (will push
them to my GitHub repo any time soon - will need to figure out how to
push them to the official repo easily). However, a couple of questions
popped up (raising them in separate emails).

I can see that you are getting rid of gn_statemachine as a parameter to
device drivers. What is the reason for this? I think we have this
rather convenient and universal method of passing gn_statemachine as a
context (agree that device drivers interface could be simplified
though).

Also, why do you move logic between usbfbus_find_interfaces() and
fbusdku2sub_open()?

Cheers,




--
Pawel Kot

reply via email to

[Prev in Thread] Current Thread [Next in Thread]