Re: devices: pass gn_config to open and following devices: *: use instance data commits

Pawel Kot <[email protected]> Sun, 9 Jan 2022 22:01:37 +0100
Newsgroups gmane.linux.drivers.gnokii
Message-ID <CAHytCw6RmR_Bm5uF0P=QGLqWjymazL-A_GUurDC7zy7LwxPJqA@mail.gmail.com>
--===============4267725313881829609==
Content-Type: multipart/alternative; boundary="0000000000005e58ff05d52c8962"

--0000000000005e58ff05d52c8962
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

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/fcbe237d1c18b499a1a5992130146edb07f=
4f0f2#diff-eda4a60c956c0ae338299217d26f32a0a34ad79e14ddbfab08594a4cbfdc5d64
You have moved the n =3D atoi(cfg->port_device) portion from one function t=
o
the other.

Cheers,
Pawe=C5=82

On Sun, Jan 9, 2022 at 9:47 PM Ladislav Michl <[email protected]> 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 <[email protected]>
> To: Ladislav Michl <[email protected]>, Discussion forum for gnokii
> users. <[email protected]>
> 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,
>
>
>

--=20
Pawel Kot

--0000000000005e58ff05d52c8962
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi Ladis,</div><div><br></div><div>Thanks. Let me loo=
k into preview5 shortly then.</div><div><br></div><div>Why bother with gn_c=
onfig then? As far as I can see all drivers use just -&gt;port_device. (Plu=
s two more by bluetooth). So perhaps let&#39;s kill=C2=A0this dependency as=
 well?</div><div><br></div><div>I mean this part:</div><div><a href=3D"http=
s://github.com/3x380V/gnokii/commit/fcbe237d1c18b499a1a5992130146edb07f4f0f=
2#diff-eda4a60c956c0ae338299217d26f32a0a34ad79e14ddbfab08594a4cbfdc5d64">ht=
tps://github.com/3x380V/gnokii/commit/fcbe237d1c18b499a1a5992130146edb07f4f=
0f2#diff-eda4a60c956c0ae338299217d26f32a0a34ad79e14ddbfab08594a4cbfdc5d64</=
a><br></div><div>You have moved the n =3D atoi(cfg-&gt;port_device) portion=
 from one function to the other.</div><div><br></div>Cheers,<div>Pawe=C5=82=
</div><div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_a=
ttr">On Sun, Jan 9, 2022 at 9:47 PM Ladislav Michl &lt;<a href=3D"mailto:la=
[email protected]">[email protected]</a>&gt; wrote:<br></div><blockquote class=3D=
"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(2=
04,204,204);padding-left:1ex">Hi Pawel!<br>
<br>
(and welcome back :-))<br>
I just pushed my last changes here:<br>
<a href=3D"https://github.com/3x380V/gnokii/commits/preview5" rel=3D"norefe=
rrer" target=3D"_blank">https://github.com/3x380V/gnokii/commits/preview5</=
a><br>
Sorry for not doing that earlier...<br>
<br>
As for changes you are asking about:<br>
- gn_statemachine was removed as parameter of device drivers as it was<br>
pulling pretty high level stuff into low level. Driver is just a simple<br>
driver, it does not need to be aware at all about gnokii itself.<br>
<br>
- as for usbfbus_find_interfaces I believe you misread patch. Logic is<br>
the same, I just modified interface to be the same for all drivers, so<br>
I could use plugin architecture.<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ladis<br>
<br>
-----Original Message-----<br>
From: Pawel Kot &lt;<a href=3D"mailto:[email protected]" target=3D"_blank">g=
[email protected]</a>&gt;<br>
To: Ladislav Michl &lt;<a href=3D"mailto:[email protected]" target=3D"_b=
lank">[email protected]</a>&gt;, Discussion forum for gnokii<br>
users. &lt;<a href=3D"mailto:[email protected]" target=3D"_blank">gno=
[email protected]</a>&gt;<br>
Subject: devices: pass gn_config to open and following devices: *: use<br>
instance data commits<br>
Date: Sun, 9 Jan 2022 19:55:40 +0100<br>
<br>
Hi Ladis,<br>
<br>
I&#39;m in the process of pulling patches from you to the mainline. I think=
<br>
I got most of them already read, understood, and committed=C2=A0(will push<=
br>
them to my GitHub repo any time soon - will need to figure out how to<br>
push them to the official repo easily). However, a couple of questions<br>
popped up (raising them in separate emails).<br>
<br>
I can see that you are getting rid of gn_statemachine as a parameter to<br>
device drivers. What is the reason for this? I think we have this<br>
rather convenient=C2=A0and universal method of passing gn_statemachine as a=
<br>
context (agree that device drivers interface could be simplified<br>
though).<br>
<br>
Also, why do you move logic between usbfbus_find_interfaces() and<br>
fbusdku2sub_open()?<br>
<br>
Cheers,<br>
<br>
<br>
</blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"=
 class=3D"gmail_signature">Pawel Kot</div></div></div>

--0000000000005e58ff05d52c8962--


--===============4267725313881829609==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
gnokii-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/gnokii-users

--===============4267725313881829609==--