[PATCH 1/2] dt-bindings: sound: tlv320adc3xxx: New codec driver

Ricard Wanderlof ricardw at axis.com
Mon Oct 4 17:16:04 CEST 2021


On Mon, 4 Oct 2021, Mark Brown wrote:

> On Mon, Oct 04, 2021 at 11:17:47AM +0200, Ricard Wanderlof wrote:
> 
> > +  gpios:
> > +    maxItems: 1
> > +    description: GPIO pin used for codec reset (RESET pin)
> 
> Usually this would be called reset-gpios and/or have a name to improve
> readability and allow for extensibility, from the binding we can see
> that the device has other signals that can be used as GPIOs.

In this case, 'GPIO pin' refers to the GPIO pin on the host side that is 
connected to the reset pin on the codec, not which pin on the codec that 
is used for the reset function. So I probably didn't express this 
correctly in the binding document.

My strategy was to just call the property 'gpios' and if more host control 
signals were needed, one can add a 'gpio-names' property in the future, 
but I see no other codec bindings have a 'gpio-names' so I think I'll 
simply change this to 'reset-gpios', as there are not any other pins that 
it's likely a host would have any need to control; if that happens we can 
add another 'foo-gpios' property when the time comes.

> > +  ti,pll-mode:
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    enum:
> > +      - 0 # ADC3XXX_PLL_DONT_SET - leave mode unchanged
> > +      - 1 # ADC3XXX_PLL_ENABLE - use the on-chip PLL
> > +      - 2 # ADC3XXX_PLL_BYPASS - do not use the on-chip PLL
> > +      - 3 # ADC3XXX_PLL_AUTO - use on-chip PLL if possible
> > +    default: 0
> > +    description: |
> > +      Set on-chip PLL mode.
> > +      ADC3XXX_PLL_DONT_SET is intended for use when setting the clock mod
> > +      via the clock id in a machine driver and it is not to be changed
> > +      from the previous setting.
> > +      ADC3XXX_PLL_AUTO will enable  on-chip PLL if possible, depending on the
> > +      master clock and sample rate combination.
> 
> Why is this configured through the DT binding and not via the machine
> driver as done for other drivers?

The reason is that I want to be able to use this driver with the 
simple-card machine driver which doesn't have any PLL control options 
AFAIK, as the .set_sysclk callback clk_id parameter is always set to 0 
by simple-card.

> > +      Note that there is currently no support for reading the GPIO pins as
> > +      inputs.
> 
> This doesn't belong in the binding document, it's describing the binding
> not any particular implementation.

Good point, I'll remove it.

/Ricard
-- 
Ricard Wolf Wanderlof                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30


More information about the Alsa-devel mailing list