Files
SDK_SG200x_V2/u-boot-2021.10/drivers/sound/i8254_beep.c
carbon 0545e9dc6d init version 2024-05-07
commit d1edce71135cc6d98c0a4b5729774542b676e769
Author: sophgo-forum-service <forum_service@sophgo.com>
Date:   Fri Mar 15 16:07:33 2024 +0800

    [fix] recommend using ssh method to clone repo.
    [fix] fix sensor driver repo branch name.
2024-05-07 19:36:36 +08:00

39 lines
665 B
C

// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2018 Google LLC
*/
#include <common.h>
#include <dm.h>
#include <sound.h>
#include <asm/i8254.h>
int i8254_start_beep(struct udevice *dev, int frequency_hz)
{
return i8254_enable_beep(frequency_hz);
}
int i8254_stop_beep(struct udevice *dev)
{
i8254_disable_beep();
return 0;
}
static const struct sound_ops i8254_ops = {
.start_beep = i8254_start_beep,
.stop_beep = i8254_stop_beep,
};
static const struct udevice_id i8254_ids[] = {
{ .compatible = "i8254,beeper" },
{ }
};
U_BOOT_DRIVER(i8254_drv) = {
.name = "i8254_drv",
.id = UCLASS_SOUND,
.of_match = i8254_ids,
.ops = &i8254_ops,
};