18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * mux/consumer.h - definitions for the multiplexer consumer interface 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2017 Axentia Technologies AB 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Author: Peter Rosin <peda@axentia.se> 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#ifndef _LINUX_MUX_CONSUMER_H 118c2ecf20Sopenharmony_ci#define _LINUX_MUX_CONSUMER_H 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#include <linux/compiler.h> 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_cistruct device; 168c2ecf20Sopenharmony_cistruct mux_control; 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ciunsigned int mux_control_states(struct mux_control *mux); 198c2ecf20Sopenharmony_ciint __must_check mux_control_select(struct mux_control *mux, 208c2ecf20Sopenharmony_ci unsigned int state); 218c2ecf20Sopenharmony_ciint __must_check mux_control_try_select(struct mux_control *mux, 228c2ecf20Sopenharmony_ci unsigned int state); 238c2ecf20Sopenharmony_ciint mux_control_deselect(struct mux_control *mux); 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_cistruct mux_control *mux_control_get(struct device *dev, const char *mux_name); 268c2ecf20Sopenharmony_civoid mux_control_put(struct mux_control *mux); 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_cistruct mux_control *devm_mux_control_get(struct device *dev, 298c2ecf20Sopenharmony_ci const char *mux_name); 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#endif /* _LINUX_MUX_CONSUMER_H */ 32