Re: [PATCH v3 2/2] regulator: richtek,rt4801: parse GPIOs per regulator

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

 



On Mon, Apr 25, 2022 at 04:08:31PM +0800, ChiYuan Huang wrote:
> On Mon, Apr 25, 2022 at 10:01:24AM +0200, Krzysztof Kozlowski wrote:
> > On 25/04/2022 09:58, ChiYuan Huang wrote:
> > >>  
> > >> -	priv->enable_gpios = devm_gpiod_get_array_optional(&i2c->dev, "enable", GPIOD_OUT_HIGH);
> > >> -	if (IS_ERR(priv->enable_gpios)) {
> > >> -		dev_err(&i2c->dev, "Failed to get gpios\n");
> > >> -		return PTR_ERR(priv->enable_gpios);
> > >> +	for (i = 0; i < DSV_OUT_MAX; i++) {
> > >> +		priv->enable_gpios[i] = devm_gpiod_get_index_optional(&i2c->dev,
> > >> +								      "enable",
> > >> +								      i,
> > >> +								      GPIOD_OUT_HIGH);
> > >> +		if (IS_ERR(priv->enable_gpios[i])) {
> > >> +			dev_err(&i2c->dev, "Failed to get gpios\n");
> > >> +			return PTR_ERR(priv->enable_gpios[i]);
> > >> +		}
> > >>  	}
> > > You can directly removed all about 'enable-gpios' in probe phase.
> > > Just keep of_parse_cb to get per regulator 'enable' gpio. 
> > 
> > We cannot, it would break the ABI and make the change backwards
> > incompatible.
> > 
> 
> Almost forget the backward compatibility.
> 
> I'm testing it right now. After that I'll add 'Tested-by' tag.
> 
> Thanks.

Tested-by: ChiYuan Huang <cy_huang@xxxxxxxxxxx>

Best regards,
ChiYuan Huang.
> > 
> > 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