Skip to content

Commit

Permalink
Merge branch 'sound/upstream-20240830' into merge/sound-upstream-2024…
Browse files Browse the repository at this point in the history
…0830
  • Loading branch information
bardliao committed Aug 30, 2024
2 parents c2dace0 + cbc8c8b commit 7094d4f
Show file tree
Hide file tree
Showing 62 changed files with 906 additions and 679 deletions.
101 changes: 101 additions & 0 deletions Documentation/devicetree/bindings/sound/cirrus,cs4271.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/cirrus,cs4271.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Cirrus Logic CS4271 audio CODEC

maintainers:
- Alexander Sverdlin <alexander.sverdlin@gmail.com>
- Nikita Shubin <nikita.shubin@maquefel.me>

description:
The CS4271 is a stereo audio codec. This device supports both the I2C
and the SPI bus.

allOf:
- $ref: dai-common.yaml#
- $ref: /schemas/spi/spi-peripheral-props.yaml#

properties:
compatible:
const: cirrus,cs4271

reg:
maxItems: 1

spi-cpha: true

spi-cpol: true

'#sound-dai-cells':
const: 0

reset-gpios:
description:
This pin will be deasserted before communication to the codec starts.
maxItems: 1

va-supply:
description: Analog power supply.

vd-supply:
description: Digital power supply.

vl-supply:
description: Serial Control Port power supply.

port:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false

cirrus,amuteb-eq-bmutec:
description:
When given, the Codec's AMUTEB=BMUTEC flag is enabled.
type: boolean

cirrus,enable-soft-reset:
description: |
The CS4271 requires its LRCLK and MCLK to be stable before its RESET
line is de-asserted. That also means that clocks cannot be changed
without putting the chip back into hardware reset, which also requires
a complete re-initialization of all registers.
One (undocumented) workaround is to assert and de-assert the PDN bit
in the MODE2 register. This workaround can be enabled with this DT
property.
Note that this is not needed in case the clocks are stable
throughout the entire runtime of the codec.
type: boolean

required:
- compatible
- reg

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
codec@0 {
compatible = "cirrus,cs4271";
reg = <0>;
#sound-dai-cells = <0>;
spi-max-frequency = <6000000>;
spi-cpol;
spi-cpha;
reset-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
port {
endpoint {
remote-endpoint = <&i2s_ep>;
};
};
};
};
...
57 changes: 0 additions & 57 deletions Documentation/devicetree/bindings/sound/cs4271.txt

This file was deleted.

83 changes: 83 additions & 0 deletions Documentation/devicetree/bindings/sound/fsl,saif.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/fsl,saif.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Freescale MXS Serial Audio Interface (SAIF)

maintainers:
- Lukasz Majewski <lukma@denx.de>

allOf:
- $ref: dai-common.yaml#

description:
The SAIF is based on I2S module that is used to communicate with audio codecs,
but only with half-duplex manner (i.e. it can either transmit or receive PCM
audio).

properties:
compatible:
const: fsl,imx28-saif

reg:
maxItems: 1

"#sound-dai-cells":
const: 0

interrupts:
maxItems: 1

dmas:
maxItems: 1

dma-names:
const: rx-tx

"#clock-cells":
description: Configure the I2S device as MCLK clock provider.
const: 0

clocks:
maxItems: 1

fsl,saif-master:
description: Indicate that saif is a slave and its phandle points to master
$ref: /schemas/types.yaml#/definitions/phandle

required:
- compatible
- reg
- "#sound-dai-cells"
- interrupts
- dmas
- dma-names
- clocks

unevaluatedProperties: false

