All of lore.kernel.org
 help / color / mirror / Atom feed
* power supply gating with ltc2978
@ 2014-08-15 21:34 ` atull
  0 siblings, 0 replies; 10+ messages in thread
From: atull @ 2014-08-15 21:34 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Jean Delvare, lm-sensors, linux-kernel, Liam Girdwood, Mark Brown

Hello,

I am interested in adding functionality to be able to gate power supplies 
going through a ltc2978.  I see that there is a hwmon driver already 
existing (hwmon/pmbus/ltc2978.c).  I see some of the other hwmon drivers 
have MFD's.  It looks like this ltc driver would need a MFD and a 
regulator driver added.  However I don't see other pmbus hwmon drivers
using MFD.

So I am asking for recommendations and reservations on how to proceed here 
before I get too far with this.

Thanks,
Alan Tull


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [lm-sensors] power supply gating with ltc2978
@ 2014-08-15 21:34 ` atull
  0 siblings, 0 replies; 10+ messages in thread
From: atull @ 2014-08-15 21:34 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Jean Delvare, lm-sensors, linux-kernel, Liam Girdwood, Mark Brown

Hello,

I am interested in adding functionality to be able to gate power supplies 
going through a ltc2978.  I see that there is a hwmon driver already 
existing (hwmon/pmbus/ltc2978.c).  I see some of the other hwmon drivers 
have MFD's.  It looks like this ltc driver would need a MFD and a 
regulator driver added.  However I don't see other pmbus hwmon drivers
using MFD.

So I am asking for recommendations and reservations on how to proceed here 
before I get too far with this.

Thanks,
Alan Tull


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: power supply gating with ltc2978
  2014-08-15 21:34 ` [lm-sensors] " atull
@ 2014-08-15 21:58   ` Guenter Roeck
  -1 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2014-08-15 21:58 UTC (permalink / raw)
  To: atull; +Cc: Jean Delvare, lm-sensors, linux-kernel, Liam Girdwood, Mark Brown

On 08/15/2014 02:34 PM, atull wrote:
> Hello,
>
> I am interested in adding functionality to be able to gate power supplies
> going through a ltc2978.  I see that there is a hwmon driver already
> existing (hwmon/pmbus/ltc2978.c).  I see some of the other hwmon drivers
> have MFD's.  It looks like this ltc driver would need a MFD and a
> regulator driver added.  However I don't see other pmbus hwmon drivers
> using MFD.
>
> So I am asking for recommendations and reservations on how to proceed here
> before I get too far with this.
>

I would suggest to add the regulator driver registration into the pmbus code.
I would have done this earlier myself, but there was no clear need for it
so I did not bother.

The functionality between regulator and limit/status reporting is heavily
intertwined in pmbus devices, and there is no clear functional separation
between power regulation and limit/status reporting related functionality.
Or, in other words, PMBus devices are not multi-function devices.

One of the challenges is that the values to write into the "operation" register
is device specific, so it is not possible to enable the functionality for all
PMBus chips. We'll need some device specific configuration data, such as on/off
values or maybe function callbacks into device specific code, to enable
regulator functionality.

Guenter


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] power supply gating with ltc2978
@ 2014-08-15 21:58   ` Guenter Roeck
  0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2014-08-15 21:58 UTC (permalink / raw)
  To: atull; +Cc: Jean Delvare, lm-sensors, linux-kernel, Liam Girdwood, Mark Brown

On 08/15/2014 02:34 PM, atull wrote:
> Hello,
>
> I am interested in adding functionality to be able to gate power supplies
> going through a ltc2978.  I see that there is a hwmon driver already
> existing (hwmon/pmbus/ltc2978.c).  I see some of the other hwmon drivers
> have MFD's.  It looks like this ltc driver would need a MFD and a
> regulator driver added.  However I don't see other pmbus hwmon drivers
> using MFD.
>
> So I am asking for recommendations and reservations on how to proceed here
> before I get too far with this.
>

I would suggest to add the regulator driver registration into the pmbus code.
I would have done this earlier myself, but there was no clear need for it
so I did not bother.

The functionality between regulator and limit/status reporting is heavily
intertwined in pmbus devices, and there is no clear functional separation
between power regulation and limit/status reporting related functionality.
Or, in other words, PMBus devices are not multi-function devices.

One of the challenges is that the values to write into the "operation" register
is device specific, so it is not possible to enable the functionality for all
PMBus chips. We'll need some device specific configuration data, such as on/off
values or maybe function callbacks into device specific code, to enable
regulator functionality.

Guenter


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: power supply gating with ltc2978
  2014-08-15 21:34 ` [lm-sensors] " atull
