Guennadi Liakhovetski <g.liakhovetski@xxxxxx> writes: >> Usual question: why do you need an init and halt? What do they do? > > Hm, maybe you're right, I don't need them. init() was used in soc_camera > drivers on first open() to possibly reset the chip and put it in some > reasonably pre-defined low-power state. But we can do this at the end of > probe(), which even would be more correct, because even the first open > should not change chip's configuration. And halt() (was called release() > originally) is called on last close(). And it seems you shouldn't really > do this at all - the chip should preserve its configuration between > open/close cycles. Am I right? > Does anyone among cc'ed authors have any objections against this change? The > actual disable should indeed migrate to some PM functions, if implemented. If I understand correctly, what was done before was that on last close, the sensor was disabled (through sensor->release() call). What will be done now is leave the sensor on. On an embedded system, the power eaten by an active sensor is usually too much compared to the other components. So, if there is a solution which enables, on last close, to power down the device (or put it in low power mode), in the new API, I'm OK, even if it's a new powersaving function. If there is no such function and there will be a gap (let's say kernel 2.6.31 to 2.6.35) where the sensor will be left activated all the time, then I'm against. Let me be even more precise about a usecase : - a user takes a picture with his smartphone - the same user then uses his phone to call his girlfriend - the girlfriend has a lot of things to say, it lasts for 1 hour In that case, the sensor _has_ to be switched off. Cheers. -- Robert -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html