On Tuesday 28 March 2017 06:38 PM, Linus Walleij wrote:
On Tue, Mar 28, 2017 at 11:03 AM, Laxman Dewangan <ldewangan@xxxxxxxxxx> wrote: I think it should be if (of_flags & OF_GPIO_SINGLE_ENDED) { if (of_flags & OF_GPIO_ACTIVE_LOW) *flags |= GPIO_OPEN_SOURCE; else *flags |= GPIO_OPEN_DRAIN; } Similar change is needed in the dtbinding gpio header also to invert the ACTIVE state with open drain/source. OK I think there are no real users of this feature yet, so it would be great if you could send a patch, especially if you also have hardware so you can test it.
Thinking more, active low/high for line is independent of the open drain/source behavior. Per my understanding, Active low/high depends on the how external device provides signal or glue logic designed. Open drain/source is kind of setting pin state between GND or VDD or high impedance.
Let me send patch on decoupling the active HIGH/LOW with open drain/source and discuss more in the patch.
Thanks, Laxman ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ----------------------------------------------------------------------------------- -- 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