From: Wolfgang Grandegger <wg@grandegger.com>
To: s.grosjean@peak-system.com
Cc: linux-can Mailing List <linux-can@vger.kernel.org>
Subject: Re: [PATCH v3] peak_pci: add support for PEAK-System PCIe/PCIeC/miniPCI boards
Date: Wed, 01 Feb 2012 14:46:57 +0100 [thread overview]
Message-ID: <4F294251.4040600@grandegger.com> (raw)
In-Reply-To: <4F293035.2060201@peak-system.com>
On 02/01/2012 01:29 PM, Stephane Grosjean wrote:
> Le 01/02/2012 13:02, Wolfgang Grandegger a écrit :
>> On 02/01/2012 12:02 PM, Stephane Grosjean wrote:
>>> This patch adds the support for the following 3x sja1000 based PCI
>>> boards
>>> from PEAK-System Technik (www.peak-system.com):
>>>
>>> PCAN-PCI Express (1 or 2 channels)
>>> PCAN-ExpressCard (1 or 2 channels)
>>> PCAN-miniPCI (1 or 2 channels)
>>>
>>> This version also updates Kconfig.
>>>
>>> Signed-off-by: Stephane Grosjean<s.grosjean@peak-system.com>
>>> ---
>>> drivers/net/can/sja1000/Kconfig | 7 +-
>>> drivers/net/can/sja1000/peak_pci.c | 510
>>> +++++++++++++++++++++++++++++++++--
>>> 2 files changed, 484 insertions(+), 33 deletions(-)
>>>
>>> diff --git a/drivers/net/can/sja1000/Kconfig
>>> b/drivers/net/can/sja1000/Kconfig
>>> index 36e9d59..d178e01 100644
>>> --- a/drivers/net/can/sja1000/Kconfig
>>> +++ b/drivers/net/can/sja1000/Kconfig
>>> @@ -44,11 +44,12 @@ config CAN_EMS_PCI
>>> (http://www.ems-wuensche.de).
>>>
>>> config CAN_PEAK_PCI
>>> - tristate "PEAK PCAN PCI/PCIe Cards"
>>> + tristate "PEAK PCAN-PCI/PCIe/PCIeC/miniPCI Cards"
>>> depends on PCI
>> It now also depends on I2C.
To be more precise, it depends on "CONFIG_I2C_ALGOBIT".
> Yes you're right...but if I added such a dependency, I2C would be
> mandatory, even for the other PEAK PCI boards
Yes, and I was already thinking if it's a good idea...
>
> I would prefer:
>
> 1 - Changing Kconfig : like that
>
> config CAN_PEAK_PCI
> tristate "PEAK PCAN-PCI/PCIe/miniPCI Cards"
> depends on PCI
> ---help---
> This driver is for the PCAN-PCI/PCIe/miniPCI cards
> (1, 2, 3 or 4 channels) from PEAK-System Technik
> (http://www.peak-system.com).
>
> The I2C driver must be selected to fully support the
> PCAN-ExpressCard card LEDs.
Does the PCAN-ExpressCard card work without I2C? If yes, I would be
enough to use CONFIG_I2C_ALGOBIT directly around the relevant code.
> config CAN_PEAK_PCIEC
> bool "PEAK PCAN-ExpressCard Card"
> depends on CAN_PEAK_PCI && I2C
> ---help---
> Add full support of the PCAN-ExpressCard card
> (1, 2, 3 or 4 channels) from PEAK-System Technik
> (http://www.peak-system.com).
>
>
> 2 - adding some #ifdef CONFIG_PEAK_PCIEC/ #endif in peak_pci.c around
> all what concerns leds management.
Not only LED management but the *complete* support for the
PCAN-ExpressCard card, in case I2C is mandatory. Using a separate file,
e.g. peak_pciec.c would be nice, but I think it does not make the code
more readable. Therefore, I think a few #ifdef are tolerable.
Wolfgang.
prev parent reply other threads:[~2012-02-01 13:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 11:02 [PATCH v3] peak_pci: add support for PEAK-System PCIe/PCIeC/miniPCI boards Stephane Grosjean
2012-02-01 12:02 ` Wolfgang Grandegger
2012-02-01 12:29 ` Stephane Grosjean
2012-02-01 13:46 ` Wolfgang Grandegger [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=4F294251.4040600@grandegger.com \
--to=wg@grandegger.com \
--cc=linux-can@vger.kernel.org \
--cc=s.grosjean@peak-system.com \
/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.