mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* aiodev: imx7_adc driver
@ 2023-08-23 14:53 Christian Eggers
  2023-08-23 15:05 ` Christian Eggers
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Eggers @ 2023-08-23 14:53 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

Hi Ahmad,

I am currently porting the vf610_adc driver from Linux to Barebox.
Must thing can be done similar as for the imx7_adc driver.

I have one question about the reference voltage:

static int imx7d_adc_enable(struct imx7d_adc *info)
{
...
	ret = regulator_get_voltage(info->vref);
...
}

What type of regulator do you use? I have declared a
fixed regulator in my device tree:

	reg_adc_vref_3v3: regulator-3v3-adc {
		compatible = "regulator-fixed";
		regulator-name = "vref-3v3";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
	};

	&adc2 {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_adc2>;
		vref-supply = <&reg_adc_vref_3v3>;
	...
	};

But it looks like the fixed regulator driver in Barebox
doesn't support reading the voltage (the Linux driver
reports the value from "regulator-min-microvolt")?

regards,
Christian







^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-23 16:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-23 14:53 aiodev: imx7_adc driver Christian Eggers
2023-08-23 15:05 ` Christian Eggers
2023-08-23 16:25   ` Ahmad Fatoum
2023-08-23 16:30     ` Christian Eggers
2023-08-23 16:32       ` Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox