From: Riku Voipio <riku.voipio-WgUW+8SLYMv1KXRcyAk9cg@public.gmane.org>
To: Bryan Wu <cooloney-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org,
Michael Hennerich
<michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH 2/2] [I2C] add PCA9543 chip driver
Date: Mon, 12 May 2008 15:30:43 +0300 [thread overview]
Message-ID: <48283873.5090709@movial.fi> (raw)
In-Reply-To: <1210586847-8955-3-git-send-email-cooloney-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Bryan Wu wrote:
> From: Michael Hennerich
> --- /dev/null
> +++ b/drivers/i2c/chips/pca9543.c
> @@ -0,0 +1,212 @@
> +/*
> + pca9543.c - Part of lm_sensors, Linux kernel modules for hardware
> + monitoring
>
Not a sensor chip..
> +/* A few notes about the PCA9543:
> +
> +* The PCA9543 is a bi-directional translating switch, controlled by the
> + I2C bus. The SCL/SDA upstream pair fans out to two downstream
> + pairs, or channels. Any individual SCx/SDx channels or combination
> + of channels can be selected, determined by the contents of the
> + programmable control register. Two interrupt inputs, INT0 to INT3,
> + one for each of the downstream pairs, are provided. One interrupt
> + output INT, which acts as an AND of the two interrupt inputs, is
> + provided.
> +
> +*/
>
You might want to add a url to the datasheet, rather than
a copypaste from it. Any description in the driver sould
> +
> +/* This is the driver that will be inserted */
> +static struct i2c_driver pca9543_driver = {
> + .driver = {
> + .name = "pca9543",
> + },
> + .id = I2C_DRIVERID_PCF8574,
> + .attach_adapter = pca9543_attach_adapter,
> + .detach_client = pca9543_detach_client,
> +};
>
Since the chip is undetectable, and used on embedded platform, I think you
should consider a "new-style" driver with .probe/remove instead.
See i2c/writing-clients
> + struct i2c_client *new_client;
>
> + new_client = &data->client;
> + i2c_set_clientdata(new_client, data);
> + new_client->addr = address;
> + new_client->adapter = adapter;
> + new_client->driver = &pca9543_driver;
> + new_client->flags = 0;
>
>
s/new_client/client/ please.
> + /* Now, we would do the remaining detection. But the PCF8574 is plainly
> + impossible to detect! Stupid chip. */
> +
>
copypaste from PCF8574 driver? :) Again, consider if the new style drivers
would me more useful for your platform.
_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
next prev parent reply other threads:[~2008-05-12 12:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-12 10:07 [PATCH 0/2] Two I2C Chips drivers from Blackfin team Bryan Wu
[not found] ` <1210586847-8955-1-git-send-email-cooloney-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2008-05-12 10:07 ` [PATCH 1/2] [I2C]: add AD5252 chip driver Bryan Wu
2008-05-12 10:07 ` [PATCH 2/2] [I2C] add PCA9543 " Bryan Wu
[not found] ` <1210586847-8955-3-git-send-email-cooloney-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2008-05-12 12:30 ` Riku Voipio [this message]
[not found] ` <48283873.5090709-WgUW+8SLYMv1KXRcyAk9cg@public.gmane.org>
2008-05-13 11:54 ` Hennerich, Michael
[not found] ` <8A42379416420646B9BFAC9682273B6D015F5379-pcKY8lWzTjquVPpjEGsWsTcYPEmu4y7e@public.gmane.org>
2008-05-14 4:23 ` Bryan Wu
2008-05-12 11:34 ` [PATCH 0/2] Two I2C Chips drivers from Blackfin team Jean Delvare
[not found] ` <20080512133453.23bde88d-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-05-12 12:07 ` Bryan Wu
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=48283873.5090709@movial.fi \
--to=riku.voipio-wguw+8slymv1kxrcyak9cg@public.gmane.org \
--cc=cooloney-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
--cc=michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@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