All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephane Grosjean <s.grosjean@peak-system.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
	Oliver Hartkopp <socketcan@hartkopp.net>,
	linux-can@vger.kernel.org
Subject: Re: [PATCH 7/7 v9] can/peak_usb: add support for PEAK new CANFD USB adapters
Date: Tue, 27 Jan 2015 14:02:38 +0100	[thread overview]
Message-ID: <54C78C6E.3070705@peak-system.com> (raw)
In-Reply-To: <54C746AE.60801@pengutronix.de>

Hi guys,

Le 27/01/2015 09:05, Marc Kleine-Budde a écrit :
> On 01/27/2015 09:00 AM, Oliver Hartkopp wrote:
>>>> I assume it is better to set the ctrlmode directly in the struct can_priv
>>>> element in  pcan_usb_fd_init() after retrieving the firmware version.
>>> Even better.
>>>
>>>> IMO it doesn't make sense to transport this info through the mechanic above
>>>> which mostly initialized quasi constant settings for the adapter.
>>> If we check the firmware version, it doesn't make sende to put the
>>> information into that struct (IMHO)
>> Just to be sure: We stated to have the same opinion here, right?
> Yes, check the firmware version and set ctrlmode directly.
>
>>>> +/* describes the PCAN-USB Pro FD adapter */
>>>> +struct peak_usb_adapter pcan_usb_pro_fd = {
>>>>
>>>> be
>>>>
>>>> +/* describes the PCAN-USB Pro FD adapter */
>>>> +const struct peak_usb_adapter pcan_usb_pro_fd = {
>>> Yes, but it probably needs some more modifications in the driver.
>> I don't know if this struct is "read-only" all the time.
>> If so it is easy to change.
> I haven't checked but I _think_ it should be possible to make it read
> only everywhere.
>
>> I pity you, Stephane - but we will make it :-))
> :)
>
> Marc

My :) as well as my ACK too...

But putting "const" here leads to several other changes in 
pcan_usb_core.h and pcan_usb_core.c (as well as in older pcan_usb.c and 
pcan_usb_pro.c files, where same struct peak_adapter static objects are 
used to define the corresponding USB adapter).

Do you need another patch which does this, once for all?

Stéphane

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

  reply	other threads:[~2015-01-27 13:02 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23 10:31 [PATCH 0/7 v9] can/peak_usb: upgrade to CANFD Stephane Grosjean
2015-01-23 10:31 ` [PATCH 1/7 v9] can/peak_usb: export ctrlmode_supported to adapter specific Stephane Grosjean
2015-01-23 10:31 ` [PATCH 2/7 v9] can/peak_usb: add adapter BEC callback definition Stephane Grosjean
2015-01-23 10:31 ` [PATCH 3/7 v9] can/peak_usb: upgrade core to data bittiming specs Stephane Grosjean
2015-01-23 10:31 ` [PATCH 4/7 v9] can/peak_usb: upgrade core to new struct canfd_frame Stephane Grosjean
2015-01-23 10:31 ` [PATCH 5/7 v9] can/peak_usb: export pcan_usb_pro functions Stephane Grosjean
2015-01-23 10:31 ` [PATCH 6/7 v9] can/peak_usb: add peak_usb_netif_rx() new function Stephane Grosjean
2015-01-23 10:31 ` [PATCH 7/7 v9] can/peak_usb: add support for PEAK new CANFD USB adapters Stephane Grosjean
2015-01-26 13:50   ` Marc Kleine-Budde
2015-01-26 15:11     ` Stephane Grosjean
2015-01-26 15:14       ` Marc Kleine-Budde
2015-01-26 15:42         ` Stephane Grosjean
2015-01-26 15:51           ` Marc Kleine-Budde
2015-01-26 21:04             ` Oliver Hartkopp
2015-01-26 21:08               ` Marc Kleine-Budde
2015-01-27  8:00                 ` Oliver Hartkopp
2015-01-27  8:05                   ` Marc Kleine-Budde
2015-01-27 13:02                     ` Stephane Grosjean [this message]
2015-01-27 13:07                       ` Marc Kleine-Budde
2015-01-27 13:16                         ` Stephane Grosjean
2015-01-27 13:10                       ` Oliver Hartkopp
2015-01-27 13:25                         ` Stephane Grosjean
2015-01-27 14:27                           ` Oliver Hartkopp
2015-01-28 13:17                             ` Marc Kleine-Budde
     [not found]                               ` <54C8E811.3050806@peak-system.com>
2015-01-28 13:59                                 ` Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54C78C6E.3070705@peak-system.com \
    --to=s.grosjean@peak-system.com \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=socketcan@hartkopp.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.