Re: [PATCH v5 2/5] powercap/drivers/dtpm: Create a registering system

2021-04-01 Thread Daniel Lezcano
On 01/04/2021 08:02, Greg KH wrote: > On Wed, Mar 31, 2021 at 10:46:48PM +0200, Daniel Lezcano wrote: >> >> Hi Greg, >> >> On 31/03/2021 20:06, Greg KH wrote: >>> On Wed, Mar 31, 2021 at 01:00:45PM +0200, Daniel Lezcano wrote: +struct dtpm *dtpm_lookup(const char *name); + +int

Re: [PATCH v5 2/5] powercap/drivers/dtpm: Create a registering system

2021-04-01 Thread Greg KH
On Wed, Mar 31, 2021 at 10:46:48PM +0200, Daniel Lezcano wrote: > > Hi Greg, > > On 31/03/2021 20:06, Greg KH wrote: > > On Wed, Mar 31, 2021 at 01:00:45PM +0200, Daniel Lezcano wrote: > >> +struct dtpm *dtpm_lookup(const char *name); > >> + > >> +int dtpm_add(const char *name, struct dtpm

Re: [PATCH v5 2/5] powercap/drivers/dtpm: Create a registering system

2021-03-31 Thread Daniel Lezcano
Hi Greg, On 31/03/2021 20:06, Greg KH wrote: > On Wed, Mar 31, 2021 at 01:00:45PM +0200, Daniel Lezcano wrote: >> +struct dtpm *dtpm_lookup(const char *name); >> + >> +int dtpm_add(const char *name, struct dtpm *dtpm); >> + >> +void dtpm_del(const char *name); > > You can not add new kernel

Re: [PATCH v5 2/5] powercap/drivers/dtpm: Create a registering system

2021-03-31 Thread Greg KH
On Wed, Mar 31, 2021 at 01:00:45PM +0200, Daniel Lezcano wrote: > +struct dtpm *dtpm_lookup(const char *name); > + > +int dtpm_add(const char *name, struct dtpm *dtpm); > + > +void dtpm_del(const char *name); You can not add new kernel apis that have no user. How do you know if they actually

Re: [PATCH v5 2/5] powercap/drivers/dtpm: Create a registering system

2021-03-31 Thread Greg KH
On Wed, Mar 31, 2021 at 01:00:45PM +0200, Daniel Lezcano wrote: > A SoC can be differently structured depending on the platform and the > kernel can not be aware of all the combinations, as well as the > specific tweaks for a particular board. > > The creation of the hierarchy must be delegated

[PATCH v5 2/5] powercap/drivers/dtpm: Create a registering system

2021-03-31 Thread Daniel Lezcano
A SoC can be differently structured depending on the platform and the kernel can not be aware of all the combinations, as well as the specific tweaks for a particular board. The creation of the hierarchy must be delegated to userspace. These changes provide a registering mechanism where the