All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [lm-sensors] pmbus driver
@ 2011-06-09 13:19 Guenter Roeck
  2011-06-22  8:57 ` Vivek Bardia
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Guenter Roeck @ 2011-06-09 13:19 UTC (permalink / raw)
  To: lm-sensors

Hi Vivek,

On Thu, Jun 09, 2011 at 07:58:03AM -0400, Vivek Bardia wrote:
> Hi Guenter,
> 
> I do not know if this is the right way to ask you about PMBus driver
> implementation done by you. Do direct me to the right forum if not.
> 
The lm-sensors mailing list would be the best place to ask, but this will do.
I am copying the list.

> If a PMIC just has one temperature die sensor only, it does not support PAGE
> and PHASE commands, and is just a PMBus based buck controller; then does the
> driver written by you support such a hardware.
> 
The driver supports BMR45x, which are the same type of controller. So, yes, the driver
should work. Just give it a try. If the generic driver doesn't work, you (or I)
can write a little front-end driver to tell the PMBus core driver which registers are 
supported. Worst case the driver may need some patches, but that is unlikely.

Do you have a datasheet ?

Thanks,
Guenter

> some inputs from you can help me decide whether I need to write another driver
> or not. The pmic driver will be used by a voltage regulator driver.
> 
> Regards,
> Vivek
> 
> 

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

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

* Re: [lm-sensors] pmbus driver
  2011-06-09 13:19 [lm-sensors] pmbus driver Guenter Roeck
@ 2011-06-22  8:57 ` Vivek Bardia
  2011-06-22  9:42 ` Guenter Roeck
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Vivek Bardia @ 2011-06-22  8:57 UTC (permalink / raw)
  To: lm-sensors


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

Hi Guenter,

sorry for the delayed reply from my end.

Right now I am under the constraint where I cannot share the datasheet. But
yes, the datasheet is going be out very soon. I shall update u about the
same

Can the pmbus driver be used to set output voltage from another driver in
the kernel space itself. what I understood about the pmbus driver is that it
is meant for monitoring and controlling. at my end if the monitoring is
being done by another entity(voltage regulator) and the controlling only
needs to be done by the PMIC then how do I go about? say I just want to use
VOUT_TRIM command.

is there any sample implementation where I can see how the pmbus api's are
called ?

Regards,
Vivek



On 9 June 2011 18:49, Guenter Roeck <guenter.roeck@ericsson.com> wrote:

> Hi Vivek,
>
> On Thu, Jun 09, 2011 at 07:58:03AM -0400, Vivek Bardia wrote:
> > Hi Guenter,
> >
> > I do not know if this is the right way to ask you about PMBus driver
> > implementation done by you. Do direct me to the right forum if not.
> >
> The lm-sensors mailing list would be the best place to ask, but this will
> do.
> I am copying the list.
>
> > If a PMIC just has one temperature die sensor only, it does not support
> PAGE
> > and PHASE commands, and is just a PMBus based buck controller; then does
> the
> > driver written by you support such a hardware.
> >
> The driver supports BMR45x, which are the same type of controller. So, yes,
> the driver
> should work. Just give it a try. If the generic driver doesn't work, you
> (or I)
> can write a little front-end driver to tell the PMBus core driver which
> registers are
> supported. Worst case the driver may need some patches, but that is
> unlikely.
>
> Do you have a datasheet ?
>
> Thanks,
> Guenter
>
> > some inputs from you can help me decide whether I need to write another
> driver
> > or not. The pmic driver will be used by a voltage regulator driver.
> >
> > Regards,
> > Vivek
> >
> >
>

[-- Attachment #1.2: Type: text/html, Size: 2610 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] 5+ messages in thread

* Re: [lm-sensors] pmbus driver
  2011-06-09 13:19 [lm-sensors] pmbus driver Guenter Roeck
  2011-06-22  8:57 ` Vivek Bardia
