-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Wolfgang Grandegger schrieb:
> Hi Kurt,
>
> Kurt Van Dijck wrote:
>> The goal of this patch series is to add an external hook function into
>> the CAN netdevice's open/close functions.
>>
>> I think this is much simpler than using netdev notifactions. These new
>> hook functions carry the original device in its argument list.
>> A hook function for platform_device can be as simple as:
>>
>> static const int can_drv_gpio[NUM] = { ... };
>> static int can_drv_enable(struct platform_device *pdev, int enable)
>> {
>> gpio_set_value(can_drv_gpio[pdev->id], enable);
>> return 0;
>> }
>>
>> This kind of 'glue functions' is what make board run, and should not
>> be too complex IMO.
>>
>> I (EIA Electronics) use this to activate/deactivate a GPIO that powers
>> the CAN transceiver (PCA82...).
>>
>> My original idea was to limit this functionality to the sja1000
>> platform_device, but the sja1000 'object-oriented' approach forced me to
>> dig some deeper, int the generic sja1000 code.
>>
>> Currently, my tests have been limited to activation/deactivation, since
>> only these operations are affected.
>
> The at91_can also use a platform function to enable/disable the
> transceiver when the device is started or stopped. Therefore I would
> prefer a similar approach using the name "transceiver_switch". What do
> you think?
Isn't transceiver_switch too specific? I meant, a user may also use this
function to enable power supply for the controller itself. I would call
it post_initialization or something else.
But in general I like the whole approach.
Sebastian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkrJpqIACgkQpqRB8PJG7XwQgQCgiKwpSlorF7qnK6Af7GLVZSLK
nwQAn1ub0j+iq6xGhgZ85Y/WbJ9LTzXF
=m3nm
-----END PGP SIGNATURE-----
--
EMS Dr. Thomas Wuensche e.K.
Sonnenhang 3
85304 Ilmmuenster
HRA Neuburg a.d. Donau, HR-Nr. 70.106
Phone: +49-8441-490260
Fax : +49-8441-81860
http://www.ems-wuensche.com
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core