hm2_bspi_set_read_function — Register a function to handle the tram write phase of a hostmot2 buffered SPI driver.
int hm2_bspi_set_read_function ( char *name, void *func, void *subdata )
Registers a function in an external driver (typically written in "comp") to be called every time that the main Hostmot2 driver calls the generic "process_tram_read" functionsread.
The names of the available channels are printed to standard output during the
driver loading process and take the form:
hm2_<board name>.<board index>.bspi.<index>
"func" should be a pointer to a function in the sub driver which is to be
called to process the results of the BSPI TRAM read phase.
The function must take a single argument, a pointer to an individual instance of the internal driver.
If defined in comp then the function must not use the FUNCTION() convenience macro, and the argument to the function in the definition must always be (struct state *inst).
"subdata" is a pointer to the driver instance internal data. In the case of a driver written in comp this will always be "inst" in the function call and the call should be anywhere in the EXTRA_SETUP code.
Returns 0 on success and -1 on failure.
Issued under the terms of the GPL v2 License or any later version
See mesa_7i65.comp for an example usage