examples:
- |
saif0: saif@80042000 {
compatible = "fsl,imx28-saif";
reg = <0x80042000 2000>;
#sound-dai-cells = <0>;
interrupts = <59>;
dmas = <&dma_apbx 4>;
dma-names = "rx-tx";
#clock-cells = <0>;
clocks = <&clks 53>;
};
- |
saif1: saif@80046000 {
compatible = "fsl,imx28-saif";
reg = <0x80046000 2000>;
#sound-dai-cells = <0>;
interrupts = <58>;
dmas = <&dma_apbx 5>;
dma-names = "rx-tx";
clocks = <&clks 53>;
fsl,saif-master = <&saif0>;
};
41 changes: 0 additions & 41 deletions Documentation/devicetree/bindings/sound/mxs-saif.txt

This file was deleted.

1 change: 0 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -22584,7 +22584,6 @@ F: Documentation/devicetree/bindings/sound/ti,pcm1681.yaml
F: Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
F: Documentation/devicetree/bindings/sound/ti,tlv320*.yaml
F: Documentation/devicetree/bindings/sound/ti,tlv320adcx140.yaml
F: Documentation/devicetree/bindings/sound/tlv320aic31xx.txt
F: include/sound/tas2*.h
F: include/sound/tlv320*.h
F: include/sound/tpa6130a2-plat.h
Expand Down
2 changes: 1 addition & 1 deletion drivers/base/regmap/regcache-flat.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static int regcache_flat_init(struct regmap *map)
return -EINVAL;

map->cache = kcalloc(regcache_flat_get_index(map, map->max_register)
+ 1, sizeof(unsigned int), GFP_KERNEL);
+ 1, sizeof(unsigned int), map->alloc_flags);
if (!map->cache)
return -ENOMEM;

Expand Down
2 changes: 1 addition & 1 deletion drivers/base/regmap/regcache-maple.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ static int regcache_maple_init(struct regmap *map)
int ret;
int range_start;

mt = kmalloc(sizeof(*mt), GFP_KERNEL);
mt = kmalloc(sizeof(*mt), map->alloc_flags);
if (!mt)
return -ENOMEM;
map->cache = mt;
Expand Down
2 changes: 1 addition & 1 deletion drivers/base/regmap/regcache-rbtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ static int regcache_rbtree_init(struct regmap *map)
int i;
int ret;

map->cache = kmalloc(sizeof *rbtree_ctx, GFP_KERNEL);
map->cache = kmalloc(sizeof *rbtree_ctx, map->alloc_flags);
if (!map->cache)
return -ENOMEM;

Expand Down
4 changes: 4 additions & 0 deletions drivers/base/regmap/regcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ int regcache_init(struct regmap *map, const struct regmap_config *config)
if (map->cache_ops->init) {
dev_dbg(map->dev, "Initializing %s cache\n",
map->cache_ops->name);
map->lock(map->lock_arg);
ret = map->cache_ops->init(map);
map->unlock(map->lock_arg);
if (ret)
goto err_free;
}
Expand Down Expand Up @@ -223,7 +225,9 @@ void regcache_exit(struct regmap *map)
if (map->cache_ops->exit) {
dev_dbg(map->dev, "Destroying %s cache\n",
map->cache_ops->name);
map->lock(map->lock_arg);
map->cache_ops->exit(map);
map->unlock(map->lock_arg);
}
}

Expand Down
2 changes: 0 additions & 2 deletions drivers/base/regmap/regmap-kunit.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ static struct regmap *gen_regmap(struct kunit *test,
struct reg_default *defaults;

config->cache_type = param->cache;
config->disable_locking = config->cache_type == REGCACHE_RBTREE ||
config->cache_type == REGCACHE_MAPLE;

if (config->max_register == 0) {
config->max_register = param->from_reg;
Expand Down
1 change: 1 addition & 0 deletions drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1445,6 +1445,7 @@ void regmap_exit(struct regmap *map)
struct regmap_async *async;

regcache_exit(map);

regmap_debugfs_exit(map);
regmap_range_exit(map);
if (map->bus && map->bus->free_context)
Expand Down
Loading

0 comments on commit 7094d4f

Please sign in to comment.