RE: [PATCH v3 3/6] regulator: core: Add helper for allow access to enable register

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

 



Hi Mark Brown,

Thanks for the feedback.

> -----Original Message-----
> From: Mark Brown <broonie@xxxxxxxxxx>
> Sent: Friday, June 14, 2024 3:32 PM
> Subject: Re: [PATCH v3 3/6] regulator: core: Add helper for allow access to enable register
> 
> On Fri, Jun 14, 2024 at 11:43:39AM +0000, Biju Das wrote:
> 
> > To access the hardware register for enabling/disabling the regulator,
> > consumers must use regulator_get_exclusive(), as it can't work if
> > there's more than one consumer. To enable/disable regulator use::
> 
> >        int regulator_hardware_enable(struct regulator *regulator, bool
> > enable);
> 
> We should also enforce this.

OK, will enforce and return error

	int ret = -EOPNOTSUPP;

	if (!ops || !ops->enable || !ops->disable || !regulator->exclusive)
		return ret;

Cheers,
Biju






[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux