Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-09-07 Thread Fabio Baltieri
On Fri, Sep 07, 2012 at 09:04:19AM +0200, Kurt Van Dijck wrote: > On Thu, Sep 06, 2012 at 10:57:28PM +0200, Fabio Baltieri wrote: > > On Thu, Sep 06, 2012 at 05:11:58PM +0200, Kurt Van Dijck wrote: > > Can't argue with that... I'm trying to see how it comes but names like > > "can-3-2:1.0-tx" doesn

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-09-07 Thread Kurt Van Dijck
On Thu, Sep 06, 2012 at 10:57:28PM +0200, Fabio Baltieri wrote: > On Thu, Sep 06, 2012 at 05:11:58PM +0200, Kurt Van Dijck wrote: > > > > I also think that led triggers should be available. > > > > > > Right, that's why I think the only way is to use device name. > > > > yes, but it has 2 disadva

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-09-06 Thread Fabio Baltieri
On Thu, Sep 06, 2012 at 05:11:58PM +0200, Kurt Van Dijck wrote: > > > I also think that led triggers should be available. > > > > Right, that's why I think the only way is to use device name. > > yes, but it has 2 disadvantages: > * inconvenient. I like 'can0-tx' much more than any device name >

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-09-06 Thread Kurt Van Dijck
On Thu, Sep 06, 2012 at 01:17:39PM +0200, Fabio Baltieri wrote: > Hi Kurt, > > On Thu, Sep 6, 2012 at 12:33 PM, Kurt Van Dijck wrote: > > On Tue, Sep 04, 2012 at 10:15:53PM +0200, Fabio Baltieri wrote: > >> On Tue, Sep 04, 2012 at 09:11:28AM +0200, Kurt Van Dijck wrote: > > [...] > >> > > The nam

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-09-06 Thread Fabio Baltieri
Hi Kurt, On Thu, Sep 6, 2012 at 12:33 PM, Kurt Van Dijck wrote: > On Tue, Sep 04, 2012 at 10:15:53PM +0200, Fabio Baltieri wrote: >> On Tue, Sep 04, 2012 at 09:11:28AM +0200, Kurt Van Dijck wrote: > [...] >> > > The name of the device can only be changed when the interface is down. >> > > Is it p

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-09-06 Thread Kurt Van Dijck
On Tue, Sep 04, 2012 at 10:15:53PM +0200, Fabio Baltieri wrote: > On Tue, Sep 04, 2012 at 09:11:28AM +0200, Kurt Van Dijck wrote: > > On Mon, Sep 03, 2012 at 10:54:49PM +0200, Oliver Hartkopp wrote: > > > On 03.09.2012 20:29, Fabio Baltieri wrote: > > > > > > [...] > > > The name of the device ca

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-09-04 Thread Fabio Baltieri
On Tue, Sep 04, 2012 at 09:11:28AM +0200, Kurt Van Dijck wrote: > On Mon, Sep 03, 2012 at 10:54:49PM +0200, Oliver Hartkopp wrote: > > On 03.09.2012 20:29, Fabio Baltieri wrote: > > > > > On Mon, Sep 03, 2012 at 08:13:35PM +0200, Kurt Van Dijck wrote: > > >> On Mon, Sep 03, 2012 at 02:40:39PM +020

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-09-04 Thread Kurt Van Dijck
On Mon, Sep 03, 2012 at 10:54:49PM +0200, Oliver Hartkopp wrote: > On 03.09.2012 20:29, Fabio Baltieri wrote: > > > On Mon, Sep 03, 2012 at 08:13:35PM +0200, Kurt Van Dijck wrote: > >> On Mon, Sep 03, 2012 at 02:40:39PM +0200, Marc Kleine-Budde wrote: > >>> The net->ifindex is unique. But it's onl

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-09-03 Thread Oliver Hartkopp
On 03.09.2012 20:29, Fabio Baltieri wrote: > On Mon, Sep 03, 2012 at 08:13:35PM +0200, Kurt Van Dijck wrote: >> On Mon, Sep 03, 2012 at 02:40:39PM +0200, Marc Kleine-Budde wrote: >>> The net->ifindex is unique. But it's only an integer. Usually can0 has a >>> ifindex != 0, so a simple can%d is con

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-09-03 Thread Fabio Baltieri
On Mon, Sep 03, 2012 at 08:13:35PM +0200, Kurt Van Dijck wrote: > On Mon, Sep 03, 2012 at 02:40:39PM +0200, Marc Kleine-Budde wrote: > > The net->ifindex is unique. But it's only an integer. Usually can0 has a > > ifindex != 0, so a simple can%d is contra productive here. > > > > Some pointers to

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-09-03 Thread Kurt Van Dijck
On Mon, Sep 03, 2012 at 02:40:39PM +0200, Marc Kleine-Budde wrote: > On 08/25/2012 12:01 AM, Fabio Baltieri wrote: > > Hello Kurt, > > > > On Fri, Aug 24, 2012 at 02:42:48PM +0200, Kurt Van Dijck wrote: > >> On Fri, Aug 24, 2012 at 01:28:16PM +0200, Marc Kleine-Budde wrote: > >>> On 08/24/2012 07:

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-09-03 Thread Marc Kleine-Budde
On 08/25/2012 12:01 AM, Fabio Baltieri wrote: > Hello Kurt, > > On Fri, Aug 24, 2012 at 02:42:48PM +0200, Kurt Van Dijck wrote: >> On Fri, Aug 24, 2012 at 01:28:16PM +0200, Marc Kleine-Budde wrote: >>> On 08/24/2012 07:10 AM, Kurt Van Dijck wrote: Hello, I find the CAN led triggers

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-08-25 Thread Kurt Van Dijck
On Sat, Aug 25, 2012 at 12:01:42AM +0200, Fabio Baltieri wrote: > Hello Kurt, > > On Fri, Aug 24, 2012 at 02:42:48PM +0200, Kurt Van Dijck wrote: > > On Fri, Aug 24, 2012 at 01:28:16PM +0200, Marc Kleine-Budde wrote: > > > On 08/24/2012 07:10 AM, Kurt Van Dijck wrote: > > > > Hello, > > > > > > >

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-08-24 Thread Fabio Baltieri
Hello Kurt, On Fri, Aug 24, 2012 at 02:42:48PM +0200, Kurt Van Dijck wrote: > On Fri, Aug 24, 2012 at 01:28:16PM +0200, Marc Kleine-Budde wrote: > > On 08/24/2012 07:10 AM, Kurt Van Dijck wrote: > > > Hello, > > > > > > I find the CAN led triggers an interesting thing. > > > > > > And then, this

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-08-24 Thread Kurt Van Dijck
On Fri, Aug 24, 2012 at 01:28:16PM +0200, Marc Kleine-Budde wrote: > On 08/24/2012 07:10 AM, Kurt Van Dijck wrote: > > Hello, > > > > I find the CAN led triggers an interesting thing. > > > > And then, this scenario fell crossed my mind: > > Imagine I do: > > [insert CAN device: can0] > > $ ip li

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-08-24 Thread Marc Kleine-Budde
On 08/24/2012 07:10 AM, Kurt Van Dijck wrote: > Hello, > > I find the CAN led triggers an interesting thing. > > And then, this scenario fell crossed my mind: > Imagine I do: > [insert CAN device: can0] > $ ip link set can0 name helga > [insert another CAN device: again 'can0'] > > Registering '

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-08-23 Thread Kurt Van Dijck
Hello, I find the CAN led triggers an interesting thing. And then, this scenario fell crossed my mind: Imagine I do: [insert CAN device: can0] $ ip link set can0 name helga [insert another CAN device: again 'can0'] Registering 'can0-tx' led trigger will fail for the second CAN device, since that

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-08-01 Thread Fabio Baltieri
On Wed, Aug 01, 2012 at 11:00:04PM +0200, Marc Kleine-Budde wrote: > On 08/01/2012 08:21 PM, Fabio Baltieri wrote: > > This patch implements the functions to add two LED triggers, named > > -tx and -rx, to a canbus device driver. > > > > Triggers are called from specific handlers by each CAN devic

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-08-01 Thread Oliver Hartkopp
Fabio Baltieri hat am 1. August 2012 um 20:21 geschrieben: > so, v6, change trigger names for fixed size allocation capped to (IFNAMSIZ + > 4) > and removed kasprintf as suggested by Oliver (thanks!). > > This also has the side effect of reducing the error path to just one check to > devres_alloc

Re: [PATCH can-next v6] can: add tx/rx LED trigger support

2012-08-01 Thread Marc Kleine-Budde
On 08/01/2012 08:21 PM, Fabio Baltieri wrote: > This patch implements the functions to add two LED triggers, named > -tx and -rx, to a canbus device driver. > > Triggers are called from specific handlers by each CAN device driver and > can be disabled altogether with a Kconfig option. > > The imp

[PATCH can-next v6] can: add tx/rx LED trigger support

2012-08-01 Thread Fabio Baltieri
This patch implements the functions to add two LED triggers, named -tx and -rx, to a canbus device driver. Triggers are called from specific handlers by each CAN device driver and can be disabled altogether with a Kconfig option. The implementation keeps the LED on when the interface is UP and bl