···11+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)22+%YAML 1.233+---44+$id: http://devicetree.org/schemas/sound/awinic,aw87390.yaml#55+$schema: http://devicetree.org/meta-schemas/core.yaml#66+77+title: Awinic Aw87390 Audio Amplifier88+99+maintainers:1010+ - Weidong Wang <wangweidong.a@awinic.com>1111+1212+description:1313+ The awinic aw87390 is specifically designed to improve1414+ the musical output dynamic range, enhance the overall1515+ sound quallity, which is a new high efficiency, low1616+ noise, constant large volume, 6th Smart K audio amplifier.1717+1818+allOf:1919+ - $ref: dai-common.yaml#2020+2121+properties:2222+ compatible:2323+ const: awinic,aw873902424+2525+ reg:2626+ maxItems: 12727+2828+ "#sound-dai-cells":2929+ const: 03030+3131+ awinic,audio-channel:3232+ description:3333+ It is used to distinguish multiple PA devices, so that different3434+ configurations can be loaded to different PA devices3535+ $ref: /schemas/types.yaml#/definitions/uint323636+ minimum: 03737+ maximum: 73838+3939+required:4040+ - compatible4141+ - reg4242+ - "#sound-dai-cells"4343+ - awinic,audio-channel4444+4545+unevaluatedProperties: false4646+4747+examples:4848+ - |4949+ i2c {5050+ #address-cells = <1>;5151+ #size-cells = <0>;5252+ audio-codec@58 {5353+ compatible = "awinic,aw87390";5454+ reg = <0x58>;5555+ #sound-dai-cells = <0>;5656+ awinic,audio-channel = <0>;5757+ };5858+ };
···3232 reset-gpios:3333 maxItems: 134343535+ awinic,audio-channel:3636+ description:3737+ It is used to distinguish multiple PA devices, so that different3838+ configurations can be loaded to different PA devices3939+ $ref: /schemas/types.yaml#/definitions/uint324040+ minimum: 04141+ maximum: 74242+4343+ awinic,sync-flag:4444+ description:4545+ Flag bit used to keep the phase synchronized in the case of multiple PA4646+ $ref: /schemas/types.yaml#/definitions/flag4747+3548required:3649 - compatible3750 - reg3851 - '#sound-dai-cells'3952 - reset-gpios5353+ - awinic,audio-channel40544155unevaluatedProperties: false4256···6551 reg = <0x34>;6652 #sound-dai-cells = <0>;6753 reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;5454+ awinic,audio-channel = <0>;5555+ awinic,sync-flag;6856 };6957 };
+13-2
sound/soc/codecs/Kconfig
···5454 imply SND_SOC_ALC56325555 imply SND_SOC_AUDIO_IIO_AUX5656 imply SND_SOC_AW87385757+ imply SND_SOC_AW873905758 imply SND_SOC_AW883955859 imply SND_SOC_AW882615960 imply SND_SOC_BT_SCO···640639 operation mode using the Awinic-specific one-wire pulse control.641640642641config SND_SOC_AW88395_LIB642642+ select CRC8643643 tristate644644645645config SND_SOC_AW88395646646 tristate "Soc Audio for awinic aw88395"647647 depends on I2C648648- select CRC8649648 select CRC32650649 select REGMAP_I2C651650 select GPIOLIB···659658config SND_SOC_AW88261660659 tristate "Soc Audio for awinic aw88261"661660 depends on I2C662662- select CRC8663661 select REGMAP_I2C664662 select GPIOLIB665663 select SND_SOC_AW88395_LIB···668668 digital Smart K audio amplifier. The output voltage of669669 boost converter can be adjusted smartly according to670670 the input amplitude.671671+672672+config SND_SOC_AW87390673673+ tristate "Soc Audio for awinic aw87390"674674+ depends on I2C675675+ select REGMAP_I2C676676+ select SND_SOC_AW88395_LIB677677+ help678678+ The awinic aw87390 is specifically designed to improve679679+ the musical output dynamic range, enhance the overall680680+ sound quality, which is a new high efficiency, low681681+ noise, constant large volume, 6th Smart K audio amplifier.671682672683config SND_SOC_BD28623673684 tristate "ROHM BD28623 CODEC"
···456456 goto parse_bin_failed;457457 }458458459459- if (aw_bin->header_info[0].valid_data_len % 4) {460460- dev_err(aw_dev->dev, "bin data len get error!");461461- ret = -EINVAL;462462- goto parse_bin_failed;459459+ if (aw_dev->chip_id == AW88261_CHIP_ID) {460460+ if (aw_bin->header_info[0].valid_data_len % 4) {461461+ dev_err(aw_dev->dev, "bin data len get error!");462462+ ret = -EINVAL;463463+ goto parse_bin_failed;464464+ }463465 }464466465467 prof_desc->sec_desc[AW88395_DATA_TYPE_REG].data =···583581}584582585583static int aw88261_dev_cfg_get_valid_prof(struct aw_device *aw_dev,586586- struct aw_all_prof_info all_prof_info)584584+ struct aw_all_prof_info *all_prof_info)587585{588588- struct aw_prof_desc *prof_desc = all_prof_info.prof_desc;586586+ struct aw_prof_desc *prof_desc = all_prof_info->prof_desc;589587 struct aw_prof_info *prof_info = &aw_dev->prof_info;590588 int num = 0;591589 int i;···625623}626624627625static int aw88395_dev_cfg_get_valid_prof(struct aw_device *aw_dev,628628- struct aw_all_prof_info all_prof_info)626626+ struct aw_all_prof_info *all_prof_info)629627{630630- struct aw_prof_desc *prof_desc = all_prof_info.prof_desc;628628+ struct aw_prof_desc *prof_desc = all_prof_info->prof_desc;631629 struct aw_prof_info *prof_info = &aw_dev->prof_info;632630 struct aw_sec_data_desc *sec_desc;633631 int num = 0;···705703706704 switch (aw_dev->chip_id) {707705 case AW88395_CHIP_ID:708708- ret = aw88395_dev_cfg_get_valid_prof(aw_dev, *all_prof_info);706706+ ret = aw88395_dev_cfg_get_valid_prof(aw_dev, all_prof_info);709707 if (ret < 0)710708 goto exit;711709 break;712710 case AW88261_CHIP_ID:713713- ret = aw88261_dev_cfg_get_valid_prof(aw_dev, *all_prof_info);711711+ case AW87390_CHIP_ID:712712+ ret = aw88261_dev_cfg_get_valid_prof(aw_dev, all_prof_info);714713 if (ret < 0)715714 goto exit;716715 break;···804801 ret = 0;805802 break;806803 case AW88261_CHIP_ID:804804+ case AW87390_CHIP_ID:807805 for (i = 0; i < cfg_hdr->ddt_num; ++i) {808806 if (((cfg_dde[i].data_type == ACF_SEC_TYPE_REG) ||809807 (cfg_dde[i].data_type == ACF_SEC_TYPE_HDR_REG)) &&···845841 ret = 0;846842 break;847843 case AW88261_CHIP_ID:844844+ case AW87390_CHIP_ID:848845 for (i = 0; i < cfg_hdr->ddt_num; ++i) {849846 if (((cfg_dde[i].data_type == ACF_SEC_TYPE_REG) ||850847 (cfg_dde[i].data_type == ACF_SEC_TYPE_HDR_REG)) &&