@ 2011-06-22  9:42 ` Guenter Roeck
  2011-06-23  9:27 ` Vivek Bardia
  2011-06-23 14:24 ` Guenter Roeck
  3 siblings, 0 replies; 5+ messages in thread
From: Guenter Roeck @ 2011-06-22  9:42 UTC (permalink / raw)
  To: lm-sensors

On Wed, Jun 22, 2011 at 04:45:14AM -0400, Vivek Bardia wrote:
> Hi Guenter,
> 
> sorry for the delayed reply from my end. 
> 
> Right now I am under the constraint where I cannot share the datasheet. But
> yes, the datasheet is going be out very soon. I shall update u about the same
> 
> Can the pmbus driver be used to set output voltage from another driver in the
> kernel space itself. what I understood about the pmbus driver is that it is
> meant for monitoring and controlling. at my end if the monitoring is being done
> by another entity(voltage regulator) and the controlling only needs to be done
> by the PMIC then how do I go about? say I just want to use VOUT_TRIM command. 
> 
At least right now that is not supported. The current driver only supports hwmon
functionality, ie pure monitoring; control is not implemented. A clean implementation
for control would probably require a rewrite with a generic part (probably in mfd),
control (probably in regulator) and monitoring (in hwmon).

Note that you can not have an I2C slave chip controlled by multiple entities.
If you wrote or have a regulator driver, it has control over the chip, and hwmon access
to it will not be possible.

Not sure what your application is. If it is for mfg testing (which the VOUT_TRIM command
suggests), you might be better off just using raw I2C commands from user space (which again 
would only work while the chip is not 'claimed' by a kernel driver).

Thanks,
Guenter

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

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

* Re: [lm-sensors] pmbus driver
  2011-06-09 13:19 [lm-sensors] pmbus driver Guenter Roeck
  2011-06-22  8:57 ` Vivek Bardia
  2011-06-22  9:42 ` Guenter Roeck
@ 2011-06-23  9:27 ` Vivek Bardia
  2011-06-23 14:24 ` Guenter Roeck
  3 siblings, 0 replies; 5+ messages in thread
From: Vivek Bardia @ 2011-06-23  9:27 UTC (permalink / raw)
  To: lm-sensors

On 22 June 2011 15:12, Guenter Roeck <guenter.roeck@ericsson.com> wrote:
>
> On Wed, Jun 22, 2011 at 04:45:14AM -0400, Vivek Bardia wrote:
> > Hi Guenter,
> >
> > sorry for the delayed reply from my end.
> >
> > Right now I am under the constraint where I cannot share the datasheet. But
> > yes, the datasheet is going be out very soon. I shall update u about the same
> >
> > Can the pmbus driver be used to set output voltage from another driver in the
> > kernel space itself. what I understood about the pmbus driver is that it is
> > meant for monitoring and controlling. at my end if the monitoring is being done
> > by another entity(voltage regulator) and the controlling only needs to be done
> > by the PMIC then how do I go about? say I just want to use VOUT_TRIM command.
> >
> At least right now that is not supported. The current driver only supports hwmon
> functionality, ie pure monitoring; control is not implemented. A clean implementation
> for control would probably require a rewrite with a generic part (probably in mfd),
> control (probably in regulator) and monitoring (in hwmon).

But you do have pmbus_write_byte/pmbus_write_word_data calls. They are
only not exported right?
or is it that if these calls are made, it wont work the way it should

> Note that you can not have an I2C slave chip controlled by multiple entities.
> If you wrote or have a regulator driver, it has control over the chip, and hwmon access
> to it will not be possible.

what if I simply do not need any monitoring capabilities. I just want
to enable the device(OPERATION), read the output voltage(READ_VOUT)
and then based on an external custom sensor set the output
voltage(VOUT_TRIM), once done disable the device.

> Not sure what your application is. If it is for mfg testing (which the VOUT_TRIM command
> suggests), you might be better off just using raw I2C commands from user space (which again
> would only work while the chip is not 'claimed' by a kernel driver).

I want to use these few commands from the kernel space itself.

Regards,
Vivek

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

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

* Re: [lm-sensors] pmbus driver
  2011-06-09 13:19 [lm-sensors] pmbus driver Guenter Roeck
                   ` (2 preceding siblings ...)
  2011-06-23  9:27 ` Vivek Bardia
@ 2011-06-23 14:24 ` Guenter Roeck
  3 siblings, 0 replies; 5+ messages in thread
From: Guenter Roeck @ 2011-06-23 14:24 UTC (permalink / raw)
  To: lm-sensors

On Thu, Jun 23, 2011 at 05:15:52AM -0400, Vivek Bardia wrote:
> On 22 June 2011 15:12, Guenter Roeck <guenter.roeck@ericsson.com> wrote:
> >
> > On Wed, Jun 22, 2011 at 04:45:14AM -0400, Vivek Bardia wrote:
> > > Hi Guenter,
> > >
> > > sorry for the delayed reply from my end.
> > >
> > > Right now I am under the constraint where I cannot share the datasheet. But
> > > yes, the datasheet is going be out very soon. I shall update u about the same
> > >
> > > Can the pmbus driver be used to set output voltage from another driver in the
> > > kernel space itself. what I understood about the pmbus driver is that it is
> > > meant for monitoring and controlling. at my end if the monitoring is being done
> > > by another entity(voltage regulator) and the controlling only needs to be done
> > > by the PMIC then how do I go about? say I just want to use VOUT_TRIM command.
> > >
> > At least right now that is not supported. The current driver only supports hwmon
> > functionality, ie pure monitoring; control is not implemented. A clean implementation
> > for control would probably require a rewrite with a generic part (probably in mfd),
> > control (probably in regulator) and monitoring (in hwmon).
> 
> But you do have pmbus_write_byte/pmbus_write_word_data calls. They are
> only not exported right?
> or is it that if these calls are made, it wont work the way it should
> 
Those are of no benefit outside the driver.

> > Note that you can not have an I2C slave chip controlled by multiple entities.
> > If you wrote or have a regulator driver, it has control over the chip, and hwmon access
> > to it will not be possible.
> 
> what if I simply do not need any monitoring capabilities. I just want
> to enable the device(OPERATION), read the output voltage(READ_VOUT)
> and then based on an external custom sensor set the output
> voltage(VOUT_TRIM), once done disable the device.
> 
Not sure what value that has, since you disable the device afterwards anyway ...
guess I don't have to know ;).

You can write the registers directly using i2c function calls, i2c_smbus_write_byte()
and i2c_smbus_write_word_data(). If your chip has a page command, just set the page first.

Thanks,
Guenter

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

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

end of thread, other threads:[~2011-06-23 14:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-09 13:19 [lm-sensors] pmbus driver Guenter Roeck
2011-06-22  8:57 ` Vivek Bardia
2011-06-22  9:42 ` Guenter Roeck
2011-06-23  9:27 ` Vivek Bardia
2011-06-23 14:24 ` Guenter Roeck

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.