lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <PAXPR04MB8459A44864B9213E8265137188DE2@PAXPR04MB8459.eurprd04.prod.outlook.com>
Date: Tue, 18 Mar 2025 12:38:15 +0000
From: Peng Fan <peng.fan@....com>
To: Andy Shevchenko <andriy.shevchenko@...el.com>, "Peng Fan (OSS)"
	<peng.fan@....nxp.com>
CC: "krzk@...nel.org" <krzk@...nel.org>, "lgirdwood@...il.com"
	<lgirdwood@...il.com>, "broonie@...nel.org" <broonie@...nel.org>,
	"linus.walleij@...aro.org" <linus.walleij@...aro.org>, "brgl@...ev.pl"
	<brgl@...ev.pl>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "linux-samsung-soc@...r.kernel.org"
	<linux-samsung-soc@...r.kernel.org>, "linux-gpio@...r.kernel.org"
	<linux-gpio@...r.kernel.org>
Subject: RE: [PATCH] regulator: s5m8767: Convert to GPIO descriptors

Hi Andy,

> Subject: Re: [PATCH] regulator: s5m8767: Convert to GPIO descriptors
> 
...

> > +	gpiod_set_value(s5m8767->buck_gpios[0], (temp_index >> 2)
> & 0x1);
> 
> Can be simply done as !!(temp_index & BIT(2)).
> 
> > +	gpiod_set_value(s5m8767->buck_gpios[1], (temp_index >> 1)
> & 0x1);
> > +	gpiod_set_value(s5m8767->buck_gpios[2], temp_index & 0x1);
> 
> Ditto.
> 
> ...
> 
> > +	gpiod_set_value(s5m8767->buck_gpios[2], temp_index & 0x1);
> > +	gpiod_set_value(s5m8767->buck_gpios[1], (temp_index >> 1)
> & 0x1);
> > +	gpiod_set_value(s5m8767->buck_gpios[0], (temp_index >> 2)
> & 0x1);
> 
> As per above.
> 
> ...
> 
> Also the commit message doesn't tell anything about the existing DTS
> files.
> Do we have this device described in any in the kernel? Do we have any
> googled examples? Why I'm asking because often the issue is the
> incorrect setting of the polarity, which needs to be carefully checked,
> esp. for the voltage regulators case.


Under arch/arm/boot/dts/samsung/, a few dtsi files have the property 
with results from output of
`grep "s5m8767" ./arch/arm/boot/dts/samsung/ -rn | grep gpios`

Exynos5250-spring.dts uses GPIO_ACTIVE_LOW.
Others use GPIO_ACTIVE_HIGH.

The current changing to using GPIO descriptors should be ok per
my understanding.

Not able to find any public datasheet for this pmic (:

> 
> ...
> 
> 
Other non-replied comments are accepted, I will address them in v2.

Thanks,
Peng.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