@ 2014-08-16 13:20   ` Mark Brown
  -1 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2014-08-16 13:20 UTC (permalink / raw)
  To: atull
  Cc: Guenter Roeck, Jean Delvare, lm-sensors, linux-kernel, Liam Girdwood

[-- Attachment #1: Type: text/plain, Size: 813 bytes --]

On Fri, Aug 15, 2014 at 04:34:49PM -0500, atull wrote:

> I am interested in adding functionality to be able to gate power supplies 
> going through a ltc2978.  I see that there is a hwmon driver already 
> existing (hwmon/pmbus/ltc2978.c).  I see some of the other hwmon drivers 
> have MFD's.  It looks like this ltc driver would need a MFD and a 
> regulator driver added.  However I don't see other pmbus hwmon drivers
> using MFD.

> So I am asking for recommendations and reservations on how to proceed here 
> before I get too far with this.

Without knowing anything at all about pmbus or this particular hardware
it's hard to comment but what you're saying here sounds sensible (though
I do see that apparently splitting the drivers may not actually be
sensible from Guenter's followup).

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] power supply gating with ltc2978
@ 2014-08-16 13:20   ` Mark Brown
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2014-08-16 13:20 UTC (permalink / raw)
  To: atull
  Cc: Guenter Roeck, Jean Delvare, lm-sensors, linux-kernel, Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 813 bytes --]

On Fri, Aug 15, 2014 at 04:34:49PM -0500, atull wrote:

> I am interested in adding functionality to be able to gate power supplies 
> going through a ltc2978.  I see that there is a hwmon driver already 
> existing (hwmon/pmbus/ltc2978.c).  I see some of the other hwmon drivers 
> have MFD's.  It looks like this ltc driver would need a MFD and a 
> regulator driver added.  However I don't see other pmbus hwmon drivers
> using MFD.

> So I am asking for recommendations and reservations on how to proceed here 
> before I get too far with this.

