On Fri, Sep 09 2016, Bird, Timothy wrote: > > First - thanks for responding to the patch. I'm hopeful it will see movement. > My "pet peeve" (which *is* a bit histrionic, I suppose) is not so much about this > individual patch (though IMHO it's taken longer to get worked out than it should have). > Rather, I find it shocking that the mainline kernel is missing such a fundamental > feature that is critical to mobile devices. I brought this up at the kernel summit > last year (so it's not a new rant for me). But basically, one can not run a mainline > kernel on any phone that I'm aware of, and charge the device. I think this is mischaracterizing the problem. The problem isn't that the kernel is missing this fundamental feature. The problem is that it has multiple half-way attempts to support this functionality, but they are inconsistently implemented and bordering on incoherent. There is a usb notifier which allows other drivers, such as power managers, to be told when a cable is attached to a USB port. That is enough to get basic charger functionality working. But not all phys send a notification and those that do, don't do it in a consistent way. There is also extcon, which some phys use to report a cable, but not all. It provides more details of the cable, but cannot report anything about a current limit negotiated with a host. So you certainly can make this work with mainline (I've done it) without any extra infrastructure. If it were me doing this work, I'd clean up the current infrastructure first and make sure it was used consistently, and documented coherently. The current patchset isn't exactly adding a third way to do things, but it is adding stuff without cleaning up what is currently there. This won't make the code less messy. NeilBrown > > This means that hobbyists are locked out of experimenting with mainline on their > devices (unless they have the fortitude to manually swap batteries, or switch to > a vendor kernel when they need to charge). IMHO this is just too much of a burden. > I mean, you might expect that some functionality of the phone might be missing if > you went all-mainline, or pure open source (like proprietary camera modules, or NFC > support). You'll probably not have access to trivial things like the touch screen or > display ;-). But sheesh - to not have your device last longer than a few hours before > you have to do some kludgy work-around, if you want to use mainline on it? > That's retarded. > > IMHO this is blocking SoC mainlining efforts by non-vendor people more than any other > single issue. > > > -- Tim