| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * max9850.c -- codec driver for max9850 |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 6 | 7 | * Author: Christian Glindkamp <christian.glindkamp@taskit.de> |
|---|
| 7 | 8 | * |
|---|
| 8 | 9 | * Initial development of this code was funded by |
|---|
| 9 | | - * MICRONIC Computer Systeme GmbH, http://www.mcsberlin.de/ |
|---|
| 10 | | - * |
|---|
| 11 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 12 | | - * under the terms of the GNU General Public License as published by the |
|---|
| 13 | | - * Free Software Foundation; either version 2 of the License, or (at your |
|---|
| 14 | | - * option) any later version. |
|---|
| 15 | | - * |
|---|
| 10 | + * MICRONIC Computer Systeme GmbH, https://www.mcsberlin.de/ |
|---|
| 16 | 11 | */ |
|---|
| 17 | 12 | |
|---|
| 18 | 13 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 30 | 25 | struct max9850_priv { |
|---|
| 31 | 26 | struct regmap *regmap; |
|---|
| 32 | 27 | unsigned int sysclk; |
|---|
| 33 | | -}; |
|---|
| 34 | | - |
|---|
| 35 | | -/* max9850 register cache */ |
|---|
| 36 | | -static const struct reg_default max9850_reg[] = { |
|---|
| 37 | | - { 2, 0x0c }, |
|---|
| 38 | | - { 3, 0x00 }, |
|---|
| 39 | | - { 4, 0x00 }, |
|---|
| 40 | | - { 5, 0x00 }, |
|---|
| 41 | | - { 6, 0x00 }, |
|---|
| 42 | | - { 7, 0x00 }, |
|---|
| 43 | | - { 8, 0x00 }, |
|---|
| 44 | | - { 9, 0x00 }, |
|---|
| 45 | | - { 10, 0x00 }, |
|---|
| 46 | 28 | }; |
|---|
| 47 | 29 | |
|---|
| 48 | 30 | /* these registers are not used at the moment but provided for the sake of |
|---|
| .. | .. |
|---|
| 139 | 121 | return -EINVAL; |
|---|
| 140 | 122 | |
|---|
| 141 | 123 | /* lrclk_div = 2^22 * rate / iclk with iclk = mclk / sf */ |
|---|
| 142 | | - sf = (snd_soc_component_read32(component, MAX9850_CLOCK) >> 2) + 1; |
|---|
| 124 | + sf = (snd_soc_component_read(component, MAX9850_CLOCK) >> 2) + 1; |
|---|
| 143 | 125 | lrclk_div = (1 << 22); |
|---|
| 144 | 126 | lrclk_div *= params_rate(params); |
|---|
| 145 | 127 | lrclk_div *= sf; |
|---|