Re: [PATCH 4/5] regulator: s5m8767: Use GPIO for controlling Buck9/eMMC

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

 



On Wed, 2013-12-18 at 13:47 +0000, Mark Brown wrote:
> On Tue, Dec 17, 2013 at 02:23:20PM +0100, Krzysztof Kozlowski wrote:
> 
> > +static int s5m8767_reg_gpio_is_enabled(struct regulator_dev *rdev)
> > +{
> > +	struct s5m8767_info *s5m8767 = rdev_get_drvdata(rdev);
> > +	int val;
> > +
> > +	if (!s5m8767->buck9_uses_gpio)
> > +		return s5m8767_reg_is_enabled(rdev);
> > +
> > +	val = gpio_get_value(s5m8767->buck9_gpio);
> > +
> > +	return val == 1;
> > +}
> 
> Don't open code this, use the core GPIO handling - see ena_gpio.

OK, I'll rewrite the patch.

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux