1/* $NetBSD$ */ 2 3/*- 4 * Copyright (c) 2011 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Jukka Ruohonen. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions and the following disclaimer. 16 * 2. Redistributions in binary form must reproduce the above copyright 17 * notice, this list of conditions and the following disclaimer in the 18 * documentation and/or other materials provided with the distribution. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32#ifndef _DEV_I2C_ZL10353VAR_H_ 33#define _DEV_I2C_ZL10353VAR_H_ 34 35struct zl10353 { 36 device_t zl_parent; 37 const char *zl_name; 38 i2c_tag_t zl_i2c; 39 i2c_addr_t zl_i2c_addr; 40 uint32_t zl_clock; 41 uint16_t zl_freq; 42 uint8_t zl_bw; 43}; 44 45struct zl10353 *zl10353_open(device_t, i2c_tag_t, i2c_addr_t); 46void zl10353_close(struct zl10353 *); 47void zl10353_get_devinfo(struct dvb_frontend_info *); 48int zl10353_set_params(struct zl10353 *, 49 const struct dvb_frontend_parameters *); 50int zl10353_set_fsm(struct zl10353 *); 51int zl10353_set_gate(void *, bool); 52fe_status_t zl10353_get_status(struct zl10353 *); 53uint16_t zl10353_get_signal_strength(struct zl10353 *); 54uint16_t zl10353_get_snr(struct zl10353 *); 55 56#endif /* !_DEV_I2C_ZL10353VAR_H */ 57