netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Tristram.Ha@microchip.com, muvarov@gmail.com,
	nathan.leigh.conrad@gmail.com,
	vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Woojung.Huh@microchip.com
Subject: Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new drivers can be added
Date: Fri, 8 Sep 2017 23:50:43 +0200	[thread overview]
Message-ID: <20170908215042.GC27428@amd> (raw)
In-Reply-To: <20170908190122.GM25219@lunn.ch>

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

On Fri 2017-09-08 21:01:22, Andrew Lunn wrote:
> > > So i would suggest one driver supporting all the different devices.
> > 
> > There will be 5 drivers to support these devices:
> > 
> > ksz9477.c - KSZ9893/KSZ9897/KSZ9567/KSZ9566/KSZ9477
> > ksz8795.c - KSZ8795/KSZ8795/KSZ8765
> > ksz8895.c - KSZ8895/KSZ8864
> > ksz8863.c - KSZ8863/KSZ8873
> > ksz8463.c - KSZ8463
> > 
> > These chips have different SPI access mechanisms, MIB counter reading,
> > and register set.  These can be combined into one single driver using
> > function pointers, at least for ksz8795/ksz8895/ksz8863/ksz8463.  My
> > only concern is the memory footprint.  The customer may not want a
> > big driver to cover all the switches while only one is used.
> 
> If memory footprint is your problem, make it a compile time choice
> which devices are supported within the one driver. In practice, you
> will find most distributions just enable them all.

I have to side with Tristram here. The register layouts are so
different that single driver does not make sense.

What could make sense is single function, compiled 5 times, based on
different includes; same source code but 5 different binaries.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  parent reply	other threads:[~2017-09-08 21:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07 21:11 [PATCH RFC] Update documentation for KSZ DSA drivers so that new drivers can be added Tristram.Ha
2017-09-07 21:54 ` Andrew Lunn
2017-09-08 13:32   ` Maxim Uvarov
2017-09-08 14:12     ` Andrew Lunn
2017-09-08 18:40       ` Tristram.Ha
2017-09-08 18:45         ` Florian Fainelli
2017-09-08 19:01         ` Andrew Lunn
2017-09-08 19:05           ` Florian Fainelli
2017-09-08 21:50           ` Pavel Machek [this message]
2017-09-08 21:53         ` Pavel Machek
2017-09-08  9:04 ` Pavel Machek
2017-09-08 18:48 ` Florian Fainelli
2017-09-08 19:00   ` Maxim Uvarov
2017-09-08 19:48     ` Tristram.Ha
2017-09-08 19:54       ` Florian Fainelli
2017-09-08 20:07         ` Tristram.Ha
2017-09-08 20:58           ` Florian Fainelli
2017-09-11  7:53       ` Maxim Uvarov

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=20170908215042.GC27428@amd \
    --to=pavel@ucw.cz \
    --cc=Tristram.Ha@microchip.com \
    --cc=Woojung.Huh@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=muvarov@gmail.com \
    --cc=nathan.leigh.conrad@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).