linux/drivers/scsi/elx/libefc/efc_sm.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (C) 2021 Broadcom. All Rights Reserved. The term
 * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
 *
 */

/**
 * Generic state machine framework declarations.
 */

#ifndef _EFC_SM_H
#define _EFC_SM_H

struct efc_sm_ctx;

/* State Machine events */
enum efc_sm_event {};

/* State Machine event name lookup array */
#define EFC_SM_EVENT_NAME

int
efc_sm_post_event(struct efc_sm_ctx *ctx,
		  enum efc_sm_event evt, void *data);
void
efc_sm_transition(struct efc_sm_ctx *ctx,
		  void (*state)(struct efc_sm_ctx *ctx,
				enum efc_sm_event evt, void *arg),
		  void *data);
void efc_sm_disable(struct efc_sm_ctx *ctx);
const char *efc_sm_event_name(enum efc_sm_event evt);

#endif /* ! _EFC_SM_H */