Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1390408 > unrolled thread
| Started by | Mark Brown <broonie@kernel.org> |
|---|---|
| First post | 2016-04-28 19:20 +0200 |
| Last post | 2016-04-29 02:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v6 04/10] regulator: fixed: add support for ACPI interface Mark Brown <broonie@kernel.org> - 2016-04-28 19:20 +0200
Re: [PATCH v6 04/10] regulator: fixed: add support for ACPI interface Lu Baolu <baolu.lu@linux.intel.com> - 2016-04-29 02:40 +0200
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-04-28 19:20 +0200 |
| Subject | Re: [PATCH v6 04/10] regulator: fixed: add support for ACPI interface |
| Message-ID | <rsXLz-7xX-1@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
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.
[toc] | [next] | [standalone]
| From | Lu Baolu <baolu.lu@linux.intel.com> |
|---|---|
| Date | 2016-04-29 02:40 +0200 |
| Message-ID | <rt4Do-52y-9@gated-at.bofh.it> |
| In reply to | #1390408 |
Hi, On 04/29/2016 01:15 AM, Mark Brown wrote: > 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. Systems might implement the name mapping in BIOS by implementing _DSD. The "gpio" looks a little generic. I'd like to use a function specific name. I will send a refreshed patch later. Best regards, Lu Baolu
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web