Re: [PATCH v3 6/6] gpio: tps65086: Add GPIO driver for the TPS65086 PMIC

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

 



On Tue, Nov 17, 2015 at 5:11 PM, Andrew F. Davis <afd@xxxxxx> wrote:
> On 11/17/2015 03:17 AM, Linus Walleij wrote:
>>
>> On Wed, Nov 4, 2015 at 6:12 PM, Andrew F. Davis <afd@xxxxxx> wrote:
>>
>>> Add support for the TPS65086 PMIC GPOs.
>>>
>>> TPS65086 has four configurable GPOs that can be used for several
>>> purposes.
>>>
>>> Signed-off-by: Andrew F. Davis <afd@xxxxxx>
>>
>>
>> OK...
>>
>>> +static int tps65086_gpio_get(struct gpio_chip *gc, unsigned offset)
>>> +static void tps65086_gpio_set(struct gpio_chip *gc, unsigned offset,
>>
>>
>> Just get/set and no get_direction/direction_input/direction_output?
>> Are you sure?
>>
>
> Yeah, these are output only, I could probably add get_direction and just
> always return output, but setters wouldn't make sense here.

It's important that you note in the driver, commit blurb and maybe even
Kconfig that these GPIOs are output-only. Someone could get confused.

You should implement .direction_output() and return 0, and implement
.direction_input and return negative error code. As it is now, it will
seem like input is working, while it's not, right?

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



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux