linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Barnabás Pőcze" <pobrn@protonmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: "linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>
Subject: Re: [QUESTION] fan rpm hwmon driver
Date: Sat, 04 Jul 2020 21:25:29 +0000	[thread overview]
Message-ID: <vCYQSnYIKROnbBCa77NtCP1VqtQUNl8cItazgNFjTJfmzRogHKpxkUThwzQnv-HXuISOOhhZ_J_gM2Pm-Y8dwfp2c6IxY2LYirIgdbriYwQ=@protonmail.com> (raw)
In-Reply-To: <3b92f53f-fd3f-a432-aae1-620582701286@roeck-us.net>

2020. július 4., szombat 22:54 keltezéssel, Guenter Roeck írta:
> On 7/4/20 12:50 PM, Barnabás Pőcze wrote:
>
> > Hello all,
> > I am completely new to Linux kernel development. I have written a kernel module for my laptop that integrates the fan speeds available in the embedded controller memory into the hwmon subsystem.
> > My first question would be: can such a driver be merged into the mainline? I ask this because it is a device specific driver, and I am not sure if such drivers are wanted in the mainline.
>
> There are several device/platform specific drivers in drivers/hwmon;
> that is not a problem. Question is more how the EC is accessed, and

It is accessed using the acpi/ec driver.


> who is going to maintain the driver after the initial submission.
> This might be easier to evaluate if we had a patch or a pointer to,
> for example, an out-of-tree driver at a public repository site such
> as github.
>

I uploaded it to github, I hope it helps: https://github.com/pobrn/xmg_fusion_15_fans
I apologize for stylistic inconsistencies and such in the code, this is more or less a work in progress (at least in terms of making it an "acceptable" kernel module).


> > Depending on the answer to my first question, my second question is: where should such a driver reside in the source tree? Initially, I thought of drivers/hwmon, but that seems to be occupied by drivers for external(?) devices (I am not sure, but that is the idea I get). So I am now thinking of drivers/platform/x86. However, I have failed to find any fan hwmon drivers there, so I am not sure about that one, either.
>
> hwmon drivers should in general reside in drivers/hwmon, unless hardware
> monitoring functionality is part of other functionality and would be
> difficult to extract from the main driver (example: various Ethernet
> or graphics controllers).
>
> Guenter


Thanks for the reply.

Barnabás Pőcze

  reply	other threads:[~2020-07-04 21:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-04 19:50 [QUESTION] fan rpm hwmon driver Barnabás Pőcze
2020-07-04 20:54 ` Guenter Roeck
2020-07-04 21:25   ` Barnabás Pőcze [this message]
2020-07-04 22:44     ` Guenter Roeck
2020-07-04 23:08       ` Barnabás Pőcze
2020-07-04 23:56         ` Guenter Roeck
2020-07-05 11:34           ` Barnabás Pőcze
2020-07-05 13:23             ` Guenter Roeck
2020-07-05 14:43               ` Barnabás Pőcze
2020-07-05 15:15                 ` Guenter Roeck

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='vCYQSnYIKROnbBCa77NtCP1VqtQUNl8cItazgNFjTJfmzRogHKpxkUThwzQnv-HXuISOOhhZ_J_gM2Pm-Y8dwfp2c6IxY2LYirIgdbriYwQ=@protonmail.com' \
    --to=pobrn@protonmail.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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 NNTP newsgroup(s).