From: Guenter Roeck <linux@roeck-us.net>
To: Vasileios Amoiridis <vassilisamir@gmail.com>, jdelvare@suse.com
Cc: vasileios.amoiridis@cern.ch, federico.vaga@cern.ch,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: hwmon: pmbus: Question about header files
Date: Fri, 4 Oct 2024 14:22:55 -0700 [thread overview]
Message-ID: <d220f9d1-54df-4d4e-b90f-69bc5de5a22f@roeck-us.net> (raw)
In-Reply-To: <20241003223110.17166-1-vassilisamir@gmail.com>
On 10/3/24 15:31, Vasileios Amoiridis wrote:
> Hello hwmon and PMBUS community,
>
> I am currently studying how the PMBUS subsystem works because I am trying to
> write a driver for a PSU and submit for review. I noticed that the subsystem is
> quite intelligent and it manages to do most of the stuff in the pmbus_core.c
> leaving a minimum amount of work to be done in the actual device driver!!
>
> I have a question though, regarding the header files <include/linux/pmbus.h> and
> <drivers/hwmon/pmbus/pmbus.h>. With my limited experience in kernel development,
> I would expect that the drivers/hwmon/pmbus/pmbus.h file would include stuff
> that are used only by the pmbus_core.c/pmbus.c while anything that could be
> potentially used from the device drivers would go to the include/linux/pmbus.h.
>
> Is my reasoning wrong? What was the reasoning behind the split between those 2
> files?
>
Mostly historic. The original idea was to keep platform data in include/linux,
but at this point that has pretty much no value since all its users are (and
should be) in drivers/hwmon/pmbus/. Not worth doing anything about.
Guenter
prev parent reply other threads:[~2024-10-04 21:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 22:31 Vasileios Amoiridis
2024-10-04 21:22 ` Guenter Roeck [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=d220f9d1-54df-4d4e-b90f-69bc5de5a22f@roeck-us.net \
--to=linux@roeck-us.net \
--cc=federico.vaga@cern.ch \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vasileios.amoiridis@cern.ch \
--cc=vassilisamir@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
all inboxes | Powered by JetHome®