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]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux