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.