Re: [PATCH v10 0/7] Add Fieldbus subsystem + support HMS Profinet card

From: Sven Van Asbroeck
Date: Tue Apr 16 2019 - 14:56:39 EST


On Tue, Apr 16, 2019 at 12:49 PM Enrico Weigelt, metux IT consult
<lkml@xxxxxxxxx> wrote:
>
>
> Maybe I'm a bit beaurocratic here, but I really believe that precise
> naming is important, eg. for avoiding potential conflicts w/ different
> fieldbus classes (eg. mvb) that might come in the future.

I named the subsystem 'fieldbus_dev' because it handles fieldbus
devices, not controllers. Granted, it's in the drivers/staging/fieldbus
directory, but that's because people objected to the verbosity of
fieldbus_dev. In the C code, it's all fieldbus_dev.

>
> By the way: any special reason for doing this via device instead of
> socket (like we have w/ can) ?
>

A fieldbus_dev device communicates with its controller through a section
of shared memory (process memory). It just felt more logical to model
this as a device which acts like a file. When you read/write the file,
you read/write the process memory underneath.

Sven