Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion boards/xtensa/intel_s1000_crb/intel_s1000_crb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
compatible = "ti,tlv320dac";
reg = <0x18>;
label = "TLV320DAC";
reset-gpios = <&gpio0 4 0>;
reset-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
};
};

Expand Down
12 changes: 4 additions & 8 deletions drivers/audio/tlv320dac310x.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ LOG_MODULE_REGISTER(tlv320dac310x);
#define CODEC_OUTPUT_VOLUME_MAX 0
#define CODEC_OUTPUT_VOLUME_MIN (-78 * 2)

#define CODEC_RESET_PIN_ASSERT 0
#define CODEC_RESET_PIN_DEASSERT 1

struct codec_driver_config {
struct device *i2c_device;
const char *i2c_dev_name;
Expand Down Expand Up @@ -108,12 +105,11 @@ static int codec_configure(struct device *dev,
return -EINVAL;
}

/* configure reset GPIO */
/* Configure reset GPIO, and set the line to inactive, which will also
* de-assert the reset line and thus enable the codec.
*/
gpio_pin_configure(dev_cfg->gpio_device, dev_cfg->gpio_pin,
dev_cfg->gpio_flags | GPIO_DIR_OUT);
/* de-assert reset */
gpio_pin_write(dev_cfg->gpio_device, dev_cfg->gpio_pin,
CODEC_RESET_PIN_DEASSERT);
dev_cfg->gpio_flags | GPIO_OUTPUT_INACTIVE);

codec_soft_reset(dev);

Expand Down