On Tue, Jan 26, 2010 at 03:16:20AM -0800, David Brownell wrote: > I'd vote to convert all the USB-to-charger interfaces so > they use notifiers. After fixing the events ... see > comments below. :) Yes please - it's not just chargers either, this can also be used by PMICs which do power path management that includes USB. > Those seem like the wrong events. The right events for a charger > would be more along the lines of: > - For peripheral: "you may use N milliAmperes now". > - General: "Don't Charge" (a.k.a. "use 0 mA"). > I don't see how "N" would be passed with those events ... These are good for the peripheral side. You do get to pass a void * along with the notifier value, that could be used to pass data like the current limit. > A host *might* want to be able to say things like "supply > up to N milliAmperes now", e.g. to let a regulator choose > the most efficient mode. Yes, they definitely want this - not just for efficiency but also to allow current limiting to protect the system from excessive current drain. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html