Re: [PATCH 1/3] soc_camera: Add the ability to bind regulators to soc_camedra devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 29, 2010 at 10:34:57AM +0100, Alberto Panizzo wrote:
> On dom, 2010-11-28 at 20:05 +0100, Guennadi Liakhovetski wrote:

> >  (2) would anyone really want to 
> > use several regulators for a camera sensor? If so, can it be the case, 
> > that, for example, the regulators have to be switched off in the reverse 
> > order to switching on? Or something else?

> Well, I'm working on the i.MX31 3 Stack board support and there are 2 
> regulators that powers the camera and if you consider the digital output
> that enable another supplier needed, the total regulators are three..
> So, yes a list of regulators is needed in this case, and Yes I did not 
> considered the order of enabling and disabling operations. Just because
> even the freescale drivers didn't.

> A practical general rule is to turn off switchers in the reverse order
> than the turning on one. And this can be easily implemented here.
> But as you rose the question, we can add priorities of turning on and 
> off.

If you use the regulator bulk API it'll reverse the ordering when doing
the power down (or should if it doesn't already).

> > > +static int soc_camera_power_set(struct soc_camera_device *icd,
> > > +				struct soc_camera_link *icl,
> > > +				int power_on)
> > > +{
> > > +	int ret, i;
> > > +
> > > +	for (i = 0; i < icd->num_soc_regulators; i++) {
> > > +		if (power_on) {
> > > +			ret = regulator_set_voltage(icd->soc_regulators[i],
> > > +				icl->soc_regulator_descs[i].value_on_min,
> > > +				icl->soc_regulator_descs[i].value_on_max);

Unless you're actively varying the voltages at runtime (as Guennadi
mentioned) I'd really expect the voltages to be handled by the regulator
constraints.
--
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


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux