Re: [PATCH V4] iio: adc: Add Renesas GyroADC driver

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

 



Hi Marek,

On Wed, Jan 11, 2017 at 3:32 PM, Marek Vasut <marek.vasut@xxxxxxxxx> wrote:
> On 01/11/2017 02:11 PM, Geert Uytterhoeven wrote:
>> On Wed, Jan 11, 2017 at 1:35 PM, Marek Vasut <marek.vasut@xxxxxxxxx> wrote:
>>>>> +Required properties for subnodes:
>>>>> +- compatible:  Should be either of:
>>>>> +               "fujitsu,mb88101a"
>>>>> +                       - Fujitsu MB88101A compatible mode,
>>>>> +                         12bit sampling, 4 channels
>>>>
>>>> For this one, we have to find a better representation in DT.
>>>> Unlike the other two types, the MB88101A is a 4-channel ADC, and thus only
>>>> a single instance is supported, providing 4 channels.
>>>> Hence for MB88101A I suggest to just have a single node "adc", without a
>>>> unit address or "reg" property.
>>>
>>> Hmmmmmm, this doesn't look quite right and it does make the binding
>>> complicated and the MB88101A into quite the special snow flake. Also,
>>> what if you have the MB88101A channels 0 and 1 connected only to ie.
>>> gyroadc channels 2 and 3?
>>
>> The gyroadc does not have multiple channel inputs, only a single input
>> pin for serialized data. Supporting multiple channels is done using a
>> 3-bit channel select (CHS) output signal.
>
> Yep, it's kinda doing SPI behind the scenes.
>
>> In mode 1, the 2 lsb CHS lines are to be connected to the C[01] channel
>> select pins on the MB88101A.
>> In other modes, I think you need an external multiplexer to select one of the
>> 8 connected ADCs.
>
> Yes.
>
>> So while you cannot have non-standard channel wirings in mode 1,
>> you can have a partial (or none at all) multiplexer and less than 8 ADCs,
>> duplicating data to multiple channels.
>
> Right
>
>>> What about something like:
>>>
>>> adc2: adc@2 {
>>>  reg = <0>;
>>>  compatible = "fujitsu,mb88101a";
>>>  vref-supply = <&vref_fujitsu_mb88101a>;
>>> };
>>>
>>> adc3: adc@3 {
>>>  reg = <3>;
>>>  renesas,adc-master = <&adc2>;
>>> };
>>
>> Hmm, that can be used to describe duplicated channels, too ;-)
>
> So we go with this ? I'm not completely sure about the new
> "renesas,adc-master" property, are we OK with it ?

I would still use just a single "adc" node for MB88101A, and multiple adc@n
nodes (one for each physically present ADC) in other modes.

If someone really needs access to the higher scanning rate possible
with duplicated channels, it can always be added later.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux