On Tue, 2011-05-10 at 15:57 +0530, Janorkar, Mayuresh wrote: > > It is better to request and initialize the GPIOs in the board file. The > > reason for this is that the PicoDLP device should be off if it's not > > used, or if the driver is not even compiled in. So the board file should > > make sure that the GPIOs are in such state that the device is off. > > The board file has only init. There is no exit. > So if I request gpios in init once, I could not find a place to free them. If the GPIOs are not shared, and they go only to picodlp, there's not really any need to free them. They are not a shared resource, and they can be kept reserved for picodlp all the time. > Is it a good idea to request gpios in platform_enable and free them in platform_disable? No, that wouldn't fix the problem. For example, consider a case where the kernel is compiled without picodlp driver. So platform_enable/disable is never called, and the GPIOs are never requested or initialized. This means that depending on the values of the GPIOs, the picodlp could be always on, consuming power. So my suggestion is to request all the GPIOs in the board file, in display init, and initialize the GPIOs to some sane value so that the picodlp is off. Then pass the two GPIOs to the picodlp driver, which can then use the GPIOs, and handle the two other GPIOs in the board file in platform_enable/disable. Tomi -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html