On Mon, 2017-10-30 at 15:49 -0500, Timur Tabi wrote: > This reverts commit 72d3200061776264941be1b5a9bb8e926b3b30a5. > > We cannot blindly query the direction of all GPIOs when the pins are > first registered. The get_direction callback normally triggers a > read/write to hardware, but we shouldn't be touching the hardware for > an individual GPIO until after it's been properly requested. > > + /* REVISIT: most hardware initializes GPIOs as inputs > (often > + * with pullups enabled) so power usage is minimized. > Linux > + * code should set the gpio direction first thing; > but until > + * it does, and in case chip->get_direction is not > set, we may > + * expose the wrong direction in sysfs. > + */ Can you preserve the style and indentation of the commit? Does checkpatch warn you about style? (It's apparently not a net subsystem) > + desc->flags = !chip->direction_input ? (1 << > FLAG_IS_OUT) : 0; > } > > #ifdef CONFIG_PINCTRL -- Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Intel Finland Oy -- 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