-
- pp->info[0].max_speed_hz = 15 * 1000 * 1000;
-
- strcpy(pp->info[0].modalias, "spi_tty"); // name length check ! < KOBJ_NAME_LEN
- pp->info[0].platform_data = NULL; // here we should add data structures for subsystem driver ???
- pp->info[0].chip_select = 1; // 0: .. 1:
- pp->info[0].controller_data = pp; /* save my structure for later use */
- pp->butterfly = spi_new_device(pp->bitbang.master, &pp->info[0]);
+ if (modalias[0]) {
+ pr_info("%s: Will load protocol driver: '%s'!\n", DRVNAME, modalias);
+ } else goto clean2;
+
+ /* need to make this parameter loadable */
+ strcpy(pp->info.modalias, modalias);
+ pp->info.max_speed_hz = 15 * 1000 * 1000;
+ pp->info.chip_select = 0; // 0: .. 1:
+ pp->info.mode = SPI_3WIRE | SPI_MODE_0; // ################
+
+ /* Enable access to our primary data structure via
+ * the board info's (void *)controller_data.
+ */
+ pp->info.platform_data = NULL; // here we should add data structures for subsystem driver ???
+ pp->info.controller_data = pp; /* save my structure for later use */
+ pp->butterfly = spi_new_device(pp->bitbang.master, &pp->info);