[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160428171513.GR3217@sirena.org.uk>
Date: Thu, 28 Apr 2016 18:15:13 +0100
From: Mark Brown <broonie@...nel.org>
To: Lu Baolu <baolu.lu@...ux.intel.com>
Cc: felipe.balbi@...ux.intel.com,
Mathias Nyman <mathias.nyman@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Lee Jones <lee.jones@...aro.org>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
MyungJoo Ham <myungjoo.ham@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
Liam Girdwood <lgirdwood@...il.com>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 04/10] regulator: fixed: add support for ACPI interface
On Thu, Apr 28, 2016 at 01:55:35PM +0800, Lu Baolu wrote:
> How about below code?
> + gpiod = gpiod_get(dev, "vbus_en", GPIOD_ASIS);
> + if (IS_ERR(gpiod))
> + return PTR_ERR(gpiod);
> +
> + config->gpio = desc_to_gpio(gpiod);
> + config->enable_high = device_property_read_bool(dev,
> + "enable-active-high");
> + gpiod_put(gpiod);
That looks reasonable, though if you use "gpio" as the name like DT you
could keep the code the same which would be even better? Not super
crticial though.
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists