* hwmon: pmbus: Question about header files
@ 2024-10-03 22:31 Vasileios Amoiridis
2024-10-04 21:22 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Vasileios Amoiridis @ 2024-10-03 22:31 UTC (permalink / raw)
To: jdelvare, linux
Cc: vassilisamir, vasileios.amoiridis, federico.vaga, linux-hwmon,
linux-kernel
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?
Thanks a lot for your time!
Best regards,
Vasilis
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: hwmon: pmbus: Question about header files
2024-10-03 22:31 hwmon: pmbus: Question about header files Vasileios Amoiridis
@ 2024-10-04 21:22 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2024-10-04 21:22 UTC (permalink / raw)
To: Vasileios Amoiridis, jdelvare
Cc: vasileios.amoiridis, federico.vaga, linux-hwmon, linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-04 21:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-03 22:31 hwmon: pmbus: Question about header files Vasileios Amoiridis
2024-10-04 21:22 ` Guenter Roeck
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®