Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4952196iob; Mon, 9 May 2022 05:37:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0SgEerKKJ+MHxdZaGC6TH888vYM/D8tT217voQVeFn7wJV6fAY5eoxRzXU4OI0KfedcLg X-Received: by 2002:a05:6638:1687:b0:32b:bd36:555d with SMTP id f7-20020a056638168700b0032bbd36555dmr7821790jat.302.1652099839628; Mon, 09 May 2022 05:37:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652099839; cv=none; d=google.com; s=arc-20160816; b=QOER04AfOQCgv1wTgBN7WPmz4KvuCj1JeYu+qkzm5i/08rUFDggdb0AX4qedem+dC+ 2b4QqL/CaDfv+CKov/R+WZmvq7HiIoUU5JTHW4NR7mybRDr+CoJvrxPhJDGYCRRQbrnx AF82UshYw3+xD6coNY5UwjYY9vrL1oX/dGAWtdFINJIxxXKO2C9POCmXkZS/lEqiHoxO uLmLl8mMISd5hMsajrIrnYmp/4O96CN4eNsH2WqugS4APAPEsLu2AfvmTqWKuurIrH2Z z1MSuaKo7A4GNoxJ0EmKWBWL/wM91uBPEN4Ttc/dokY8bDwceeM25jQCmEC0PjcBE0GS kfng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=IVzAp6mLcI5fjIjVSE0UrbrRh7utWQXvE4kL+Mmi6mg=; b=Pf+FIvVFoumg4lDt0fKEFuC3oOIFPjIGBZ7occFzeyX6BFVLBFGXWL0ZtX25aYoAhO 6aEYiXUpQztuq1TrYdwf9OAmaXpK0s8Z2XYi8HGMjfiuFeoW35Jne6XM8cdgSQaNopPR rNS/znIZYhBnmo/bS4S5CRdWsBj/YuwvnebaeVv3JY3QjXexCbKXXSaa68NRyNEn+23x HxoQ4EeJ0G5bnBR25LmgU5pa14kIdP94wkTD/tiT18KaTyfibA6P4wmOYEdoLvC0u6zP sF5vMaOX/crp+bNZMF6/orL4xyinQaUF8m2ybjj1jdvOsP4KpRnsKUD5WSFAwrOQPNzo VUbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=Sw6BYO5b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id m6-20020a056e021c2600b002cf83c856fdsi6158276ilh.118.2022.05.09.05.37.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 05:37:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=Sw6BYO5b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 74B381C6C82; Mon, 9 May 2022 05:11:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233824AbiEIMPT (ORCPT + 99 others); Mon, 9 May 2022 08:15:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233822AbiEIMPP (ORCPT ); Mon, 9 May 2022 08:15:15 -0400 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C99E14FC92 for ; Mon, 9 May 2022 05:11:21 -0700 (PDT) Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 4F1C483A79; Mon, 9 May 2022 14:11:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1652098279; bh=IVzAp6mLcI5fjIjVSE0UrbrRh7utWQXvE4kL+Mmi6mg=; h=From:To:Cc:Subject:Date:From; b=Sw6BYO5bLJuvXdSDJyowlWgLu5sQkCcAUtk27KOyW/VgZH+YDRs7sfzGEkQ6xn70/ wcyDtPEYcxZBpJqbCHw5L2RLAZDO+2T4OF9RBOzo3gC8+aulshR8BxHj82/YHLShan hp7EADvCeRp8J1oGiZ+NpGLWRJrxPrEYiL9uS7Mx0X9/eQHHcCWR/m0Ik8TSHx9NWn TIf/4ohapp35wP3VW+BQdQnGeC/JUE3D5grlvtm2kTacsJTGwykaO2RVQldiSt5Pc/ Q+reqQ7uHZ3GVFNtNBEPSyIKcOfYaiQm/c2y8evsZx8NC08aVyyuJH/b9FRqB+A/zi VfKsX0yFlp6qQ== From: Lukasz Majewski To: Liam Girdwood , Mark Brown Cc: Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, Lukasz Majewski Subject: [PATCH 1/2] ASoC: wm8940: add devicetree support Date: Mon, 9 May 2022 14:10:55 +0200 Message-Id: <20220509121055.31103-1-lukma@denx.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds devicetree support to the wm8940 codec driver. With a DT-based kernel, there is no board-specific setting to select the driver so allow it to be manually chosen. Signed-off-by: Lukasz Majewski --- sound/soc/codecs/Kconfig | 2 +- sound/soc/codecs/wm8940.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index f46a22660103..5120b15139bc 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -1811,7 +1811,7 @@ config SND_SOC_WM8904 depends on I2C config SND_SOC_WM8940 - tristate + tristate "Wolfson Microelectronics WM8940 codec" depends on I2C config SND_SOC_WM8955 diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c index 440d048ef0c0..8615a55f84dd 100644 --- a/sound/soc/codecs/wm8940.c +++ b/sound/soc/codecs/wm8940.c @@ -779,9 +779,16 @@ static const struct i2c_device_id wm8940_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, wm8940_i2c_id); +static const struct of_device_id wm8940_of_match[] = { + { .compatible = "wlf,wm8940", }, + { } +}; +MODULE_DEVICE_TABLE(of, wm8940_of_match); + static struct i2c_driver wm8940_i2c_driver = { .driver = { .name = "wm8940", + .of_match_table = wm8940_of_match, }, .probe = wm8940_i2c_probe, .id_table = wm8940_i2c_id, -- 2.35.1