Kernel Newbies archive mirror
 help / color / mirror / Atom feed
From: Tom Mitchell <niftylinkern@niftyegg.com>
To: Patryk <pbiel7@gmail.com>
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: Userspace or kernelspace driver once again
Date: Fri, 26 Apr 2024 18:23:15 -0700	[thread overview]
Message-ID: <CAAMy4USYKXAQjbFAGMEt0AKv+U=iywrWHs1bC9pO681YUHkTyQ@mail.gmail.com> (raw)
In-Reply-To: <CA+DkFDa3iC7MKNsMmG4+7uqP==Ux-M6jevXzYmM2YFXoWoavxQ@mail.gmail.com>

You asked what it depends on.
On Sun, Apr 21, 2024 at 5:36 AM Patryk <pbiel7@gmail.com> wrote:
>
> Suppose that you want to use a driver that controls fans ,let's say
> max31785. You have two options to chose:
> - kernel space driver that is already available in mainline linux
> - userspace driver that comes from Hardware Abstraction Layer library
> that also has an implementation, the library is a primary hardware
> access library used by all our projects
>
> What would you choose? And why? And if "it depends..." then depends on
> what actually?

In this case the timing of the I2C/SMBUS lines  and the hardware you
interface wiht; to and from.
It is "rare" to have hardware specific to  I2C/SMBUS in the same way
that a UART or USB device controller
of a PC  does the details of "bit banging" against  strict timing
requirements that cannot be interrupted for the most part.
It gets interesting if the device is also bidirectional and can have
concurrent send and receive lines.

What host do you want to work on?

The resources of the host sets the stage.
This may cover a lot of what you need to know.
https://www.cast-inc.com/sites/default/files/pdfs/2023-06/cast_i2c-smbus-amd.pdf

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

      reply	other threads:[~2024-04-27  1:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-21 12:35 Userspace or kernelspace driver once again Patryk
2024-04-27  1:23 ` Tom Mitchell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAMy4USYKXAQjbFAGMEt0AKv+U=iywrWHs1bC9pO681YUHkTyQ@mail.gmail.com' \
    --to=niftylinkern@niftyegg.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=pbiel7@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).