From patchwork Thu Sep 17 17:14:39 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 4845 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2B07A3F080 for ; Thu, 17 Sep 2026 19:14:51 +0200 (CEST) Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-4870ee5618asf666085f8f.1 for ; Thu, 17 Sep 2026 10:14:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1789665291; cv=pass; d=google.com; s=arc-20260327; b=B3jp/ywKxHXwT58zbBlRnXM55CsCveBvHm8YIBAEMwn4AzKSWrC0lT/v3vliOh2K5z WIKnUzUrXXbFxrextrJ6gM2ZPVEZIGQS/ESm9+SUpEYux2TWxle3/iRRDUBCPAerm3Y8 gzxu8s+UXL7ROK7BRIU01Wwh9pQ7Gf1Yah3zDoa3IJ+JFrAhSuXt1Zu7tK5jVKQGXmcn yLFeNcizetDMu+8zz8RmSD2myKH9hdFvwcFLvzXxkZk5STaJFDDk7F7agjAjuyfH742X woLdw5G2H3mEPuGzL/JmLKd32UJ0ZOvLI83tJM20Z2ACCNJayPatVBDlblTluTOsxgiJ WBLA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=IETuQGQKl53A9vctPyvZu1kMqI5ACektCBRp3MwsgCw=; fh=6qFctEBQxaquunTFZMzhqBrivMxWEddHdqO6GZt3bZA=; b=KCBd/VXFOa/ewNOnPwCnrsmODv0RGCvUYcfs87puyVCMEgi3fqwKwvTtv+FcaNWyeJ DDUHwm6TN/QofH3MPEgYJbqLRuuOiMmv/ALXoEehDf2xG2FpHxQWRsyVwqH+R8EIENCj b4SDtU1NLtP4oqiCNC3cxkRrS3LqbNrXkLFP24Wqynf+HyLxfkQmD+2dwyaZpgWzKeTa cebhMwG2HGCwe/sf63SQs1dIml7LXVQLyZDszy8wcP3CJQjrHOzNcNUtINlW9bZ5z6u/ FibSRKSB8AJTOBwUVK4DCg9+iuBZ8NR0TdlECv7zEzmxKeqn7O8P4VhpdtVflImKoHPw DN4Q==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=VxQUyISe; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1789665291; x=1790270091; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-type :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to:content-type; bh=IETuQGQKl53A9vctPyvZu1kMqI5ACektCBRp3MwsgCw=; b=jIebZsGG6lrLq7fqdZYz/siqo812KQxGmS5x9RPPm3zqRDMj8RRU8+3kiDIcvpD3lw uGZlTHMK/Omr4w/xyn1wMZWfThlZZ/9SktO4MCGsYZ3z+r2oLkYw10TktKz57CLZACpw 08yt/CCQdIP6VEkR5Nw639JIfozLmN4zEduKE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789665291; x=1790270091; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :content-type:x-original-authentication-results:x-original-sender :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-gg:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=IETuQGQKl53A9vctPyvZu1kMqI5ACektCBRp3MwsgCw=; b=jfyBpI+Ty0o8iOGlZxyfOf/3CwQXCNU5k3MJM0Tcvkksg206htBH3ikQHMYDcXO9/h IMRPj7lKMEa8f32/ZqlLND7oA74Y/0NhNfvw4DrallCMLXGVtKEBVeivLcaCoZW+1HI7 icZMJmCYfH+twjPL8llnzM9AX2obeZYx5z8odHFe0y3h4mvlyaC4sIpGf4pEH4BA46aP Az2v6aBX376prcR9FrzDsDqtGqa+MlCL0Ib7f4B2dIH4/nWhcs4jongCapDONamnlREd IsPojw3rRW8Fla4+eC+DBPb1fs6o1aMgJAUHB4o++i6rxMlXBZm/B+URnkcdKJUE0xmi ojig== X-Forwarded-Encrypted: i=2; AKwUvBwYLyAoCIHlWU/XEogxE53Bw10zrrjRr2TV4NzA27JPzTh6CbswLk+t6TDZ5P3pfmHbWIX7Nn5XCZ28cpfH@patchwork.amarulasolutions.com X-Gm-Message-State: AFuF++lCRC8ZeJmINBfnSQasZ2dFbn4HRs3pqD6pi45f1hBNisbVkFJG 3nFHBHW0xptUQq4Mt8UTzLO8+Xz8hZ/f1+09b/QjTBOeQM5cd31sZLjsuk15g8RNPVqeXEz3BIC oiA== X-Received: by 2002:a05:6000:719:b0:487:13f1:47ec with SMTP id ffacd0b85a97d-48713f1482bmr11292557f8f.21.1789665290827; Thu, 17 Sep 2026 10:14:50 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h="ATskLdeHIxUZVqxvKgengDOOwsU/kf73M9+ec4NxazzNv2Jylw==" Received: by 2002:a05:6000:614:b0:486:fb9c:1f5c with SMTP id ffacd0b85a97d-48713c70816ls751458f8f.0.-pod-prod-01-eu; Thu, 17 Sep 2026 10:14:49 -0700 (PDT) X-Received: by 2002:a05:6000:2408:b0:486:f301:11df with SMTP id ffacd0b85a97d-4870cee0b72mr20107323f8f.6.1789665289011; Thu, 17 Sep 2026 10:14:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1789665289; cv=none; d=google.com; s=arc-20260327; b=HnYUNHzIlbGPWSR+vSYcdKeg+GtU6FHkTREtCHRN3aNzrGQN+TzDgWtDTBmINnHHnT VWcKFj9zwqrwmrp1WkkaGw7K1OD1RGyb2Eb/U7+ikzgQmW4oJTrs1rdlnYsLihru6DeV NeMnOOyXUxRbPCdPYkMlqY8EBhonjcveBu9tgbuX4YTV+BIzakQH/kMfwFb8vCcFtlR2 LjZDyeHmxcQUdisOZddbLXtHyfznEhX40cdRNwtG35WlxozdKi+SCil942Au/OWh7e6D DMrQUx8UZw9ObYX0ntM0HDfPIuLg0NUlFUN0/+2jJBqOYxCTDSRAeYEwaa7XLfGbCOMs Vx3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=hlW/0bDtnICuIL7M3/iCVaXAZK1wAJjrd3TnpjLwR+A=; fh=MbwyPnBGeeuaCnBVzwLFVgpeX9tmPxCG7y/nwy0/5KI=; b=ARlGZRW1lyZVD8BL++jInA8gHgd7B70ETxx/9rOu+iUGWZwaHBAy77xkw9nEWicVe2 oRqAGC+SZecPtUbQM9FhApCx24mRTUeEU9OxKTu8qjjwj7E8rpb/dCN2HehejhNx2IKC h7KgWhnuKF5KCT1z9ENUmN39LC1AVGGEWooIGf7epk7bbEBAd6KL4SyEZFuEiOaFVDK2 lUe8CBixBvjmGY491dgZdVngdHlAlxG4RLqvnBz4dJPu024Hs3KSe+K3LMod0K9fVhqP yANfhELRcoYe14bxWtlQ2UdChBN4C2Pj9VdNuY9+cdLgCdZSRF4D+E7GH3bVIKMoBhQI xqGg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=VxQUyISe; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ffacd0b85a97d-4870bf0e083sor947096f8f.13.2026.09.17.10.14.48 for (Google Transport Security); Thu, 17 Sep 2026 10:14:48 -0700 (PDT) Received-SPF: pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Gm-Gg: AYBFou0j68cIiaqGeYGRD2SOY9LIIlUzEnW6oQAtU8EuKPAvfFHdbLDD23eESfAqHth EL67sPnaqnlXOtABfzciobhwVvZhgp8LAfCiBO3R5TaslJFdNuamZ0MZoimdMHdyt7qd9qeRdS1 ynhgItz2MLZH9SCvFA+4Zi62xkbhMbdSyYRn/0C6A4/S91cHFhYLTGmNYrKmS3SU0wGky5SUcK3 G0SnrKggarndRX2Iu77L5zBsj11viO3uWWD0+68vNgtzwlCrgvgBM/ZITfNBQSrwWm3kLcGq4+A pOpTmSThuU+/YEC8SgjCWrm8kiqQHQotxw2U77GPYqt5Ooy1qjRuPsXtiGnpJUjDM+gb1a0AFlS e05AK0tQbW0FvCIqukHv0wSqz+FjSjZ0kI39f1LRNdOx2ujWwq5FTo093gWAQJ1ecCSzV/mjHgx iQpS+T/upDx2YtL3QLZ04Q5l1nTJjo9qSSzaWfhejuNvGCz7uxJ1acy/+qbrLF7ve4H1BgooFJD +ajBmm7IYonO3KWZJ/x9XBOlnaF9NumSVTc7dDzIIOduVk6S+IbkuitDBSUe3/s/sbZBlIVYt/p MsMzp06nqgc7nUbbbUgnaaoZ/JoOqGRr8MpA X-Received: by 2002:a05:600c:34c3:b0:49e:65ac:eb5f with SMTP id 5b1f17b1804b1-49eb7328a3fmr213895255e9.10.1789665288516; Thu, 17 Sep 2026 10:14:48 -0700 (PDT) Received: from panicking.amarulasolutions.com (mob-83-225-139-33.net.vodafone.it. [83.225.139.33]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49fbd23a815sm99165125e9.14.2026.09.17.10.14.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2026 10:14:47 -0700 (PDT) From: Michael Trimarchi To: Dario Binacchi , Annachiara Gallo , Francesco Nicoletta Puzzillo Cc: linux-amarula@amarulasolutions.com, Michael Trimarchi Subject: [PATCH 2/2] ASoC: pcm179x: Add support for pcm1795 and pcm1796 Date: Thu, 17 Sep 2026 19:14:39 +0200 Message-ID: <20260917171439.3822603-3-michael@amarulasolutions.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260917171439.3822603-1-michael@amarulasolutions.com> References: <20260917171439.3822603-1-michael@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: michael@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=VxQUyISe; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The PCM1795 is register compatible with the PCM1792A, but it encodes two of the register 18 FMT[2:0] values differently: code 001 selects 32-bit standard data instead of 20-bit, and code 100 selects 32-bit I2S instead of 16-bit I2S. It has no 20-bit format at all. The PCM1796 shares the PCM1792A encoding. Describe the encoding with a per-codec table mapping the DAI format and the sample width to the FMT[2:0] value, and select it with the codec model resolved in pcm179x_common_init(). The PCM1792A and the PCM1796 have no 32-bit format, so a 32-bit container keeps the 24-bit code and is clocked out as 24-bit data, as this driver has always done; only the PCM1795 has real 32-bit formats. The formats offered to userspace follow the same split: the DAI advertises the union and pcm179x_startup() narrows it to the model's set, so 16-bit is never offered on a PCM1795 and 32-bit never on a PCM1792A. Left-justified was accepted by set_fmt() but never programmed; it is now mapped to FMT[2:0] = 011, the only left-justified format both models implement. The model is read with device_get_match_data(), so each bus driver carries the model in its own of_device_id table. The tables cannot move to the common file: MODULE_DEVICE_TABLE() aliases a table that has to be defined in the same translation unit. Signed-off-by: Michael Trimarchi --- sound/soc/codecs/pcm179x-i2c.c | 2 + sound/soc/codecs/pcm179x-spi.c | 2 + sound/soc/codecs/pcm179x.c | 116 ++++++++++++++++++++++++++++++----------- sound/soc/codecs/pcm179x.h | 11 ++++ 4 files changed, 100 insertions(+), 31 deletions(-) To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com. diff --git a/sound/soc/codecs/pcm179x-i2c.c b/sound/soc/codecs/pcm179x-i2c.c index effc1dd6df22..cce2b7510d37 100644 --- a/sound/soc/codecs/pcm179x-i2c.c +++ b/sound/soc/codecs/pcm179x-i2c.c @@ -32,6 +32,8 @@ static int pcm179x_i2c_probe(struct i2c_client *client) #ifdef CONFIG_OF static const struct of_device_id pcm179x_of_match[] = { { .compatible = "ti,pcm1792a", }, + { .compatible = "ti,pcm1795", .data = (void *)PCM1795, }, + { .compatible = "ti,pcm1796", .data = (void *)PCM1796, }, { } }; MODULE_DEVICE_TABLE(of, pcm179x_of_match); diff --git a/sound/soc/codecs/pcm179x-spi.c b/sound/soc/codecs/pcm179x-spi.c index 192fee90c971..2b487a4d7c82 100644 --- a/sound/soc/codecs/pcm179x-spi.c +++ b/sound/soc/codecs/pcm179x-spi.c @@ -31,6 +31,8 @@ static int pcm179x_spi_probe(struct spi_device *spi) static const struct of_device_id pcm179x_of_match[] __maybe_unused = { { .compatible = "ti,pcm1792a", }, + { .compatible = "ti,pcm1795", .data = (void *)PCM1795, }, + { .compatible = "ti,pcm1796", .data = (void *)PCM1796, }, { } }; MODULE_DEVICE_TABLE(of, pcm179x_of_match); diff --git a/sound/soc/codecs/pcm179x.c b/sound/soc/codecs/pcm179x.c index f52ff66b6e64..cb495cf2e959 100644 --- a/sound/soc/codecs/pcm179x.c +++ b/sound/soc/codecs/pcm179x.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "pcm179x.h" @@ -63,8 +64,83 @@ struct pcm179x_private { struct regmap *regmap; unsigned int format; unsigned int rate; + enum pcm179x_type codec_model; }; +struct pcm179x_fmt { + unsigned int fmt; /* SND_SOC_DAIFMT_* */ + unsigned int width; /* sample width in bits */ + unsigned int code; /* FMT[2:0] */ +}; + +/* + * Register 18 FMT[2:0] is not encoded the same way by every model: code 001 + * and code 100 are 20-bit and 16-bit I2S on the PCM1792A/PCM1796 but 32-bit + * and 32-bit I2S on the PCM1795, and neither model has a 32-bit + * left-justified mode. + * + * The PCM1792A/PCM1796 have no 32-bit format at all, so a 32-bit container + * keeps the 24-bit code and is clocked out as 24-bit data, as this driver has + * always done. Only the PCM1795 has real 32-bit formats. + */ +static const struct pcm179x_fmt pcm1792a_fmt[] = { + { SND_SOC_DAIFMT_RIGHT_J, 16, 0 }, + { SND_SOC_DAIFMT_RIGHT_J, 24, 2 }, + { SND_SOC_DAIFMT_RIGHT_J, 32, 2 }, + { SND_SOC_DAIFMT_LEFT_J, 24, 3 }, + { SND_SOC_DAIFMT_LEFT_J, 32, 3 }, + { SND_SOC_DAIFMT_I2S, 16, 4 }, + { SND_SOC_DAIFMT_I2S, 24, 5 }, + { SND_SOC_DAIFMT_I2S, 32, 5 }, +}; + +static const struct pcm179x_fmt pcm1795_fmt[] = { + { SND_SOC_DAIFMT_RIGHT_J, 16, 0 }, + { SND_SOC_DAIFMT_RIGHT_J, 24, 2 }, + { SND_SOC_DAIFMT_RIGHT_J, 32, 1 }, + { SND_SOC_DAIFMT_LEFT_J, 24, 3 }, + { SND_SOC_DAIFMT_I2S, 24, 5 }, + { SND_SOC_DAIFMT_I2S, 32, 4 }, +}; + +struct pcm179x_model { + u64 formats; + const struct pcm179x_fmt *fmt; + unsigned int num_fmt; +}; + +static const struct pcm179x_model pcm179x_models[] = { + [PCM1792A] = { PCM1792A_FORMATS, pcm1792a_fmt, ARRAY_SIZE(pcm1792a_fmt) }, + [PCM1795] = { PCM1795_FORMATS, pcm1795_fmt, ARRAY_SIZE(pcm1795_fmt) }, + [PCM1796] = { PCM1792A_FORMATS, pcm1792a_fmt, ARRAY_SIZE(pcm1792a_fmt) }, +}; + +static int pcm179x_fmt_value(struct pcm179x_private *priv, unsigned int fmt, + unsigned int width) +{ + const struct pcm179x_model *model = &pcm179x_models[priv->codec_model]; + const struct pcm179x_fmt *fmt_tbl = model->fmt; + + for (unsigned int i = 0; i < model->num_fmt; i++) + if (fmt_tbl[i].fmt == fmt && fmt_tbl[i].width == width) + return fmt_tbl[i].code; + + return -EINVAL; +} + +static int pcm179x_startup(struct snd_pcm_substream *substream, + struct snd_soc_dai *dai) +{ + struct snd_soc_component *component = dai->component; + struct pcm179x_private *priv = snd_soc_component_get_drvdata(component); + u64 formats = pcm179x_models[priv->codec_model].formats; + + snd_pcm_hw_constraint_mask64(substream->runtime, + SNDRV_PCM_HW_PARAM_FORMAT, formats); + + return 0; +} + static int pcm179x_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int format) { @@ -96,40 +172,15 @@ static int pcm179x_hw_params(struct snd_pcm_substream *substream, { struct snd_soc_component *component = dai->component; struct pcm179x_private *priv = snd_soc_component_get_drvdata(component); - int val = 0, ret; + int val, ret; priv->rate = params_rate(params); - switch (priv->format & SND_SOC_DAIFMT_FORMAT_MASK) { - case SND_SOC_DAIFMT_RIGHT_J: - switch (params_width(params)) { - case 24: - case 32: - val = 2; - break; - case 16: - val = 0; - break; - default: - return -EINVAL; - } - break; - case SND_SOC_DAIFMT_I2S: - switch (params_width(params)) { - case 24: - case 32: - val = 5; - break; - case 16: - val = 4; - break; - default: - return -EINVAL; - } - break; - default: + val = pcm179x_fmt_value(priv, priv->format & SND_SOC_DAIFMT_FORMAT_MASK, + params_width(params)); + if (val < 0) { dev_err(component->dev, "Invalid DAI format\n"); - return -EINVAL; + return val; } val = val << PCM179X_FMT_SHIFT | PCM179X_ATLD_ENABLE; @@ -143,6 +194,7 @@ static int pcm179x_hw_params(struct snd_pcm_substream *substream, } static const struct snd_soc_dai_ops pcm179x_dai_ops = { + .startup = pcm179x_startup, .set_fmt = pcm179x_set_dai_fmt, .hw_params = pcm179x_hw_params, .mute_stream = pcm179x_mute, @@ -182,7 +234,7 @@ static struct snd_soc_dai_driver pcm179x_dai = { .rates = SNDRV_PCM_RATE_CONTINUOUS, .rate_min = 10000, .rate_max = 200000, - .formats = PCM1792A_FORMATS, }, + .formats = PCM179X_FORMATS, }, .ops = &pcm179x_dai_ops, }; @@ -218,6 +270,8 @@ int pcm179x_common_init(struct device *dev, struct regmap *regmap) if (!pcm179x) return -ENOMEM; + pcm179x->codec_model = + (enum pcm179x_type)(uintptr_t)device_get_match_data(dev); pcm179x->regmap = regmap; dev_set_drvdata(dev, pcm179x); diff --git a/sound/soc/codecs/pcm179x.h b/sound/soc/codecs/pcm179x.h index 0039ca8ee742..ed8843e83238 100644 --- a/sound/soc/codecs/pcm179x.h +++ b/sound/soc/codecs/pcm179x.h @@ -8,9 +8,20 @@ #ifndef __PCM179X_H__ #define __PCM179X_H__ +enum pcm179x_type { + PCM1792A, + PCM1795, + PCM1796, +}; + +#define PCM179X_FORMATS (SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S24_LE | \ + SNDRV_PCM_FMTBIT_S16_LE) + #define PCM1792A_FORMATS (SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S24_LE | \ SNDRV_PCM_FMTBIT_S16_LE) +#define PCM1795_FORMATS (SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S24_LE) + extern const struct regmap_config pcm179x_regmap_config; int pcm179x_common_init(struct device *dev, struct regmap *regmap);