Without knowing anything at all about pmbus or this particular hardware
it's hard to comment but what you're saying here sounds sensible (though
I do see that apparently splitting the drivers may not actually be
sensible from Guenter's followup).

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: power supply gating with ltc2978
  2014-08-16 13:20   ` [lm-sensors] " Mark Brown
@ 2014-08-18  3:07     ` Guenter Roeck
  -1 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2014-08-18  3:07 UTC (permalink / raw)
  To: Mark Brown; +Cc: atull, Jean Delvare, lm-sensors, linux-kernel, Liam Girdwood

On Sat, Aug 16, 2014 at 02:20:50PM +0100, Mark Brown wrote:
> On Fri, Aug 15, 2014 at 04:34:49PM -0500, atull wrote:
> 
> > I am interested in adding functionality to be able to gate power supplies 
> > going through a ltc2978.  I see that there is a hwmon driver already 
> > existing (hwmon/pmbus/ltc2978.c).  I see some of the other hwmon drivers 
> > have MFD's.  It looks like this ltc driver would need a MFD and a 
> > regulator driver added.  However I don't see other pmbus hwmon drivers
> > using MFD.
> 
> > So I am asking for recommendations and reservations on how to proceed here 
> > before I get too far with this.
> 
> Without knowing anything at all about pmbus or this particular hardware
> it's hard to comment but what you're saying here sounds sensible (though
> I do see that apparently splitting the drivers may not actually be
> sensible from Guenter's followup).

I had originally thought about converting the pmbus drivers to mfd with client
drivers, but I concluded that it would add a lot of complexity with little gain.
It makes sense to separate a driver into mfd and a number of client drivers
if a device has clear functional blocks for the different devices it supports.
With PMBus, this is not the case. Separating a PMBus driver would be a purely
artificial costruct, and there would be overlapping functionality. Separating
just a single driver out of the group of PMBus drivers, as seems to be suggested
above, makes even less sense as one simply can not separate the core PMBus
driver code from its front-end drivers.

On the other side, adding regulator support into the PMBus driver code would
make a lot of sense. It should also be quite straightforward.

Or anyway that is my opinion. If someone wants to spend the time and separate
the PMBus drivers into an MfD part and hwmon and regulator client drivers, I'll
be happy to look at the resulting patch set.

Guenter

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] power supply gating with ltc2978
@ 2014-08-18  3:07     ` Guenter Roeck
  0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2014-08-18  3:07 UTC (permalink / raw)
  To: Mark Brown; +Cc: atull, Jean Delvare, lm-sensors, linux-kernel, Liam Girdwood

On Sat, Aug 16, 2014 at 02:20:50PM +0100, Mark Brown wrote:
> On Fri, Aug 15, 2014 at 04:34:49PM -0500, atull wrote:
> 
> > I am interested in adding functionality to be able to gate power supplies 
> > going through a ltc2978.  I see that there is a hwmon driver already 
> > existing (hwmon/pmbus/ltc2978.c).  I see some of the other hwmon drivers 
> > have MFD's.  It looks like this ltc driver would need a MFD and a 
> > regulator driver added.  However I don't see other pmbus hwmon drivers
> > using MFD.
> 
> > So I am asking for recommendations and reservations on how to proceed here 
> > before I get too far with this.
> 
> Without knowing anything at all about pmbus or this particular hardware
> it's hard to comment but what you're saying here sounds sensible (though
> I do see that apparently splitting the drivers may not actually be
> sensible from Guenter's followup).

I had originally thought about converting the pmbus drivers to mfd with client
drivers, but I concluded that it would add a lot of complexity with little gain.
It makes sense to separate a driver into mfd and a number of client drivers
if a device has clear functional blocks for the different devices it supports.
With PMBus, this is not the case. Separating a PMBus driver would be a purely
artificial costruct, and there would be overlapping functionality. Separating
just a single driver out of the group of PMBus drivers, as seems to be suggested
above, makes even less sense as one simply can not separate the core PMBus
driver code from its front-end drivers.

On the other side, adding regulator support into the PMBus driver code would
make a lot of sense. It should also be quite straightforward.

Or anyway that is my opinion. If someone wants to spend the time and separate
the PMBus drivers into an MfD part and hwmon and regulator client drivers, I'll
be happy to look at the resulting patch set.

Guenter

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: power supply gating with ltc2978
  2014-08-18  3:07     ` [lm-sensors] " Guenter Roeck
@ 2014-08-19 14:21       ` atull
  -1 siblings, 0 replies; 10+ messages in thread
From: atull @ 2014-08-19 14:21 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Mark Brown, Jean Delvare, lm-sensors, linux-kernel, Liam Girdwood

On Mon, 18 Aug 2014, Guenter Roeck wrote:

> On Sat, Aug 16, 2014 at 02:20:50PM +0100, Mark Brown wrote:
> > On Fri, Aug 15, 2014 at 04:34:49PM -0500, atull wrote:
> > 
> > > I am interested in adding functionality to be able to gate power supplies 
> > > going through a ltc2978.  I see that there is a hwmon driver already 
> > > existing (hwmon/pmbus/ltc2978.c).  I see some of the other hwmon drivers 
> > > have MFD's.  It looks like this ltc driver would need a MFD and a 
> > > regulator driver added.  However I don't see other pmbus hwmon drivers
> > > using MFD.
> > 
> > > So I am asking for recommendations and reservations on how to proceed here 
> > > before I get too far with this.
> > 
> > Without knowing anything at all about pmbus or this particular hardware
> > it's hard to comment but what you're saying here sounds sensible (though
> > I do see that apparently splitting the drivers may not actually be
> > sensible from Guenter's followup).
> 
> I had originally thought about converting the pmbus drivers to mfd with client
> drivers, but I concluded that it would add a lot of complexity with little gain.
> It makes sense to separate a driver into mfd and a number of client drivers
> if a device has clear functional blocks for the different devices it supports.
> With PMBus, this is not the case. Separating a PMBus driver would be a purely
> artificial costruct, and there would be overlapping functionality. Separating
> just a single driver out of the group of PMBus drivers, as seems to be suggested
> above, makes even less sense as one simply can not separate the core PMBus
> driver code from its front-end drivers.
> 
> On the other side, adding regulator support into the PMBus driver code would
> make a lot of sense. It should also be quite straightforward.
> 
> Or anyway that is my opinion. If someone wants to spend the time and separate
> the PMBus drivers into an MfD part and hwmon and regulator client drivers, I'll
> be happy to look at the resulting patch set.
> 
> Guenter
> 

Hi Guenter,

I'd really rather just add regulator support to the PMBus driver code and 
avoid all the mess of creating a MFD.  It seems more straigtforward. I'll 
let you know when I have something working to look at.

Alan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] power supply gating with ltc2978
@ 2014-08-19 14:21       ` atull
  0 siblings, 0 replies; 10+ messages in thread
From: atull @ 2014-08-19 14:21 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Mark Brown, Jean Delvare, lm-sensors, linux-kernel, Liam Girdwood

On Mon, 18 Aug 2014, Guenter Roeck wrote:

> On Sat, Aug 16, 2014 at 02:20:50PM +0100, Mark Brown wrote:
> > On Fri, Aug 15, 2014 at 04:34:49PM -0500, atull wrote:
> > 
> > > I am interested in adding functionality to be able to gate power supplies 
> > > going through a ltc2978.  I see that there is a hwmon driver already 
> > > existing (hwmon/pmbus/ltc2978.c).  I see some of the other hwmon drivers 
> > > have MFD's.  It looks like this ltc driver would need a MFD and a 
> > > regulator driver added.  However I don't see other pmbus hwmon drivers
> > > using MFD.
> > 
> > > So I am asking for recommendations and reservations on how to proceed here 
> > > before I get too far with this.
> > 
> > Without knowing anything at all about pmbus or this particular hardware
> > it's hard to comment but what you're saying here sounds sensible (though
> > I do see that apparently splitting the drivers may not actually be
> > sensible from Guenter's followup).
> 
> I had originally thought about converting the pmbus drivers to mfd with client
> drivers, but I concluded that it would add a lot of complexity with little gain.
> It makes sense to separate a driver into mfd and a number of client drivers
> if a device has clear functional blocks for the different devices it supports.
> With PMBus, this is not the case. Separating a PMBus driver would be a purely
> artificial costruct, and there would be overlapping functionality. Separating
> just a single driver out of the group of PMBus drivers, as seems to be suggested
> above, makes even less sense as one simply can not separate the core PMBus
> driver code from its front-end drivers.
> 
> On the other side, adding regulator support into the PMBus driver code would
> make a lot of sense. It should also be quite straightforward.
> 
> Or anyway that is my opinion. If someone wants to spend the time and separate
> the PMBus drivers into an MfD part and hwmon and regulator client drivers, I'll
> be happy to look at the resulting patch set.
> 
> Guenter
> 

Hi Guenter,

I'd really rather just add regulator support to the PMBus driver code and 
avoid all the mess of creating a MFD.  It seems more straigtforward. I'll 
let you know when I have something working to look at.

Alan

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-08-19 14:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-15 21:34 power supply gating with ltc2978 atull
2014-08-15 21:34 ` [lm-sensors] " atull
2014-08-15 21:58 ` Guenter Roeck
2014-08-15 21:58   ` [lm-sensors] " Guenter Roeck
2014-08-16 13:20 ` Mark Brown
2014-08-16 13:20   ` [lm-sensors] " Mark Brown
2014-08-18  3:07   ` Guenter Roeck
2014-08-18  3:07     ` [lm-sensors] " Guenter Roeck
2014-08-19 14:21     ` atull
2014-08-19 14:21       ` [lm-sensors] " atull

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.