* 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 = <®_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
* Re: aiodev: imx7_adc driver
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
0 siblings, 1 reply; 5+ messages in thread
From: Christian Eggers @ 2023-08-23 15:05 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
Seems that I found the answer myself:
https://git.pengutronix.de/cgit/barebox/commit/?id=d353ffd5c6e6d4cee6eee72726125c965a0814f0
regards,
Christian
On Wednesday, 23 August 2023, 16:53:04 CEST, Christian Eggers wrote:
> 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 = <®_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
* Re: aiodev: imx7_adc driver
2023-08-23 15:05 ` Christian Eggers
@ 2023-08-23 16:25 ` Ahmad Fatoum
2023-08-23 16:30 ` Christian Eggers
0 siblings, 1 reply; 5+ messages in thread
From: Ahmad Fatoum @ 2023-08-23 16:25 UTC (permalink / raw)
To: Christian Eggers; +Cc: barebox
Hello Christian,
On 23.08.23 17:05, Christian Eggers wrote:
> Seems that I found the answer myself:
>
> https://git.pengutronix.de/cgit/barebox/commit/?id=d353ffd5c6e6d4cee6eee72726125c965a0814f0
(y).
Did you run into any problems at runtime?
Cheers,
Ahmad
>
> regards,
> Christian
>
> On Wednesday, 23 August 2023, 16:53:04 CEST, Christian Eggers wrote:
>> 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 = <®_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
>>
>>
>
>
>
>
> _______________________________________________________
> Christian
> Eggers
>
> Software Engineer
>
>
> ARRI
> Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
>
> Arriweg 17 ,
> 83071
> Stephanskirchen
>
> www.arri.com
>
> <http://www.arri.com/>
> +49 8036 3009-3118 <tel:+49%208036%203009-3118>
>
>
> CEggers@arri.de <mailto:CEggers@arri.de>
>
>
>
>
> CCM1 Camera Control Monitor <https://www.arri.com/en/camera-systems/cameras/ccm-1>
> Get all the latest information from www.arri.com <https://www.arri.com/>, Facebook <https://www.facebook.com/TeamARRI>, Twitter <https://twitter.com/ARRIChannel>, Instagram <https://www.instagram.com/arri/>, LinkedIn <https://www.linkedin.com/company/arri> and YouTube <https://www.youtube.com/user/ARRIChannel>.
>
> Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
> Sitz: München ‑ Registergericht: Amtsgericht München ‑ Handelsregisternummer: HRA 57918
> Persönlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
> Sitz: München ‑ Registergericht: Amtsgericht München ‑ Handelsregisternummer: HRB 54477
> Geschäftsführer: Dr. Matthias Erb (Chairman); Lars Weyer; Stephan Schenk; Walter Trauninger
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: aiodev: imx7_adc driver
2023-08-23 16:25 ` Ahmad Fatoum
@ 2023-08-23 16:30 ` Christian Eggers
2023-08-23 16:32 ` Ahmad Fatoum
0 siblings, 1 reply; 5+ messages in thread
From: Christian Eggers @ 2023-08-23 16:30 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
Hello Ahmad,
I forgot to mention that I still use barebox-2021.10. In this version,
regulator_get_voltage() returned an error code. After applying the missing
commit, I works find.
Maybe I could add the vf610_adc driver (works for i.MX6 series) to the
upstream barebox later ...
regards,
Christian
On Wednesday, 23 August 2023, 18:25:05 CEST, Ahmad Fatoum wrote:
> Hello Christian,
>
> On 23.08.23 17:05, Christian Eggers wrote:
> > Seems that I found the answer myself:
> >
> > https://git.pengutronix.de/cgit/barebox/commit/?id=d353ffd5c6e6d4cee6eee72726125c965a0814f0
>
> (y).
>
> Did you run into any problems at runtime?
>
> Cheers,
> Ahmad
>
> >
> > regards,
> > Christian
> >
> > On Wednesday, 23 August 2023, 16:53:04 CEST, Christian Eggers wrote:
> >> 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 = <®_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
> >>
> >>
> >
> >
> >
> >
> > _______________________________________________________
> > Christian
> > Eggers
> >
> > Software Engineer
> >
> >
> > ARRI
> > Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
> >
> > Arriweg 17 ,
> > 83071
> > Stephanskirchen
> >
> > www.arri.com
> >
> > <http://www.arri.com/>
> > +49 8036 3009-3118 <tel:+49%208036%203009-3118>
> >
> >
> > CEggers@arri.de <mailto:CEggers@arri.de>
> >
> >
> >
> >
> > CCM1 Camera Control Monitor <https://www.arri.com/en/camera-systems/cameras/ccm-1>
> > Get all the latest information from www.arri.com <https://www.arri.com/>, Facebook <https://www.facebook.com/TeamARRI>, Twitter <https://twitter.com/ARRIChannel>, Instagram <https://www.instagram.com/arri/>, LinkedIn <https://www.linkedin.com/company/arri> and YouTube <https://www.youtube.com/user/ARRIChannel>.
> >
> > Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
> > Sitz: München ‑ Registergericht: Amtsgericht München ‑ Handelsregisternummer: HRA 57918
> > Persönlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
> > Sitz: München ‑ Registergericht: Amtsgericht München ‑ Handelsregisternummer: HRB 54477
> > Geschäftsführer: Dr. Matthias Erb (Chairman); Lars Weyer; Stephan Schenk; Walter Trauninger
> >
> >
> >
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: aiodev: imx7_adc driver
2023-08-23 16:30 ` Christian Eggers
@ 2023-08-23 16:32 ` Ahmad Fatoum
0 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2023-08-23 16:32 UTC (permalink / raw)
To: Christian Eggers; +Cc: barebox
Hello Christian,
On 23.08.23 18:30, Christian Eggers wrote:
> Hello Ahmad,
>
> I forgot to mention that I still use barebox-2021.10. In this version,
> regulator_get_voltage() returned an error code. After applying the missing
> commit, I works find.
I see. I need not tell you though that latest is greatest and all that ;)
>
> Maybe I could add the vf610_adc driver (works for i.MX6 series) to the
> upstream barebox later ...
Yes, might be useful for those with 6ul/6sx.
Cheers,
Ahmad
>
> regards,
> Christian
>
> On Wednesday, 23 August 2023, 18:25:05 CEST, Ahmad Fatoum wrote:
>> Hello Christian,
>>
>>
> _______________________________________________________
> Christian
> Eggers
>
> Software Engineer
>
>
> ARRI
> Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
>
> Arriweg 17 ,
> 83071
> Stephanskirchen
>
> www.arri.com
>
> <http://www.arri.com/>
> +49 8036 3009-3118 <tel:+49%208036%203009-3118>
>
>
> CEggers@arri.de <mailto:CEggers@arri.de>
>
>
>
>
> CCM1 Camera Control Monitor <https://www.arri.com/en/camera-systems/cameras/ccm-1>
> Get all the latest information from www.arri.com <https://www.arri.com/>, Facebook <https://www.facebook.com/TeamARRI>, Twitter <https://twitter.com/ARRIChannel>, Instagram <https://www.instagram.com/arri/>, LinkedIn <https://www.linkedin.com/company/arri> and YouTube <https://www.youtube.com/user/ARRIChannel>.
>
> Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
> Sitz: München ‑ Registergericht: Amtsgericht München ‑ Handelsregisternummer: HRA 57918
> Persönlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
> Sitz: München ‑ Registergericht: Amtsgericht München ‑ Handelsregisternummer: HRB 54477
> Geschäftsführer: Dr. Matthias Erb (Chairman); Lars Weyer; Stephan Schenk; Walter Trauninger
>
>
>
> On 23.08.23 17:05, Christian Eggers wrote:
>> > Seems that I found the answer myself:
>> >
>> > https://git.pengutronix.de/cgit/barebox/commit/?id=d353ffd5c6e6d4cee6eee72726125c965a0814f0
>>
>> (y).
>>
>> Did you run into any problems at runtime?
>>
>> Cheers,
>> Ahmad
>>
>> >
>> > regards,
>> > Christian
>> >
>> > On Wednesday, 23 August 2023, 16:53:04 CEST, Christian Eggers wrote:
>> >> 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 = <®_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
>> >>
>> >>
>> >
>> >
>> >
>> >
>> > _______________________________________________________
>> > Christian
>> > Eggers
>> >
>> > Software Engineer
>> >
>> >
>> > ARRI
>> > Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
>> >
>> > Arriweg 17 ,
>> > 83071
>> > Stephanskirchen
>> >
>> > www.arri.com
>> >
>> > <http://www.arri.com/>
>> > +49 8036 3009-3118 <tel:+49%208036%203009-3118>
>> >
>> >
>> > CEggers@arri.de <mailto:CEggers@arri.de>
>> >
>> >
>> >
>> >
>> > CCM1 Camera Control Monitor <https://www.arri.com/en/camera-systems/cameras/ccm-1>
>> > Get all the latest information from www.arri.com <https://www.arri.com/>, Facebook <https://www.facebook.com/TeamARRI>, Twitter <https://twitter.com/ARRIChannel>, Instagram <https://www.instagram.com/arri/>, LinkedIn <https://www.linkedin.com/company/arri> and YouTube <https://www.youtube.com/user/ARRIChannel>.
>> >
>> > Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
>> > Sitz: München ‑ Registergericht: Amtsgericht München ‑ Handelsregisternummer: HRA 57918
>> > Persönlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
>> > Sitz: München ‑ Registergericht: Amtsgericht München ‑ Handelsregisternummer: HRB 54477
>> > Geschäftsführer: Dr. Matthias Erb (Chairman); Lars Weyer; Stephan Schenk; Walter Trauninger
>> >
>> >
>> >
>>
>>
>
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ 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