All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v10 3/9] can/peak_usb: export ctrlmode_supported to adapter specific
@ 2015-01-27 21:10 Stéphane Grosjean
  2015-01-27 21:10 ` Marc Kleine-Budde
  0 siblings, 1 reply; 5+ messages in thread
From: Stéphane Grosjean @ 2015-01-27 21:10 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: linux-can

[-- Attachment #1: Type: text/plain, Size: 3458 bytes --]

Hum… forget about my last email acking something I signed-off… Sorry for the noise… 

StéphaneLe 27 janv. 2015 22:05, Stéphane Grosjean <s.grosjean@peak-system.com> a écrit :
>
> Hi Mark,
>
> You've got my Ack for this patch (too)(again).
>
> Stéphane.Le 27 janv. 2015 17:41, Marc Kleine-Budde <mkl@pengutronix.de> a écrit :
> >
> > From: Stephane Grosjean <s.grosjean@peak-system.com> 
> >
> > Export the ctrlmode_supported value from the core file to each adapter specific 
> > file. This has been mandatory for supporting the new CANFD extension. 
> >
> > Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com> 
> > Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> 
> > --- 
> > drivers/net/can/usb/peak_usb/pcan_usb.c      | 1 + 
> > drivers/net/can/usb/peak_usb/pcan_usb_core.c | 3 +-- 
> > drivers/net/can/usb/peak_usb/pcan_usb_core.h | 1 + 
> > drivers/net/can/usb/peak_usb/pcan_usb_pro.c  | 1 + 
> > 4 files changed, 4 insertions(+), 2 deletions(-) 
> >
> > diff --git a/drivers/net/can/usb/peak_usb/pcan_usb.c b/drivers/net/can/usb/peak_usb/pcan_usb.c 
> > index d57d3f64a5bf..72427f21edff 100644 
> > --- a/drivers/net/can/usb/peak_usb/pcan_usb.c 
> > +++ b/drivers/net/can/usb/peak_usb/pcan_usb.c 
> > @@ -859,6 +859,7 @@ const struct peak_usb_adapter pcan_usb = { 
> > .name = "PCAN-USB", 
> > .device_id = PCAN_USB_PRODUCT_ID, 
> > .ctrl_count = 1, 
> > + .ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES | CAN_CTRLMODE_LISTENONLY, 
> > .clock = { 
> > .freq = PCAN_USB_CRYSTAL_HZ / 2 , 
> > }, 
> > diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c 
> > index 729b80d78322..2768399a52fa 100644 
> > --- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c 
> > +++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c 
> > @@ -750,8 +750,7 @@ static int peak_usb_create_dev(const struct peak_usb_adapter *peak_usb_adapter, 
> > dev->can.bittiming_const = &peak_usb_adapter->bittiming_const; 
> > dev->can.do_set_bittiming = peak_usb_set_bittiming; 
> > dev->can.do_set_mode = peak_usb_set_mode; 
> > - dev->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES | 
> > -       CAN_CTRLMODE_LISTENONLY; 
> > + dev->can.ctrlmode_supported = peak_usb_adapter->ctrlmode_supported; 
> >
> > netdev->netdev_ops = &peak_usb_netdev_ops; 
> >
> > diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.h b/drivers/net/can/usb/peak_usb/pcan_usb_core.h 
> > index 10f2fcac7c13..54fdb5978a05 100644 
> > --- a/drivers/net/can/usb/peak_usb/pcan_usb_core.h 
> > +++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.h 
> > @@ -44,6 +44,7 @@ struct peak_usb_device; 
> > struct peak_usb_adapter { 
> > char *name; 
> > u32 device_id; 
> > + u32 ctrlmode_supported; 
> > struct can_clock clock; 
> > const struct can_bittiming_const bittiming_const; 
> > unsigned int ctrl_count; 
> > diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c 
> > index 56855b2b1fa1..03f517160a67 100644 
> > --- a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c 
> > +++ b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c 
> > @@ -1016,6 +1016,7 @@ const struct peak_usb_adapter pcan_usb_pro = { 
> > .name = "PCAN-USB Pro", 
> > .device_id = PCAN_USBPRO_PRODUCT_ID, 
> > .ctrl_count = PCAN_USBPRO_CHANNEL_COUNT, 
> > + .ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES | CAN_CTRLMODE_LISTENONLY, 
> > .clock = { 
> > .freq = PCAN_USBPRO_CRYSTAL_HZ, 
> > }, 
> > -- 
> > 2.1.4 
> >

[-- Attachment #2: Signature.txt --]
[-- Type: text/plain, Size: 151 bytes --]

--
PEAK-System Technik GmbH
Sitz der Gesellschaft Darmstadt
Handelsregister Darmstadt HRB 9183 
Geschaeftsfuehrung: Alexander Gach, Uwe Wilhelm
--

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: [PATCH v10 3/9] can/peak_usb: export ctrlmode_supported to adapter specific
@ 2015-01-27 21:05 Stéphane Grosjean
  2015-01-27 21:07 ` Marc Kleine-Budde
  0 siblings, 1 reply; 5+ messages in thread
From: Stéphane Grosjean @ 2015-01-27 21:05 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: linux-can

