On Sat, Oct 03, 2009 at 11:17:35AM +0200, Wolfgang Grandegger wrote:
> 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?
I was not aware. I'll take a look.
>
> Wolfgang.
>
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core