Re: [PATCH 3/4] regulator: qcom: Refactor of-parsing code

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

 




On Mon, Mar 02, 2015 at 08:25:39PM -0800, Bjorn Andersson wrote:

> +	if ((vreg->parts->uV.mask || vreg->parts->mV.mask) &&
> +	    (!initdata->constraints.min_uV || !initdata->constraints.max_uV)) {
> +		dev_err(&pdev->dev, "no voltage specified for regulator\n");
> +		return -EINVAL;
> +	}

OK, so it looks like we're using it because we can't read the initial
hardware state - can we introduce a specific interface for that perhaps?
A call to query the current constraints might do it.  Or possibly just
change your earlier patch to make sure the constraints are marked const
would do it, reading them isn't the problem that modifying them is.  I
might've missed some other usage somewhere though.

Attachment: signature.asc
Description: Digital signature


[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