From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946605AbcBROhp (ORCPT ); Thu, 18 Feb 2016 09:37:45 -0500 Received: from mail.kernel.org ([198.145.29.136]:53662 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946586AbcBROhl (ORCPT ); Thu, 18 Feb 2016 09:37:41 -0500 Date: Thu, 18 Feb 2016 08:37:35 -0600 From: Rob Herring To: Andreas =?iso-8859-1?Q?Irest=E5l?= Cc: Lars-Peter Clausen , Liam Girdwood , Mark Brown , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Andreas =?iso-8859-1?Q?Irest=E5l?= Subject: Re: [PATCH v2 5/5] ASoC: adau17x1: Support platform data via DT Message-ID: <20160218143735.GS9654@rob-hp-laptop> References: <1455627405-18155-1-git-send-email-andire@axis.com> <1455627405-18155-6-git-send-email-andire@axis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1455627405-18155-6-git-send-email-andire@axis.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 16, 2016 at 01:56:45PM +0100, Andreas Irestål wrote: > Currently, it is only possible to configure HW-specific options to the > adau17x1 codecs by providing a platform data struct. With this patch, > it is possible to provide the same data via DT instead. The subject is a red flag. Platform data and DT properties are not necessarily equivalent. This should be part of the previous patch. > > Signed-off-by: Andreas Irestål > --- > .../devicetree/bindings/sound/adi,adau17x1.txt | 31 +++++ > include/dt-bindings/sound/adau17x1.h | 14 +++ > sound/soc/codecs/adau1761.c | 127 +++++++++++++++++++++ > sound/soc/codecs/adau1781.c | 48 ++++++++ > 4 files changed, 220 insertions(+) > create mode 100644 include/dt-bindings/sound/adau17x1.h > > diff --git a/Documentation/devicetree/bindings/sound/adi,adau17x1.txt b/Documentation/devicetree/bindings/sound/adi,adau17x1.txt > index 8dbce0e..6050602 100644 > --- a/Documentation/devicetree/bindings/sound/adi,adau17x1.txt > +++ b/Documentation/devicetree/bindings/sound/adi,adau17x1.txt > @@ -13,6 +13,32 @@ Required properties: > - reg: The i2c address. Value depends on the state of ADDR0 > and ADDR1, as wired in hardware. > > +Optional properties: > + > + - adi,input-differential bool to set if the input is differential > + - adi,digital-microphone bool to set if there is a digital microphone > + connected to digmic/jackdet pin. > + - adi,micbias-vg Microphone bias voltage In what units? Add units suffix. Also, this seems like something that should be common. > + MICBIAS_0_90_AVDD - 0.9 * AVDD > + MICBIAS_0_65_AVDD - 0.65 * AVDD What does this mean? > + > +Optional properties (ADAU1361/ADAU1461/ADAU1761/ADAU1961 only) > + > + - adi,jack-detection If present, configures codec to use the digmic/jackdet > + pin for jack detection. must provide one of > + JACKDETECT_ACTIVE_LO or JACKDETECT_ACTIVE_HI followed > + by debounce time in ms, which must be 5, 10, 20, or 40. Seems like this could be common. No existing examples to copy? > + > + - adi,lineout-mode Set output mode of the lineout pins. > + - adi,headphone-mode Set output mode of the headphone pins. > + > +The output mode must be one of: > + OUTPUT_MODE_HEADPHONE - Headphone output > + OUTPUT_MODE_HEADPHONE_CAPLESS - Capless headphone output > + OUTPUT_MODE_LINE - Line output