Re: [PATCH v3 2/3] regulator: add support for SY8106A regulator

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

 




于 2018年4月25日 GMT+08:00 下午6:53:09, Mark Brown <broonie@xxxxxxxxxx> 写到:
>On Wed, Apr 25, 2018 at 07:41:35AM +0800, Icenowy Zheng wrote:
>> 于 2018年4月25日 GMT+08:00 上午1:07:33, Mark Brown <broonie@xxxxxxxxxx> 写到:
>> >On Mon, Apr 23, 2018 at 10:46:56PM +0800, Icenowy Zheng wrote:
>
>> >> --- /dev/null
>> >> +++ b/drivers/regulator/sy8106a-regulator.c
>> >> @@ -0,0 +1,176 @@
>> >> +// SPDX-License-Identifier: GPL-2.0+
>> >> +/*
>> >> + * sy8106a-regulator.c - Regulator device driver for SY8106A
>
>> >Just make the entire thing a C++ comment so it looks consistent and
>> >joined up.
>
>> SPDX identifier is special -- it should be in a seperated
>> comment block.
>
>No, it just needs to be a C++ comment on the first line to ease machine
>parsing.  The rest of the file doesn't matter for that.

Okay. Thus I will use a seperate /* */ block for it in the
next revision, to follow the rule.

>
>> >> +	if (reg & SY8106A_GO_BIT)
>> >> +		return reg & rdev->desc->vsel_mask;
>> >> +	else
>> >> +		return (chip->fixed_voltage - rdev->desc->min_uV) /
>> >> +		       rdev->desc->uV_step;
>
>> >You could use the standard get_voltage_sel() if you provide a
>mapping
>> >operation that set everything with _GO_BIT set to return the fixed
>> >voltage.  Though looking at this it seems that the fixed voltage
>will
>> >always be one that could be set via the register anyway so I'm
>> >wondering
>> >if the easiest thing here isn't to just have the driver turn off
>> >_GO_BIT
>
>> Do you mean "turn on" here?
>
>Yes.

Okay. I will do it in this way and drop custom get/set_voltage_sel.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux