From: Jeremiah Mahler <jmmahler@gmail.com>
To: Stephane Grosjean <s.grosjean@peak-system.com>
Cc: linux-can@vger.kernel.org, Oliver Hartkopp <socketcan@hartkopp.net>
Subject: Re: [PATCH v2] can/peak_usb: add support for PEAK new CANFD USB adapters
Date: Mon, 8 Dec 2014 04:26:26 -0800 [thread overview]
Message-ID: <20141208122626.GA8858@hudson.localdomain> (raw)
In-Reply-To: <1418038572-4284-1-git-send-email-s.grosjean@peak-system.com>
Stephane,
On Mon, Dec 08, 2014 at 12:36:12PM +0100, Stephane Grosjean wrote:
> Add support for the following new PEAK-System technik CANFD USB adapters:
>
> PCAN-USB FD single CANFD channel USB adapter
> PCAN-USB Pro FD dual CANFD channels USB adapter
>
> Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
> ---
> v2: removes 2 changes that have been erroneously included in
> peak_usb_create_dev() (-netdev->dev_id = ctrl_idx;) as well as in
> peak_usb_probe() (move of "const u16 usb_id_product" declaration) in the
> previous version of this patch.
>
> drivers/net/can/usb/Kconfig | 14 +-
[...]
> +};
> +
> +#define PCAN_UFD_MSG_OVERRUN 0x101
> +
> +#define PCAN_UFD_OVMSG_CHANNEL(o) ((o)->channel & 0xf)
> +
> +struct __packed pcan_ufd_ovr_msg {
> + __le16 size;
> + __le16 type;
> + __le32 ts_low;
> + __le32 ts_high;
> + u8 channel;
> + u8 unused[3];
> +};
> +
> +/* Clock mode frequence values */
^^^^^^^^^
frequency
> +static const u32 pcan_usb_fd_clk_freq[6] = {
> + [PCAN_UFD_CLK_80MHZ] = 80000000,
> + [PCAN_UFD_CLK_60MHZ] = 60000000,
> + [PCAN_UFD_CLK_40MHZ] = 40000000,
> + [PCAN_UFD_CLK_30MHZ] = 30000000,
> + [PCAN_UFD_CLK_24MHZ] = 24000000,
> + [PCAN_UFD_CLK_20MHZ] = 20000000
> +};
> +
> +/* build the opcode_channel field wth respect to the correct endianess */
^^^
with
> +static inline __le16 pucan_cmd_opcode_channel(int opcode, int channel)
> +{
> + return cpu_to_le16(PUCAN_CMD_OPCODE_CHANNEL(opcode, channel));
> +}
> +
> +/* return a device USB interface */
> +static inline
> +struct pcan_usb_fd_if *pcan_usb_fd_dev_if(struct peak_usb_device *dev)
> +{
> + struct pcan_usb_fd_device *pdev =
> + container_of(dev, struct pcan_usb_fd_device, dev);
> + return pdev->usb_if;
> +}
[...]
--
- Jeremiah Mahler
prev parent reply other threads:[~2014-12-08 12:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-08 11:36 [PATCH v2] can/peak_usb: add support for PEAK new CANFD USB adapters Stephane Grosjean
2014-12-08 12:26 ` Jeremiah Mahler [this message]
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=20141208122626.GA8858@hudson.localdomain \
--to=jmmahler@gmail.com \
--cc=linux-can@vger.kernel.org \
--cc=s.grosjean@peak-system.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox