From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Subject: Re: platform_data when using of?
Date: Thu, 24 Apr 2008 13:07:49 +0200 [thread overview]
Message-ID: <20080424130749.7e217ccf@hyperion.delvare> (raw)
In-Reply-To: <20080424090045.GA4201-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
On Thu, 24 Apr 2008 11:00:45 +0200, Wolfram Sang wrote:
> On Wed, Apr 23, 2008 at 08:30:12PM +0200, Jean Delvare wrote:
> > Each i2c driver can support many different devices, which are
> > differentiated simply by their name. So the driver can behave
> > differently for each device type as needed.
>
> We exactly threw this out of at24 in the new revision, as name-matching
> stored quite some data in the driver which was needed only once during
> initialization. Also, it was not very flexible; what if you want to mark
> this chip as read-only, your variant has bigger page size and could be
> faster... The list of device names would grow too fast IMHO, adding a
> new feature which is selectable by a flag could easily double it.
The interest of separate chip names depend on the variety of devices
your driver support. I am not suggesting to have one name for every
different device the at24 driver will support, that would obviously be
way too many. But if you could come up with families (e.g. one name per
EEPROM size) with sane default settings, and then you can adjust
parameters through platform data, for example to maximize performance
if your actual EEPROM can handle larger page, or to enable write
access. So you probably have to find the right balance between one name
for all devices, and a separate name for each device.
> Then again: If Jochen's patches get applied, then I have to use
> MODULE_DEVICE_TABLE anyhow, or?
If you want your driver to load automatically, yes. But this doesn't
have much to do with the problem discussed above.
--
Jean Delvare
_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
prev parent reply other threads:[~2008-04-24 11:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-23 16:45 platform_data when using of? Wolfram Sang
2008-04-23 18:20 ` [i2c] " Jochen Friedrich
[not found] ` <20080423164523.GA4190-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2008-04-23 18:30 ` Jean Delvare
[not found] ` <20080423203012.24ed38b6-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-04-24 9:00 ` Wolfram Sang
[not found] ` <20080424090045.GA4201-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2008-04-24 11:07 ` Jean Delvare [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=20080424130749.7e217ccf@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
--cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
/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