[U-Boot] [PATCH v2 1/2] power: regulator: add driver for the FAN53555 family
Simon Glass
sjg at chromium.org
Mon Nov 27 03:07:27 UTC 2017
Hi Philipp,
On 26 November 2017 at 07:10, Dr. Philipp Tomsich
<philipp.tomsich at theobroma-systems.com> wrote:
>
>> On 26 Nov 2017, at 12:38, Simon Glass <sjg at chromium.org> wrote:
>>
>> Hi Philipp,
>>
>> On 22 November 2017 at 14:13, Philipp Tomsich
>> <philipp.tomsich at theobroma-systems.com> wrote:
>>> This adds a driver for the FAN53555 family of regulators.
>>>
>>> While these devices support a 'normal' and 'suspend' mode (controlled
>>> via an external pin) to switch between two programmable voltages, this
>>> incarnation of the driver assumes that the device is always operating
>>> in 'normal' mode.
>>>
>>> Only setting/reading the programmed voltage is supported at this time
>>> and the following device functionality remains unsupported:
>>> - switching the selected voltage (via a GPIO)
>>> - disabling the voltage output via software-control
>>> This matches the functionality of the Linux driver.
>>>
>>> Tested on a RK3399-Q7 (with 'option 5' devices): setting voltages from
>>> the U-Boot shell and verifying output voltages on the board.
>>>
>>> Signed-off-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
>>> Tested-by: Klaus Goger <klaus.goger at theobroma-systems.com>
>>>
>>> ---
>>>
>>> Changes in v2:
>>> - adapted documentation on the device-tree binding from Linux
>>>
>>> doc/device-tree-bindings/regulator/fan53555.txt | 23 +++
>>> drivers/power/regulator/Kconfig | 14 ++
>>> drivers/power/regulator/Makefile | 1 +
>>> drivers/power/regulator/fan53555.c | 255 ++++++++++++++++++++++++
>>> 4 files changed, 293 insertions(+)
>>> create mode 100644 doc/device-tree-bindings/regulator/fan53555.txt
>>> create mode 100644 drivers/power/regulator/fan53555.c
[...]
>>> +static int fan53555_write(struct udevice *dev, uint reg, u8 *buff, int len)
>>
>> In this file en is only ever 1. How about using pmic_reg_write()?
>
> pmic_reg_write would require the regulator to be part of a PMIC
> device (i.e. have the pmic as a parent). This is a pure regulator
> that is not part of a PMIC.
>
> If the intent is to not have such devices, I can model this as a
> PMIC with a single regulator...
Yes I *think* all regulators should have a PMIC as a parent. A PMIC is
a type of multi-function device.
Regards,
Simon
More information about the U-Boot
mailing list