X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/f9e1149757ece25f25d4c8a1722f1a84d57a5c13..341377103dfdc83d2d52e33d78672366db0efe93:/lincan/src/mpc5200.c diff --git a/lincan/src/mpc5200.c b/lincan/src/mpc5200.c index 9371eca..4f67d24 100644 --- a/lincan/src/mpc5200.c +++ b/lincan/src/mpc5200.c @@ -137,6 +137,19 @@ int mpc5200_init_hw_data(struct candevice_t *candev) return 0; } + +/* special function for midam board */ +int mpc5200_midam_init_hw_data(struct candevice_t *candev) +{ + /* use same init routine */ + mpc5200_init_hw_data(candev); + + /* modify chip count */ + candev->nr_all_chips = NR_ALL_MIDAM; + + return 0; +} + int mpc5200_init_chip_data(struct candevice_t *candev, int chipnr) { mscan_fill_chipspecops(candev->chip[chipnr]); @@ -196,6 +209,16 @@ int mpc5200_register(struct hwspecops_t *hwspecops) return 0; } +int mpc5200_midam_register(struct hwspecops_t *hwspecops) +{ + /* use same register routine for MIDAM board */ + mpc5200_register(hwspecops); + + /* use specific init_hw_data */ + hwspecops->init_hw_data = mpc5200_midam_init_hw_data; + + return 0; +} int mpc5200_init_device_node(struct canchip_t * chip, struct device_node * devnode) {