[-- Attachment #1: Type: text/plain, Size: 3128 bytes --]

Hi Mark,

You've got my Ack for this patch (too)(again).

Stéphane.Le 27 janv. 2015 17:41, Marc Kleine-Budde <mkl@pengutronix.de> a écrit :
>
> From: Stephane Grosjean <s.grosjean@peak-system.com> 
>
> Export the ctrlmode_supported value from the core file to each adapter specific 
> file. This has been mandatory for supporting the new CANFD extension. 
>
> Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com> 
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> 
> --- 
> drivers/net/can/usb/peak_usb/pcan_usb.c      | 1 + 
> drivers/net/can/usb/peak_usb/pcan_usb_core.c | 3 +-- 
> drivers/net/can/usb/peak_usb/pcan_usb_core.h | 1 + 
> drivers/net/can/usb/peak_usb/pcan_usb_pro.c  | 1 + 
> 4 files changed, 4 insertions(+), 2 deletions(-) 
>
> diff --git a/drivers/net/can/usb/peak_usb/pcan_usb.c b/drivers/net/can/usb/peak_usb/pcan_usb.c 
> index d57d3f64a5bf..72427f21edff 100644 
> --- a/drivers/net/can/usb/peak_usb/pcan_usb.c 
> +++ b/drivers/net/can/usb/peak_usb/pcan_usb.c 
> @@ -859,6 +859,7 @@ const struct peak_usb_adapter pcan_usb = { 
> .name = "PCAN-USB", 
> .device_id = PCAN_USB_PRODUCT_ID, 
> .ctrl_count = 1, 
> + .ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES | CAN_CTRLMODE_LISTENONLY, 
> .clock = { 
> .freq = PCAN_USB_CRYSTAL_HZ / 2 , 
> }, 
> diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c 
> index 729b80d78322..2768399a52fa 100644 
> --- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c 
> +++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c 
> @@ -750,8 +750,7 @@ static int peak_usb_create_dev(const struct peak_usb_adapter *peak_usb_adapter, 
> dev->can.bittiming_const = &peak_usb_adapter->bittiming_const; 
> dev->can.do_set_bittiming = peak_usb_set_bittiming; 
> dev->can.do_set_mode = peak_usb_set_mode; 
> - dev->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES | 
> -       CAN_CTRLMODE_LISTENONLY; 
> + dev->can.ctrlmode_supported = peak_usb_adapter->ctrlmode_supported; 
>
> netdev->netdev_ops = &peak_usb_netdev_ops; 
>
> diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.h b/drivers/net/can/usb/peak_usb/pcan_usb_core.h 
> index 10f2fcac7c13..54fdb5978a05 100644 
> --- a/drivers/net/can/usb/peak_usb/pcan_usb_core.h 
> +++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.h 
> @@ -44,6 +44,7 @@ struct peak_usb_device; 
> struct peak_usb_adapter { 
> char *name; 
> u32 device_id; 
> + u32 ctrlmode_supported; 
> struct can_clock clock; 
> const struct can_bittiming_const bittiming_const; 
> unsigned int ctrl_count; 
> diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c 
> index 56855b2b1fa1..03f517160a67 100644 
> --- a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c 
> +++ b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c 
> @@ -1016,6 +1016,7 @@ const struct peak_usb_adapter pcan_usb_pro = { 
> .name = "PCAN-USB Pro", 
> .device_id = PCAN_USBPRO_PRODUCT_ID, 
> .ctrl_count = PCAN_USBPRO_CHANNEL_COUNT, 
> + .ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES | CAN_CTRLMODE_LISTENONLY, 
> .clock = { 
> .freq = PCAN_USBPRO_CRYSTAL_HZ, 
> }, 
> -- 
> 2.1.4 
>

[-- Attachment #2: Signature.txt --]
[-- Type: text/plain, Size: 151 bytes --]

--
PEAK-System Technik GmbH
Sitz der Gesellschaft Darmstadt
Handelsregister Darmstadt HRB 9183 
Geschaeftsfuehrung: Alexander Gach, Uwe Wilhelm
--

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH v10 1/9] can: peak_usb: updates and CANFD support
@ 2015-01-27 16:41 Marc Kleine-Budde
  2015-01-27 16:41 ` [PATCH v10 3/9] can/peak_usb: export ctrlmode_supported to adapter specific Marc Kleine-Budde
  0 siblings, 1 reply; 5+ messages in thread
From: Marc Kleine-Budde @ 2015-01-27 16:41 UTC (permalink / raw)
  To: s.grosjean; +Cc: linux-can

Hey,

picking up Stéphane's work.

Changes since v9
- 1/9: convert peak_usb_adapters_list from NULL termination to
       ARRAY_SIZE usage
- 2/9: constify struct peak_usb_adapter

regards,
Marc


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-27 21:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-27 21:10 [PATCH v10 3/9] can/peak_usb: export ctrlmode_supported to adapter specific Stéphane Grosjean
2015-01-27 21:10 ` Marc Kleine-Budde
  -- strict thread matches above, loose matches on Subject: below --
2015-01-27 21:05 Stéphane Grosjean
2015-01-27 21:07 ` Marc Kleine-Budde
2015-01-27 16:41 [PATCH v10 1/9] can: peak_usb: updates and CANFD support Marc Kleine-Budde
2015-01-27 16:41 ` [PATCH v10 3/9] can/peak_usb: export ctrlmode_supported to adapter specific Marc Kleine-Budde

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.