Re: [PATCH v6 04/10] regulator: fixed: add support for ACPI interface

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

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux