Re: pmbus based power regulator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09. 04. 19 15:20, Guenter Roeck wrote:
> On 4/9/19 5:56 AM, Michal Simek wrote:
>> Hi,
>>
>> I have one question about hwmon/pmbus. I have tps544b25 on the board. I
>> have enabled this chip via DT to get probed. Patch below.
>>
>> I can't see any issue with monitoring but I am curious how to enable
>> setting up voltage. I expect this should be moved to regulator folder or
>> better split done as MFD device.
>>
>> I see there wm831x-hwmon and also wm8350-hwmon but nothing with pmbus
>> wiring.
>> Can you please suggest a way how this should be done?
>>
> 
> Hit the wrong button with my earlier email. Please ignore.
> 
> The pmbus core code does support for registering regulators. See
> drivers/hwmon/pmbus/ltc2978.c for an example. You would have to write a
> front-end driver for the TI chip to pass the necessary parameters to the
> pmbus core. We could try to add generic regulator support to pmbus.c, but
> I hesitate doing that because regulator support is much more critical than
> monitoring code and may require chip specific workarounds.
> 
> Sure, we could try to move the pmbus core code to mfd and try to split out
> regulator and hwmon code from it. That would require moving the core plus
> all front-end drivers. It would be a substantial effort with, as far as I
> can see, little benefit.

ok. It means use pmbus functions from pmbus_regulator_ops and add
missing would be the way to go.

const struct regulator_ops pmbus_regulator_ops = {
	.enable = pmbus_regulator_enable,
	.disable = pmbus_regulator_disable,
	.is_enabled = pmbus_regulator_is_enabled,
};

The way how it is connected on the board is that power regulator has
gpio pin for enabling/disabling and also monitoring feature.
And this is just enabling power for different chip.

Thanks,
Michal







[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux