![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 */ 0002 #ifndef _DVB_USB_M920X_H_ 0003 #define _DVB_USB_M920X_H_ 0004 0005 #define DVB_USB_LOG_PREFIX "m920x" 0006 #include "dvb-usb.h" 0007 0008 #define deb(args...) dprintk(dvb_usb_m920x_debug,0x01,args) 0009 0010 #define M9206_CORE 0x22 0011 #define M9206_RC_STATE 0xff51 0012 #define M9206_RC_KEY 0xff52 0013 #define M9206_RC_INIT1 0xff54 0014 #define M9206_RC_INIT2 0xff55 0015 #define M9206_FW_GO 0xff69 0016 0017 #define M9206_I2C 0x23 0018 #define M9206_FILTER 0x25 0019 #define M9206_FW 0x30 0020 0021 #define M9206_MAX_FILTERS 8 0022 #define M9206_MAX_ADAPTERS 4 0023 0024 /* 0025 sequences found in logs: 0026 [index value] 0027 0x80 write addr 0028 (0x00 out byte)* 0029 0x40 out byte 0030 0031 0x80 write addr 0032 (0x00 out byte)* 0033 0x80 read addr 0034 (0x21 in byte)* 0035 0x60 in byte 0036 0037 this sequence works: 0038 0x80 read addr 0039 (0x21 in byte)* 0040 0x60 in byte 0041 0042 Guess at API of the I2C function: 0043 I2C operation is done one byte at a time with USB control messages. The 0044 index the messages is sent to is made up of a set of flags that control 0045 the I2C bus state: 0046 0x80: Send START condition. After a START condition, one would normally 0047 always send the 7-bit slave I2C address as the 7 MSB, followed by 0048 the read/write bit as the LSB. 0049 0x40: Send STOP condition. This should be set on the last byte of an 0050 I2C transaction. 0051 0x20: Read a byte from the slave. As opposed to writing a byte to the 0052 slave. The slave will normally not produce any data unless you 0053 set the R/W bit to 1 when sending the slave's address after the 0054 START condition. 0055 0x01: Respond with ACK, as opposed to a NACK. For a multi-byte read, 0056 the master should send an ACK, that is pull SDA low during the 9th 0057 clock cycle, after every byte but the last. This flags only makes 0058 sense when bit 0x20 is set, indicating a read. 0059 0060 What any other bits might mean, or how to get the slave's ACK/NACK 0061 response to a write, is unknown. 0062 */ 0063 0064 struct m920x_state { 0065 u16 filters[M9206_MAX_ADAPTERS][M9206_MAX_FILTERS]; 0066 int filtering_enabled[M9206_MAX_ADAPTERS]; 0067 int rep_count; 0068 }; 0069 0070 /* Initialisation data for the m920x 0071 */ 0072 0073 struct m920x_inits { 0074 u16 address; 0075 u8 data; 0076 }; 0077 0078 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |