On Dec 5, 2010, at 6:15 AM, Ohad Ben-Cohen wrote: > On Sat, Dec 4, 2010 at 6:22 PM, Daniel Drake <dsd@xxxxxxxxxx> wrote: >> In this case we are not changing current or voltage, we are just >> asserting a specific signal to the card. So its messy from the start >> (I'd have to invent a list of supported voltages or something). > > This is exactly what we do today with the 12xx - we just need to > assert a digital signal, which by no means power the device (the > voltage value we provide isn't really fed from the gpio signal). > > Your case might be slightly different, but still I think it's worth > looking into this approach first. > >> Another option would be just to hack this into the kernel. Inside >> mmc_power_up we'd add something like the following: >> >> #ifdef CONFIG_OLPC >> if (machine_is_olpc()) >> olpc_reset_gpio_fixup(host); >> #endif > > Please don't. > > Core code should not contain such machine-specific details (imagine > how it would look when other boards will start adding this 8686 > tweak...). > >> Another cleaner option (but perhaps OTT for just 1 user?) would be to >> add a notifier chain that is called at this point. > > That would obviously work but as you and Nicolas mentioned it's an > overkill: we don't really need random users to plug into this hook, > and using notifiers will just make the code less readable and harder > to debug, so it's better to try to find a solution that fits. > -- > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html Would a solution toggling the gpio line for power/reset work when doing a RESET_ALL or when power moves to off ? This code could then be in the driver specific section where this might make more sense. -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html