Re: [PATCH v2 2/2] drivers:iio:admv1013: add vcc regulators

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

 



On 27/07/2023 13:01, Antoniu Miclaus wrote:
> Add regulators for the VCC supplies of the admv1013.
> 
> The patch aims to align the implementation with the current admv1014

...

>  	const char *str;
>  	struct spi_device *spi = st->spi;
>  
> @@ -554,6 +567,17 @@ static int admv1013_properties_parse(struct admv1013_state *st)
>  		return dev_err_probe(&spi->dev, PTR_ERR(st->reg),
>  				     "failed to get the common-mode voltage\n");
>  
> +	for (i = 0; i < ADMV1013_VCC_NUM_REGULATORS; ++i)
> +		st->vcc_regs[i].supply = admv1013_reg_name[i];
> +
> +	ret = devm_regulator_bulk_get(&st->spi->dev,
> +				      ADMV1013_VCC_NUM_REGULATORS,
> +				      st->vcc_regs);
> +	if (ret) {
> +		dev_err(&spi->dev, "Failed to request VCC regulators");
> +		return ret;

This should be return dev_err_probe, unless this is not called from
probe path.

Best regards,
Krzysztof




[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