From patchwork Fri Oct 5 07:58:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 148142 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp137114lji; Fri, 5 Oct 2018 00:58:28 -0700 (PDT) X-Google-Smtp-Source: ACcGV604nIn84DqPlkxnd0/3ZRW2QWbmkkbql4aDfSd5HoW/QE6ItCFIr8UNbMI1rLBkE/8dsCab X-Received: by 2002:a62:d046:: with SMTP id p67-v6mr10937601pfg.147.1538726307906; Fri, 05 Oct 2018 00:58:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538726307; cv=none; d=google.com; s=arc-20160816; b=PzsTelaHObb+o2TOt66iZQcdpRuWpoaAXTJu6u/E8xklil0kdwxmsA3fs0PtUcqSd8 QtHobFUYKuJHmoVBTLWE35GQfK0pZp+xNBNlnVFPmPLK/esHmEw/ed55eJtzpotdafSV qplf4pF7BPSGAVnp+6ubvNM5YBArtqVE+9WzCm/yCorkKa1qLV2+qfxNLx6A85qCgA97 /c4UcyeSSnDMSMjtXDNodSyWDCKBD53e9AR7UKhGZB0QkS3csUv29vOXE9TOIG2q7PVy Vg6eZZyeNAYKe/CdRJ1RCf8UO9OVnqxHPYs/5x5vsEfqv95ak5NK3xf3zIgLR0CXwQ7l JbnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=RgX69FOwvo/PEY0YGkvyNc4SHAAHkFfecfND+XtiLi8=; b=nlb6acenSWIyqblNQjYVZhAo5bm6R/6fYMe05kL6WC3SZzWd4uW3atVg3yDgxYhY1x XmtCvR37OwfVA4O2dNUIHrmpow49gCSu8d1WRZa2x0Lri8BgXE7QF8TLN/ceKX2umm/U ggZ+QECi6etnAu7h6dQWltOK7ttHAGJcIwRBgHGi4m3sLL4J6tIoScUbz+bcLtJUhZyn 8DDLA8T+2bPOW55FoH6DHayLffBtLqeJ+HpnzME9wGHrrqJsM4mHbujR8O1lUhhHqRfE OYyiz4/BffsMYhhzl6TzpJ+vSFUTSIZBCYUmF56AropExO6jGgvxQ3jTsu5wWVU5d5Gy FWgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y3-v6si7271641pgg.266.2018.10.05.00.58.27; Fri, 05 Oct 2018 00:58:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727942AbeJEOz7 (ORCPT + 6 others); Fri, 5 Oct 2018 10:55:59 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:35843 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727329AbeJEOz6 (ORCPT ); Fri, 5 Oct 2018 10:55:58 -0400 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1g8L09-0001Jw-L8; Fri, 05 Oct 2018 09:58:21 +0200 Received: from mfe by dude.hi.pengutronix.de with local (Exim 4.91) (envelope-from ) id 1g8L08-0003hj-IC; Fri, 05 Oct 2018 09:58:20 +0200 From: Marco Felsch To: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, =?utf-8?q?And?= =?utf-8?q?reas_F=C3=A4rber?= , kernel@pengutronix.de Subject: [PATCH v2 2/5] ASoC: max98088: add OF support Date: Fri, 5 Oct 2018 09:58:09 +0200 Message-Id: <20181005075812.13986-3-m.felsch@pengutronix.de> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181005075812.13986-1-m.felsch@pengutronix.de> References: <20181005075812.13986-1-m.felsch@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: devicetree@vger.kernel.org Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Andreas Färber MAX98088 is just an older version of the MAX98089 device. Both devices have the same capabilities. There is only one minor difference in JACK detection and the related power-save modi, but the MAX98089 is backward compatible to the MAX98088. Signed-off-by: Andreas Färber [m.felsch@pengutronix.de: add CONFIG_OF compile switch] [m.felsch@pengutronix.de: adapt commit message] Signed-off-by: Marco Felsch --- sound/soc/codecs/max98088.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.19.0 diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c index fb515aaa54fc..9450d5d9c492 100644 --- a/sound/soc/codecs/max98088.c +++ b/sound/soc/codecs/max98088.c @@ -1742,9 +1742,19 @@ static const struct i2c_device_id max98088_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, max98088_i2c_id); +#if defined(CONFIG_OF) +static const struct of_device_id max98088_of_match[] = { + { .compatible = "maxim,max98088" }, + { .compatible = "maxim,max98089" }, + { } +}; +MODULE_DEVICE_TABLE(of, max98088_of_match); +#endif + static struct i2c_driver max98088_i2c_driver = { .driver = { .name = "max98088", + .of_match_table = of_match_ptr(max98088_of_match), }, .probe = max98088_i2c_probe, .id_table = max98088_i2c_id,