Skip to content

Commit

Permalink
ev3: motor: drop in-kernel motor position and speed calculations
Browse files Browse the repository at this point in the history
this is all done in the PRU driver now
  • Loading branch information
dlech committed Jul 14, 2018
1 parent 9eb5dde commit 9a05ab8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 510 deletions.
5 changes: 1 addition & 4 deletions ev3/ev3_ports_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,6 @@ void ev3_output_port_register_motor(struct work_struct *work)
struct ev3_output_port_data *data =
container_of(work, struct ev3_output_port_data, work);
struct lego_device *motor;
struct ev3_motor_platform_data pdata;
const char *driver_name;

if (data->motor_type >= NUM_MOTOR
Expand All @@ -387,16 +386,14 @@ void ev3_output_port_register_motor(struct work_struct *work)
return;
}

pdata.tacho_int_gpio = desc_to_gpio(data->pin5_gpio);
pdata.tacho_dir_gpio = desc_to_gpio(data->pin6_gpio);
if (data->motor_type == MOTOR_TACHO)
driver_name = ev3_motor_defs[data->motor_id].name;
else
driver_name = ev3_motor_device_types[data->motor_type].name;

motor = lego_device_register(driver_name,
&ev3_motor_device_types[data->motor_type],
&data->out_port, &pdata, sizeof(struct ev3_motor_platform_data));
&data->out_port, NULL, 0);
if (IS_ERR(motor)) {
dev_err(&data->out_port.dev,
"Could not register motor on port %s.\n",
Expand Down
Loading

0 comments on commit 9a05ab8

Please sign in to comment.