From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753381AbcD1RPZ (ORCPT ); Thu, 28 Apr 2016 13:15:25 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:55642 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752286AbcD1RPX (ORCPT ); Thu, 28 Apr 2016 13:15:23 -0400 Date: Thu, 28 Apr 2016 18:15:13 +0100 From: Mark Brown To: Lu Baolu Cc: felipe.balbi@linux.intel.com, Mathias Nyman , Greg Kroah-Hartman , Lee Jones , Heikki Krogerus , MyungJoo Ham , Chanwoo Choi , Liam Girdwood , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <20160428171513.GR3217@sirena.org.uk> References: <1461571496-9600-1-git-send-email-baolu.lu@linux.intel.com> <1461571496-9600-5-git-send-email-baolu.lu@linux.intel.com> <20160425173024.GO3217@sirena.org.uk> <571ED178.4090700@linux.intel.com> <20160426102314.GS3217@sirena.org.uk> <57201BC2.5040409@linux.intel.com> <20160427123349.GL3217@sirena.org.uk> <5721A5D7.4070607@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wLa476zhX2De+KXO" Content-Disposition: inline In-Reply-To: <5721A5D7.4070607@linux.intel.com> X-Cookie: Tomorrow, you can be anywhere. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH v6 04/10] regulator: fixed: add support for ACPI interface X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --wLa476zhX2De+KXO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --wLa476zhX2De+KXO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXIkUgAAoJECTWi3JdVIfQyPgH/0XoLOA9zhquYDogHrYx9NOc ljpu1wSYmTCHfOWN/yJsAoMJpiZPloVH/vRA++OOcQPsT/hpr/t5X9N4woX9Hha1 UvKAqhco7vE/l6vlR5eLHeu0LpnLbLyLZ2tTgFeaZXKlsPFKPKjcJL6pity05uHh z4cDOGGi2tXaFjE4EHjjb7ZTHrGZdhrzb/dZr/K0ulLsAB0d+SKp/tPGMnrSuhou OJUqFVrB9YfUGxf88/spKF4EdHi+ph0DE4IlHyqx9SCZb4m6xwKiIYST9JVCXhI8 v7sulGfxJjbYCHBLkobl8k0Z4HM4yAPRn/k0DzWXs466Ey4TXYnWOZxDSRBcEgM= =JD6K -----END PGP SIGNATURE----- --wLa476zhX2De+KXO--